---
title: "Tokenise a Payment Card"
slug: "tokenise-a-payment-card"
updated: 2024-12-02T08:02:33Z
published: 2024-12-02T08:02:33Z
canonical: "docs.apcopay.com/tokenise-a-payment-card"
---

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

# Tokenise a Payment Card

### Payment Card Tokenisation Overview ### 
Payment card tokenisation is the process of substituting a card's Primary Account Number (PAN) with a randomly generated number, known as a token. This token acts as a unique identifier and cannot be traced back to the original card data, providing enhanced security for transactions. Tokenisation is a key component of payment security and can be applied not only to credit cards but also to debit cards and digital wallets.

For more detailed information on card tokenisation, you can refer to the following [resource].

:::(Warning) (PCI Compliance)
If you achieve **SAQ D PCI** certification, you can utilize the following endpoint to create a card token.

For those without this level of PCI certification, we recommend us our [hosted payment page](/v1/docs/accept-a-payment-on-a-hosted-payment). The card token will be sent as part of callback notification on a succesful payment.
:::

### Card Tokenisation API ###

#### Creating a Token ####

To tokenise a card, use the endpoint provided below. The following details must be included in your request:

* Cardholder Name
* Card Number
* Expiry Month
* Expiry Year

Optionally, you may also pass the `ClientAccount` parameter to associate the tokenised card with a specific client account.

Once processed, the card will be tokenised, and any associated client account will be linked to the generated token.

**Endpoint**

<div style="display: flex; justify-content: space-between; align-items: center; border: 1px solid #e0e0e0; padding: 10px; background-color: #f5f5f5;">
    <strong style="background-color: #1F5CA6; color: #fff; padding: 5px; border-radius: 3px;">POST</strong>
    <strong style="margin-left: 10px; flex: 1;">/api/cards/tokenise</strong>
    <a href="https://apcopay.redoc.ly/#operation/SetTokeniseCard" target="_blank" style="margin-left: 10px;">Try it here</a>
</div>


#### Retrieving a Token #### 

To retrieve the details of a tokenised card, use the following endpoint. The card token is a required parameter in the request. This will allow you to access the information linked to the tokenised card securely.

**Endpoint**
<div style="display: flex; justify-content: space-between; align-items: center; border: 1px solid #e0e0e0; padding: 10px; background-color: #f5f5f5;">
    <strong style="background-color: #1F5CA6; color: #fff; padding: 5px; border-radius: 3px;">GET</strong>
    <strong style="margin-left: 10px; flex: 1;">/api/cards/tokens/{cardToken}</strong>
    <a href="https://apcopay.redoc.ly/#operation/GetTokenisedCards" target="_blank" style="margin-left: 10px;">Try it here</a>
</div>

#### Deleting a Token #### 

You can delete a tokenised card by using the endpoint provided below. The card token is a required parameter for this action. Once processed, the token will be permanently removed, and all associated card details will be securely deleted.

**Endpoint**
<div style="display: flex; justify-content: space-between; align-items: center; border: 1px solid #e0e0e0; padding: 10px; background-color: #f5f5f5;">
    <strong style="background-color: #1F5CA6; color: #fff; padding: 5px; border-radius: 3px;">DELETE</strong>
    <strong style="margin-left: 10px; flex: 1;">/api/cards/tokenise</strong>
    <a href="https://apcopay.redoc.ly/#operation/DeleteTokenisedCards" target="_blank" style="margin-left: 10px;">Try it here</a>
</div>
</br>
