> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Register User Data

> Provide personal information about recipients in order to comply with regulation

Register the transfer recipient as a user in your Crossmint project, then attach the recipient data required for payouts.
Crossmint uses this data to screen recipients against Office of Foreign Assets Control (OFAC) sanctions lists.

## Requirements

* An API key
* A stable user identifier in your system (used as `userLocator`)
* A Crossmint wallet address for the recipient (or the ability to create one)

## Step 1: Create a User

Register the transfer recipient as a user in your Crossmint project and associate the user with a Crossmint wallet address.

There are two ways to create a user:

### Choose a Method

* Use Method 1 if you create the wallet and user in one API call
* Use Method 2 if you register the user first and create the wallet later

<AccordionGroup>
  <Accordion title="Method 1: On Wallet Creation" icon="wallet">
    Create a wallet for a user and associate it to a `userLocator` by setting the `owner` property. This method creates in a
    single API call both the wallet, and the user associated with it.

    The `owner` property accepts a `userLocator`. This associates the wallet with the user identifier in your system.

    <Snippet file="userlocator-format-options.mdx" />

    <Tabs>
      <Tab title="REST">
        ```javascript theme={null}
        const userLocator = "userId:johnd-123";

        const options = {
            method: 'POST',
            headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
            body: JSON.stringify({
                chainType: "evm",
                config: {
                    adminSigner: {
                        type: "email",
                        email: "johnd@example.com"
                    }
                },
                owner: userLocator
            })
        };

        fetch('https://staging.crossmint.com/api/2025-06-09/wallets', options)
            .then(response => response.json())
            .then(response => console.log(response))
            .catch(err => console.error(err));
        ```
      </Tab>

      <Tab title="React">
        ```javascript theme={null}
        import { useWallet } from '@crossmint/client-sdk-react-ui';

        const { getOrCreateWallet } = useWallet();

        // The "owner" property is inferred by the JWT token, no need to specify it
        const wallet = await getOrCreateWallet({
            chain: "evm",
            signer: {
                type: "email",
                email: "johnd@example.com"
            }
        });
        ```
      </Tab>
    </Tabs>
  </Accordion>

  <Accordion title="Method 2: Register User First, Create Wallet Later" icon="user-plus">
    Register a user with Crossmint without creating a wallet yet. Later, when you create a wallet for that registered user,
    you can link the wallet's `owner` property to that user's registered `userLocator` value. This will associate the wallet with the user identifier in your system.

    <Snippet file="userlocator-format-options.mdx" />

    **Step 1: Register the user**

    ```javascript theme={null}
    const userLocator = "userId:johnd-123";

    const options = {
        method: 'PUT',
        headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'}
    };

    fetch(`https://staging.crossmint.com/api/2025-06-09/users/${userLocator}`, options)
        .then(response => response.json())
        .then(response => console.log(response))
        .catch(err => console.error(err));
    ```

    **Step 2: Create wallet and link to registered user**

    When you are ready to create a wallet for the registered user, use the same `userLocator` in the `owner` field:

    <Tabs>
      <Tab title="REST">
        ```javascript theme={null}
        const userLocator = "userId:johnd-123";

        const options = {
            method: 'POST',
            headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
            body: JSON.stringify({
                chainType: "evm",
                config: {
                    adminSigner: {
                        type: "email",
                        email: "johnd@example.com"
                    }
                },
                owner: userLocator
            })
        };

        fetch('https://staging.crossmint.com/api/2025-06-09/wallets', options)
            .then(response => response.json())
            .then(response => console.log(response))
            .catch(err => console.error(err));
        ```
      </Tab>

      <Tab title="React">
        ```javascript theme={null}
        import { useWallet } from '@crossmint/client-sdk-react-ui';

        const { getOrCreateWallet } = useWallet(); 

        // The "owner" property is inferred by the JWT token, no need to specify it
        const wallet = await getOrCreateWallet({
            chain: "evm",
            signer: {
                type: "email",
                email: "johnd@example.com"
            }
        });
        ```
      </Tab>
    </Tabs>
  </Accordion>
</AccordionGroup>

## Step 2: Register User Data

Use the [Create User API](/api-reference/users/upsert-user) to attach `userDetails` to the user.
To see data requirements by activity and region, see [Data Requirements](/identity/data-requirements).
For payouts, the only information needed is `userDetails`.

<CodeGroup>
  ```javascript REST theme={null}

  const userLocator = "userId:johnd-123";

  const options = {
     method: 'PUT',
     headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
     body: JSON.stringify({
         userDetails: {
             firstName: "John",
             lastName: "Doe",
             dateOfBirth: "2007-01-01",
             countryOfResidence: "DE"
         }
     })
  };

  fetch(`https://staging.crossmint.com/api/2025-06-09/users/${userLocator}/`, options)
     .then(response => response.json())
     .then(response => console.log(response))
     .catch(err => console.error(err));
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Make a Payout" icon="arrow-right-arrow-left" iconType="duotone" color="#FF991F" href="/stablecoin-orchestration/regulated-transfers/guides/transfers">
    Learn how to execute payouts and handle compliance errors
  </Card>

  <Card title="Quickstart" icon="bolt" iconType="duotone" color="#6554C0" href="/stablecoin-orchestration/regulated-transfers/quickstart">
    Get started with payouts in minutes
  </Card>
</CardGroup>
