Tokens
List or delete a customer's saved card tokens.
Use this API to display a customer's saved cards in your checkout UI, or to honor a customer's request to remove a stored payment method.
If a request returns error_codes: ["forbidden"], the request is being blocked at the account or network level rather than rejected for being malformed. Verify your IP/network is allowlisted for your merchant account and retry.
The LIST sample below uses the same c_token created via Tokenization — Pay + Save on the Payment page, so you can see it appear in LIST. The DELETE sample further below uses a separate token.
Endpoint
| Method | POST |
| Path | /cards/tokens |
| Sandbox | https://sandbox.simpaisa.com/cards/tokens |
Headers
| Header | Value |
|---|---|
client-id | Your Client ID (e.g. YOUR_CLIENT_ID) |
Content-Type | application/json |
merchantId | Your unique merchant ID (e.g. YOUR_MERCHANT_ID) |
mode | cards |
region | PK |
version | V5 |
Request Body
| Parameter | Required | Description |
|---|---|---|
request.apiOperation | Yes | LIST to retrieve all active saved cards, or DELETE to remove a specific card |
request.customer_id | Yes | The cref_ value identifying the customer — nested under request, not top-level |
request.c_token | Only for DELETE | The c_token value to delete |
signature | Yes | RSA signature of the request object |
Response Body
LIST
| Parameter | Description |
|---|---|
response.customer_id | The cref_ queried |
response.count | Number of active tokens returned |
response.tokens[].c_token | Saved card token |
response.tokens[].card_scheme | e.g. Visa |
response.tokens[].last_four | Last 4 digits of the card |
response.tokens[].expiry_month | Card expiry month |
response.tokens[].expiry_year | Card expiry year |
response.tokens[].status | ACTIVE |
response.tokens[].created_on | ISO timestamp the token was created |
signature | RSA signature of the response body |
DELETE
| Parameter | Description |
|---|---|
response.customer_id | The cref_ the token belonged to |
response.c_token | The deleted token |
response.status | DELETED |
response.response_summary | e.g. "Card removed successfully." |
signature | RSA signature of the response body |
Samples
- LIST
- DELETE
Request
curl --location 'https://sandbox.simpaisa.com/cards/tokens' \
--header 'client-id: YOUR_CLIENT_ID' \
--header 'merchantId: YOUR_MERCHANT_ID' \
--header 'mode: cards' \
--header 'region: PK' \
--header 'version: V5' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"apiOperation": "LIST",
"customer_id": "cref_1f330571755c11f18b1702eb53"
},
"signature": "AUTOGENERATED"
}'
Response
{
"response": {
"customer_id": "cref_1f330571755c11f18b1702eb53",
"count": 1,
"tokens": [
{
"c_token": "ct_v1_c0091c45-a7ff-4728-88ee-834b284848fc",
"card_scheme": "Visa",
"last_four": "1111",
"expiry_month": "03",
"expiry_year": "2030",
"status": "ACTIVE",
"created_on": "2026-07-01T14:50:53Z"
}
]
},
"signature": "YOUR_SIGNATURE"
}
Note this c_token (ct_v1_c0091c45-a7ff-4728-88ee-834b284848fc) and customer_id (cref_1f330571755c11f18b1702eb53) are the exact same values from the Tokenization — Pay + Save and Direct Charge samples, and the Capture Successful / Successful Tokenization Inquiry Inquiry samples — confirming the full lifecycle (create → charge/capture → direct-charge → list) on one real token.
Request
curl --location 'https://sandbox.simpaisa.com/cards/tokens' \
--header 'client-id: YOUR_CLIENT_ID' \
--header 'merchantId: YOUR_MERCHANT_ID' \
--header 'mode: cards' \
--header 'region: PK' \
--header 'version: V5' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"apiOperation": "DELETE",
"c_token": "ct_v1_3487cd6d-e702-406d-9734-99b1edd94599",
"customer_id": "cref_078a0c7774a811f18b1702eb53"
},
"signature": "AUTOGENERATED"
}'
Response
{
"response": {
"customer_id": "cref_078a0c7774a811f18b1702eb53",
"c_token": "ct_v1_3487cd6d-e702-406d-9734-99b1edd94599",
"status": "DELETED",
"response_summary": "Card removed successfully."
},
"signature": "YOUR_SIGNATURE"
}
After deletion, the token no longer appears in LIST responses. Attempting directcharge against a deleted c_token returns error_codes: ["token_does_not_exist"] — Simpaisa does not distinguish "deleted" from "never existed" (see Errors).