> ## 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.

# Update digital wallet tokens

> Transition a digital wallet token from one state to another.

## Update a digital wallet token's state

<Note>
  **POST** `/v2/cards/{cardId}/digital-wallet-token-transitions`
</Note>

### Request

Use this endpoint to update a digital wallet token's state.

<Info>
  You can't update a digital wallet token that has the `REQUEST_DECLINED` or `TERMINATED` state, as these are final states. Instead, you should create a new digital wallet token for that card.
</Info>

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/2471fbf0-cb07-42fc-863e-5979d5773122/digital-wallet-token-transitions?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "state": "ACTIVE",
      "digitalWalletToken": "9d3dee7c-19df-4b71-bbb9-521bb04307bf"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X POST \
    'https://api.equalsmoney.com/v2/cards/{cardId}/digital-wallet-token-transitions?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "state": "string",
      "digitalWalletToken": "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="state" type="string (enum)" required>
  The state that you want to update the digital wallet token to. The original state is `REQUESTED`. You can't update the state if its current value is either `REQUEST_DECLINED` or `TERMINATED`.

  Allowable values: `ACTIVE`, `SUSPENDED`, `TERMINATED`
</ParamField>

<ParamField body="digitalWalletToken" type="string (uuid)" required>
  The digital wallet token that you want to update the state for.

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

### Response

If your request is successful, you'll receive a `201` response. If you've subscribed to webhooks, you'll also receive a `DigitalWalletTokenTransition` webhook.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "fulfillmentStatus": "PROVISIONED",
    "digitalWalletToken": "b98cb680-2fd4-4c14-aa56-8d05091209d5",
    "state": "ACTIVE"
  }
  ```

  ```json Response structure theme={null}
  {
    "fulfillmentStatus": "string",
    "digitalWalletToken": "string",
    "state": "string"
  }
  ```
</CodeGroup>

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