Block a Token
Blocking a token stops it from being an active token and can not be used for any further payments. Block a token when:
- The customer removes the saved card from their account,
- The customer closes their account with you,
- You suspect that the token or the customer's account has been compromised.
To use the same card again after blocking its token, the customer saves it again, as described in Enable & Save a Card. This issues a new token.
Block the token
API Endpoint
POST https://uat-sandbox-3ds-api.qi.iq/api/v1/token/{token}/block
Path parameters
| Name | Type | Description | Required |
|---|---|---|---|
token | String | The payment token to block: the same value you send as paymentData.paymentToken when paying with the token. | Yes |
Headers
| Name | Value | Required |
|---|---|---|
X-Terminal-Id | The ID of the Merchant Terminal. Provided by the Acquirer. | Yes |
Authorization | Basic followed by your Base64-encoded credentials. See Basic Auth. | Yes |
Content-Type | application/json | Yes |
Accept | application/json | Yes |
CURL Example
curl --location '<API_HOST>/api/v1/token/{token}/block' \
--header 'X-Terminal-Id: {terminalId}' \
--header 'Authorization: Basic <Base64<username:password>>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"requestId": "<GUID>"
}'
Request Body
Media type: application/json
{
"requestId": "3c9e7b15-2a4d-4e6f-8b1c-7d5a9e3f2c80"
}
Request body fields
| Field | Type | Description |
|---|---|---|
| requestId | string required | A unique identifier generated by the Merchant's side. It must be ensured that the RequestId remains unique within the context of each Merchant Terminal to prevent duplication or conflicts. |
Error Response
If the request fails, the response contains the standard error object. For example, when the token does not exist:
{
"error": {
"code": 31,
"description": "TOKEN_NOT_FOUND"
}
}
The token-related codes are explained in Token error codes.
After blocking
- Remove the token from your records, or mark it as blocked, so that your systems stop offering or charging it.
- Cancel any recurring payments you scheduled with the token.
- If the customer still wants to pay by card, ask them to save the card again to get a new token.
Next: Tokenization reference →