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

# Transfer digital wallet tokens

> Use the /cardactions/cardswap endpoint to transfer digital wallet tokens to a new card with a different primary account number (PAN).

PUT/cardactions/cardswap

Use the `/cardactions/cardswap` endpoint to transfer digital wallet tokens to a new card with a different primary account number (PAN).

## Header parameter

| Fields | Description |
| - | - |
| req-sys-id string  Optional | Random pseudo-unique identifier of a request, used for troubleshooting between multiple parties. Usually a globally unique identifier (GUID). **Allowable Values:**  1–36 chars |

## Request body

| Fields | Description |
| - | - |
| encrypted\_card\_data object  Required | Contains details about the cards to be swapped. **Allowable Values:**  `new_card_token`, `new_pan_expiry`, `new_primary_account_number`, `old_card_token`, `old_pan_expiry`, `old_primary_account_number` |
| encrypted\_card\_data.**old\_primary\_account\_number** string  Required | Primary account number for the existing payment card from which the digital wallet tokens are transferred. **Allowable Values:**  12–19 chars |
| encrypted\_card\_data.**old\_pan\_expiry** object  Required | Specifies the expiry date for the card. **Allowable Values:**  `month`, `year` |
| encrypted\_card\_data.old\_pan\_expiry.**month** string  Required | Specifies the expiry month for the card in MM format. `01`, for example. **Allowable Values:**  Format: MM |
| encrypted\_card\_data.old\_pan\_expiry.**year** string  Required | Specifies the expiry year for the card in yyyy format. `2024`, for example. **Allowable Values:**  Format: yyyy |
| encrypted\_card\_data.**old\_card\_token** string  Required | Unique identifier of the card. **Allowable Values:**  1–36 chars |
| encrypted\_card\_data.**new\_primary\_account\_number** string  Required | Primary account number of the new card to which the digital wallet token are transferred. **Allowable Values:**  12–19 chars |
| encrypted\_card\_data.**new\_pan\_expiry** object  Required | Specifies the expiry date for the card. **Allowable Values:**  `month`, `year` |
| encrypted\_card\_data.new\_pan\_expiry.**month** string  Required | Specifies the expiry month for the card in MM format. `01`, for example. **Allowable Values:**  Format: MM |
| encrypted\_card\_data.new\_pan\_expiry.**year** string  Required | Specifies the expiry year for the card in yyyy format. `2024`, for example. **Allowable Values:**  Format: yyyy |
| encrypted\_card\_data.**new\_card\_token** string  Required | Unique identifier of the new payment card token to which the digital wallet tokens are transferred. **Allowable Values:**  1–36 chars |

## Response body

| Fields | Description |
| - | - |
| success boolean  Conditionally returned | Indicates success if `true`, failure if `false`. **Allowable Values:**  `true`, `false` |


## Related topics

- [Tokenization-as-a-Service Overview](https://www.marqeta.com/docs/core-api/tokenization-as-a-service.md)
- [Retrieve digital wallet token](https://www.marqeta.com/docs/core-api/tokenization-as-a-service/digital-wallet-tokens-taas/retrieve-digital-wallet-token.md)
- [List digital wallet tokens](https://www.marqeta.com/docs/core-api/digital-wallets-management/digital-wallet-tokens-wallets/list-tokens.md)
- [Digital Wallet Tokens Overview](https://www.marqeta.com/docs/core-api/digital-wallets-management/digital-wallet-tokens-wallets.md)
- [Provisioning Digital Wallet Tokens](https://www.marqeta.com/docs/developer-guides/provisioning-digital-wallet-tokens.md)
