---
description: >-
  Invalidates a previously generated card identifier, preventing its future use
  for transactions.
---

# Delete Card Token Endpoint



## Invalidate a Card Token

> Invalidates a previously generated card token, preventing its future use for transactions

OpenAPI:

```json
{"openapi":"3.0.0","info":{"title":"Card Token Invalidation API","version":"3.0.0"},"servers":[{"url":"https://cc-api-stg.directa24.com","description":"Staging server"}],"paths":{"/v3/tokenization/{card_identifier}":{"delete":{"summary":"Invalidate a Card Token","description":"Invalidates a previously generated card token, preventing its future use for transactions","parameters":[{"name":"card_identifier","in":"path","required":true,"description":"The unique card token to invalidate","schema":{"type":"string"}},{"name":"Content-Type","in":"header","required":true,"description":"Media type of the body sent to the API","schema":{"type":"string","default":"application/json"}},{"name":"X-Date","in":"header","required":true,"description":"ISO8601 Datetime with Timezone (yyyy-MM-dd'T'HH:mm:ssZ)","schema":{"type":"string","format":"date-time"}},{"name":"X-Login","in":"header","required":true,"description":"Merchant X-Login API Key","schema":{"type":"string"}},{"name":"X-Idempotency-Key","in":"header","required":false,"description":"Unique idempotency key for ensuring that the same request is not processed more than once","schema":{"type":"string"}}],"security":[{"ApiAuth":[]}],"responses":{"204":{"description":"Card token successfully invalidated","content":{}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","enum":[511,512]},"description":{"type":"string"}}}}}},"404":{"description":"Token not found","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"description":{"type":"string"}}}}}}}}}},"components":{"securitySchemes":{"ApiAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Authorization control hash"}}}}
```

***

## Request

### Path Parameters

| Parameter         | Type   | Required | Description                              |
| ----------------- | ------ | -------- | ---------------------------------------- |
| `card_identifier` | String | Yes      | The unique card identifier to invalidate |

***

## Response

### Success Response (204 OK)

The endpoint will return a **`204`** code, with no content, in case of successfully deleting the requested `card_identifier`&#x20;

***

## Error Responses

| HTTP Status | Error Code | Description         |
| ----------- | ---------- | ------------------- |
| 404         | 510        | Token not found     |
| 401         | 511        | Token expired       |
| 401         | 512        | Unauthorized access |

### Error Response Example

```json
{
    "code": 510,
    "description": "Token not found"
}
```

***

## Integration Example

### cURL Example

```bash
curl -X DELETE https://cc-api-stg.directa24.com/v3/tokenization/CID-2210908e-6d8e-468d-9eb3-d551e8b541a0 \
  -H "Content-Type: application/json" \
  -H "X-Date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
  -H "X-Login: YOUR_X_LOGIN_API_KEY" \
  -H "Authorization: YOUR_AUTHORIZATION_HASH" \
  -i
```

***

## Common Use Cases

1. **Subscription cancellation**: Invalidate the identifier when a customer cancels their subscription
2. **Card replacement**: Invalidate old identifiers when a customer updates their payment method
3. **Fraud prevention**: Invalidate identifiers associated with suspected fraudulent activity
4. **Account closure**: Remove all payment information when a customer closes their account
5. **Compliance**: Adhere to data retention policies by removing unnecessary payment data

***

## Notes

* Once an identifier is invalidated, it cannot be reactivated
* Any attempt to use an invalidated identifier for transactions will result in an error
* Only identifiers that belong to your merchant account can be invalidated
* We recommend keeping track of invalidated identifiers in your system to avoid future usage attempts
