---
page_title: Delete Token API
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/tokenization-apis/delete-token-api
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Ftokenization-apis%2Fdelete-token-api
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/api-reference/llms.txt
---

## API Version: default


# Delete Token API 



This API handles the deletion of the token## Endpoints:
- Sandbox: https://sandbox.juspay.in/v4/card/delete

- Production: https://api.juspay.in/v4/card/delete

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string

Example:-Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Value:  Base 64 Encoding
- Tags: required, Mandatory
## Headers:

#### content-type:
application/json
- Tags: String, Mandatory

#### x-routing-id:
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.

> **Warning**
> This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.


- Value: customer_1122
- Tags: String, Required
## Sample Code Snippets:
### Sample Request:

#### Request cURL Code Snippet:

```request curl
curl --location --request POST 'https://sandbox.juspay.in/v4/card/delete' \
--header 'Authorization: Basic <Base 64 encoded of API key>' \
--header 'x-routing-id: customer_1122'\
--header 'Content-Type: application/json' \
--data-raw '{"card_reference":"card_reference_values_goes_here","customer_id": "customer_id_value_goes_here"}'

```

### Sample Response:

#### Success Response:
```json
	{
	  "status" : "SUCCESS"
  }

```

#### Failure Response :
```json
{
  "error": true,
   "error_message": "INVALID_REQUEST",
   "user_message": "card_reference or customer_id is invalid"
}

```

## Body Parameters:
### Parametres:

#### card_reference:
- Description: card_reference_values_goes_here
- Value: value
- Tags: String, Mandatory

#### customer_id:
- Description: customer_id_value_goes_here
- Tags: String, Mandatory
## API Responses:
### 200:

#### status:
- Value:  SUCCESS
- Tags: String, Mandatory
### 400:

#### error:
- Value:  error_message
- Tags: true, Mandatory

#### error_message:
- Tags: INVALID_REQUEST, Mandatory

#### user_message:
- Tags: card_reference or customer_id is invalid, Mandatory


---

## See Also

- [Understanding Alt ID Generation](https://juspay.io/in/docs/api-reference/docs/tokenization-apis/understanding-alt-id-generation)
- [Introduction : VAN](https://juspay.io/in/docs/api-reference/docs/virtual-account--ecollect/introduction--van)
