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

# Create digital wallet tokens

> Create a digital wallet token to provision a digital wallet token into an Apple, Google, or Samsung wallet. Once your request is processed, you'll rec

Create a digital wallet token to provision a digital wallet token into an Apple, Google, or Samsung wallet. Once your request is processed, you'll receive a `DigitalWalletTokenTransition` containing the digital wallet token. [Learn more about webhooks and how to subscribe to them](/pages/webhooks/how-it-works).

<Info>
  You can only have up to 25 digital wallet tokens associated with the same funding PAN. This includes both active and suspended tokens. If you try to create a 26th, Mastercard will display an error message on the device itself — you won't receive an error message from the Equals API.
</Info>

## Before you start

To create digital wallet tokens, you'll need to:

* ensure that tokenisation is enabled for your cards
* have an existing app and the relevant App Store or Google Play certificates

<Info>
  Tokenisation is enabled at a BIN and card product level. If you're not sure this is enabled for your cards, please get in touch with your account manager.
</Info>

## Create an Apple digital wallet token

<Note>
  **POST** `/v2/cards/{cardId}/apple-wallet`
</Note>

### Request

Use this request to create a digital wallet token that can be added to an Apple wallet. The card's data is encrypted using Apple’s own encryption key, meaning your PCI compliance overhead is reduced.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/2471fbf0-cb07-42fc-863e-5979d5773122/apple-wallet?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "deviceType": "WATCH",
      "provisioningAppVersion": "2.11.1",
      "certificates": [
        "MIIEPDCCA+KgAwIBAgICEAAwCQYHKoZIzj",
        "MIIDZjCCAw2gAwIBAgIJAJx22AGaEPSgMA"
      ],
      "nonce": "vXWJaBidcTLaJJCF",
      "nonceSignature": "jD4Aphu+93N2wbBn"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/{cardId}/apple-wallet?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "deviceType": "string",
      "provisioningAppVersion": "string",
      "certificates": [
        "string",
        "string"
      ],
      "nonce": "string",
      "nonceSignature": "string"
    }'
  ```
</CodeGroup>

#### Path parameters

<ParamField body="cardId" type="string (uuid)" required>
  The ID of the card to work with.

  Allowable values: An existing `cardId` (≤ 36 characters)
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that the card is associated with.

  Allowable values: An existing `accountId`
</ParamField>

<ParamField body="personId" type="string (uuid)">
  The ID of the person that the card belongs to.

  Allowable values: An existing `personId` (≤ 36 characters)
</ParamField>

#### Request body schema

<ParamField body="deviceType" type="string" required>
  The type of device. For example, `type=WATCH`.

  Allowable values: `MOBILE_PHONE`, `TABLET`, `WATCH`
</ParamField>

<ParamField body="provisioningAppVersion" type="string" required>
  The version of the application making the provisioning request. This is used for debugging and fraud prevention.

  Allowable values: ≤ 50 characters
</ParamField>

<ParamField body="certificates" type="array of strings" required>
  The Base64-encoded leaf and sub-CA certificates provided by Apple. The first element of the array should be the leaf certificate, followed by the sub-CA.

  Allowable values: A valid array of strings
</ParamField>

<ParamField body="nonce" type="string" required>
  The single-use nonce provided by Apple for security purposes.

  Allowable values: A valid string
</ParamField>

<ParamField body="nonceSignature" type="string" required>
  The signature to the nonce provided by Apple.

  Allowable values: A valid string
</ParamField>

### Response

If your request is successful, you'll receive a `201` response. You'll also receive a webhook containing the digital wallet token.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "deviceType": "WATCH",
    "provisioningAppVersion": "2.11.1",
    "certificates": [
      "MIIEPDCCA+KgAwIBAgICEAAwCQYHKoZIzj",
      "MIIDZjCCAw2gAwIBAgIJAJx22AGaEPSgMA"
    ],
    "nonce": "vXWJaBidcTLaJJCF",
    "nonceSignature": "jD4Aphu+93N2wbBn"
  }
  ```

  ```json Payload structure theme={null}
  {
    "deviceType": "string",
    "provisioningAppVersion": "string",
    "certificates": [
      "string",
      "string"
    ],
    "nonce": "string",
    "nonceSignature": "string"
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/digital-wallets/create-an-apple-digital-wallet-token).

## Create a Google Pay digital wallet token

<Note>
  **POST** `/v2/cards/{cardId}/google-wallet`
</Note>

### Request

Use this request to create a digital wallet token that can be added to a Google wallet. The card's data is encrypted using Google’s own encryption key, meaning your PCI compliance overhead is reduced.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/9888e73c-3ea6-4911-bbdd-79f9bab5919c/google-wallet?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "deviceType": "WATCH",
      "provisioningAppVersion": "2.11.1",
      "deviceId": "b39f54264a3d",
      "walletUserId": "894b8236-b5cc-4f49-89f7-690d7bc4b9d2"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/{cardId}/google-wallet?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "deviceType": "string",
      "provisioningAppVersion": "string",
      "deviceId": "string",
      "walletUserId": "string"
    }'
  ```
</CodeGroup>

#### Path parameters

<ParamField body="cardId" type="string (uuid)" required>
  The ID of the card to work with.

  Allowable values: An existing `cardId` (≤ 36 characters)
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that the card is associated with.

  Allowable values: An existing `accountId`
