GuidesAPI ReferenceChangelog
Log In

# Introduction

You can incorporate your existing user model into Pinwheel to simplify your integration and improve coverage. Start by providing us with your own internal user identifier when you initiate an account connection. Providing your internal user identifier is useful because:

  • Any account data you receive from us includes the user ID you provide, making it easier to associate that data with your own internal user model.

  • Pinwheel can offer you products built on data from multiple accounts. For example, [Earned Wage Access (EWA)](🔗) leverages multi-account data available when you [Supplement Shifts with T&A Platforms](🔗).

  • Pinwheel can determine if a user makes repeated connection attempts, such as across different platforms. We use this information to improve conversion.

  • Simple [Direct Deposit](🔗) only integrations don't need to track any [Pinwheel identifiers](🔗), except for troubleshooting purposes.

# Implementation

## Step 1: Create a Link Token with your user ID

Provide your user ID via the `end_user_id` parameter in [POST /v1/link_tokens](🔗). Pinwheel will accept any UTF-8 string from 1 and 255 characters in length. We will remove whitespace at the start and end of the identifier.

Do not provide any personally identifiable information ("PII" such as social security numbers, first/last name, bank account numbers, etc.) in this field since this identifier is logged.

Pinwheel associates accounts and data with the value you provide in `end_user_id`. You can specify the same `end_user_id` across multiple Link Tokens to affiliate multiple accounts with a single user.

Here's what an example request to [POST /v1/link_tokens](🔗) with `end_user_id` might look like:

## Step 2: Your user connects their account

Your user logs in via Link and connects to their account. See our [Implementation Guide](🔗) for more information.

## Step 3: Consume end user data

Pinwheel provides two ways to make end user data available to you:

### Webhooks

By [registering a webhook](🔗), you can receive account data automatically when your user connects their account.

If you've specified an `end_user_id`, then all webhook events will contain a reference to your supplied user identifier.

For example, the `account.added` webhook event would include the `end_user_id` from Step 1:

### API

If you've specified `end_user_id` during Link Token creation, you can access a list of that end user's accounts via [GET /v1/end_users/{end_user_id}/accounts](🔗). This endpoint returns a [paginated](🔗) list of the accounts associated with the end user: