> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/merchant-tokenization/network-tokenization/implement-network-tokenization/create-a-token.md).

# Create a token

Create payment network tokens for e-commerce payments.

## Synchronous tokenization flow

<figure><img src="/files/gNQQVT0JpbwRsShExlf1" alt=""><figcaption><p>Synchronous token creation flow</p></figcaption></figure>

<table><thead><tr><th width="100">Step</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>The end user provides card details.</td></tr><tr><td>2</td><td>The merchant or PSP sends encrypted card details to Thales backend. Include a correlation identifier for this Tokenization session.</td></tr><tr><td>3</td><td>Thales backend requests a token from the payment network TSP. Additional steps are payment-network dependent.</td></tr><tr><td>4</td><td>The payment network TSP requests issuer approval.</td></tr><tr><td>5</td><td>Thales backend returns the <code>tokenId</code> and non-sensitive metadata. Metadata includes token identifier, card art identifiers, issuer information, and PAN last digits.</td></tr></tbody></table>

### API

* API reference: [Create token](/merchant-tokenization/backend-integration/apis/server-api/token-management.md#post-tokens)

### Best practices

* Expect tokenization to take 1–3 seconds.
* For a first-time checkout, consider authorizing the first transaction using PAN.
* Run Tokenization in parallel in the background.

## Asynchronous tokenization flow

Use asynchronous tokenization when performing large-scale tokenization on an existing COF base with many cards. Thales backend processes the request asynchronously.

### 1. Submit an async token creation request

<figure><img src="/files/EDPZ5YRaYVXAVLUvb6DM" alt=""><figcaption><p>Async token creation request flow</p></figcaption></figure>

| Step | Description                                                                                                          |
| ---- | -------------------------------------------------------------------------------------------------------------------- |
| 1–2  | The merchant or PSP sends encrypted card details (FPAN, expiry date) to Thales backend.                              |
| 3    | Thales backend acknowledges the request.                                                                             |
| 4    | Thales backend requests token creation from the payment network TSP. Additional steps are payment-network dependent. |
| 5    | The payment network TSP requests issuer approval.                                                                    |

#### API

* API reference: [Create async token](/merchant-tokenization/backend-integration/apis/server-api/token-management.md#post-async-tokens)

### 2. Handle the token creation notification

<figure><img src="/files/tR0KFdzQJplUh5AmxQXL" alt=""><figcaption><p>Async token creation notification flow</p></figcaption></figure>

| Step | Description                                                                                                                                                                                                   |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 6    | When the token is created and active, the payment network TSP informs Thales backend.                                                                                                                         |
| 7    | Thales backend notifies the merchant or PSP. Include the correlation identifier. Return only non-sensitive metadata, such as token identifier, card art identifiers, issuer information, and PAN last digits. |
| 8    | The merchant or PSP can start using the token for payments.                                                                                                                                                   |

#### API

* Callback reference: [Notify token creation](/merchant-tokenization/backend-integration/apis/client-api/token-management.md#post-notify-token-creation)

### Best practices

* For batch Tokenization, balance requests across multiple issuer BINs.
* Avoid traffic spikes toward a single issuer.

## Token ID behavior by payment network

`tokenId` generation varies by payment network:

* Mastercard generates a new `tokenId` for each Tokenization request.
* Visa reuses the same `tokenId` for the same `merchantId`, card data, and `accountId`.
* American Express reuses the same `tokenId` for the same `merchantId`, card data, `accountId`, and email.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/merchant-tokenization/network-tokenization/implement-network-tokenization/create-a-token.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