</ParamField>

<ParamField body="personId" type="string (uuid)">
  The ID of the person that the card belongs to.

  Allowable values: An existing `personId` (≤ 36 characters)
</ParamField>

#### Request body schema

<ParamField body="deviceType" type="string" required>
  The type of device. For example, `type=WATCH`.

  Allowable values: `MOBILE_PHONE`, `TABLET`, `WATCH`
</ParamField>

<ParamField body="provisioningAppVersion" type="string" required>
  The version of the application making the provisioning request. This is used for debugging and fraud prevention.

  Allowable values: ≤ 50 characters
</ParamField>

<ParamField body="deviceId" type="string" required>
  The unique identifier for the cardholder’s Android device, as provided during the provisioning process.

  Allowable values: ≤ 24 characters
</ParamField>

<ParamField body="walletUserId" type="string" required>
  The cardholder's digital wallet account ID, as provided during the provisioning process.

  Allowable values: ≤ 50 characters
</ParamField>

### Response

If your request is successful, you'll receive a `201` response. You'll also receive a webhook containing the digital wallet token.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "createdAt": "2022-11-06T22:43:20Z",
    "updatedAt": "2022-11-06T22:43:20Z",
    "pushTokenizeRequestData": {
      "displayName": "Visa 5678",
      "lastDigits": "3264",
      "network": "Visa",
      "tokenServiceProvider": "TOKEN_PROVIDER_VISA",
      "opaquePaymentCard": "my_opaque_payment_card_RUza...",
      "userAddress": {
        "name": "John Doe",
        "address1": "180 Grand Ave",
        "address2": "Suite 500",
        "city": "Oakland",
        "state": "CA",
        "postalCode": "94612",
        "country": "US",
        "phone": "5105551212"
      }
    }
  }
  ```

  ```json Payload structure theme={null}
  {
    "createdAt": "string",
    "updatedAt": "string",
    "pushTokenizeRequestData": {
      "displayName": "string",
      "lastDigits": "string",
      "network": "string",
      "tokenServiceProvider": "string",
      "opaquePaymentCard": "string",
      "userAddress": {
        "name": "string",
        "address1": "string",
        "address2": "string",
        "city": "string",
        "state": "string",
        "postalCode": "string",
        "country": "string",
        "phone": "string"
      }
    }
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/digital-wallets/create-a-google-digital-wallet-token).

## Create a Samsung digital wallet token

<Note>
  **POST** `/v2/cards/{cardId}/samsung-wallet`
</Note>

### Request

Use this request to create a digital wallet token that can be added to a Samsung wallet. The card's data is encrypted using Samsung’s own encryption key, meaning your PCI compliance overhead is reduced.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/48a5f1ea-0d14-4ef5-b6ed-3a33957e6505/samsung-wallet?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "deviceType": "WATCH",
      "provisioningAppVersion": "2.11.1",
      "deviceId": "b39f54264a3d",
      "walletUserId": "894b8236-b5cc-4f49-89f7-690d7bc4b9d2"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/{cardId}/samsung-wallet?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "deviceType": "string",
      "provisioningAppVersion": "string",
      "deviceId": "string",
      "walletUserId": "string"
    }'
  ```
</CodeGroup>

#### Path parameters

<ParamField body="cardId" type="string (uuid)" required>
  The ID of the card to work with.

  Allowable values: An existing `cardId` (≤ 36 characters)
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that the card is associated with.

  Allowable values: An existing `accountId`
</ParamField>

<ParamField body="personId" type="string (uuid)">
  The ID of the person that the card belongs to.

  Allowable values: An existing `personId` (≤ 36 characters)
</ParamField>

#### Request body schema

<ParamField body="deviceType" type="string" required>
  The type of device. For example, `type=WATCH`.

  Allowable values: `MOBILE_PHONE`, `TABLET`, `WATCH`
</ParamField>

<ParamField body="provisioningAppVersion" type="string" required>
  The version of the application making the provisioning request. This is used for debugging and fraud prevention.

  Allowable values: ≤ 50 characters
</ParamField>

<ParamField body="deviceId" type="string" required>
  The unique identifier for the cardholder’s Android device, as provided during the provisioning process.

  Allowable values: ≤ 24 characters
</ParamField>

<ParamField body="walletUserId" type="string" required>
  The cardholder's digital wallet account ID, as provided during the provisioning process.

  Allowable values: ≤ 50 characters
</ParamField>

### Response

If your request is successful, you'll receive a `201` response. You'll also receive a webhook containing the digital wallet token.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "createdAt": "2023-03-14T12:08:53Z",
    "updatedAt": "2023-03-14T12:08:53Z",
    "pushTokenizeRequestData": {
      "cardType": "CREDIT",
      "displayName": "Visa 5678",
      "extraProvisionPayload": "string",
      "lastDigits": "5678",
      "network": "CREDIT",
      "tokenServiceProvider": "MC"
    }
  }
  ```

  ```json Payload structure theme={null}
  {
    "createdAt": "string",
    "updatedAt": "string",
    "pushTokenizeRequestData": {
      "cardType": "string",
      "displayName": "string",
      "extraProvisionPayload": "string",
      "lastDigits": "string",
      "network": "string",
      "tokenServiceProvider": "string"
    }
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/digital-wallets/create-a-samsung-digital-wallet-token).
