---
title: "Migrate Mastercard tokens"
method: POST
path: "/tokens/migration/{oldTokenId}"
tags: ["Token Migration"]
---

# Migrate Mastercard tokens

`POST /tokens/migration/{oldTokenId}`

Migrate mastercard M4M tokens to Secure Card on File

ETP contacts the Scheme TSP to migrate the network token.

## Path parameters

- `oldTokenId` string, required

## Headers

- `authorization` string, required
- `x-correlation-id` string, required

## Response `201`

OK

- object
  - `newTokenId` string, required — Identifier of the token
  - `cardLastDigits` string — The card last digits.
  - `cardExpiryDate` string — Expiry date of the card in MMYY format
  - `tokenState` 'ACTIVE' | 'SUSPENDED' | 'PENDING', required — Token state.
  - `tokenLastDigits` string — The token last digits.
  - `tokenExpiryDate` string — The token expiry date in format MMYY. This information can be missing. It is intended for display only at this step.<br>Rely on token expiry date in create transaction response for storage.
  - `par` string — Payment Account Reference returned by the Scheme TSP.
  - `cardProduct` CardProductMigration — Information about the card product.
    - `issuerName` string — The card issuer name.
    - `cardType` 'CREDIT' | 'DEBIT' | 'PREPAID' | 'UNKNOWN', required — The card type.
    - `scheme` 'MASTERCARD' — The card primary scheme.
    - `cardDescription` string — The card description.
    - `cardArts` CardArtsMigration
      - `foregroundColor` string — Color used for the text displayed on the card (last digits, expiry date). Hexadecimal RGB color format.
      - `cardImageUrl` string — HTTP location of the card image. If present, no other identifier is provided and getAsset operation is not needed.
  - `creationTimestamp` string, required — Token or binding creation timestamp compliant with ISO 8601.

## Other responses

- `400` — Bad request - Not Retryable
- `401` — Unauthorized - Not Retryable
- `404` — Not Found - Not Retryable
- `429` — Too Many Requests - Retryable
- `500` — Internal Server Error Retry possible
- `503` — Service Unavailable Retry possible

---

[API](https://skmtc.net/thalescloud/apis/d1-oauth-api.md) · [All operations](https://skmtc.net/thalescloud/apis/d1-oauth-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thalescloud/d1-oauth-api/revisions/96089514858c/schema)
