Token Delete
An API is used for deleting AppotaPay Tokens. Deletes any information associated with the Token in AppotaPay’s database
EndPoint
DELETE
/credit-card/token/:tokenId
Header Params
Param | Required | Type | Description | Note |
---|---|---|---|---|
X-APPOTAPAY-AUTH | required | String | How to generate JWT_TOKEN | |
Content-Type | required | String | Value: application/json | |
X-Request-ID | optional | String | UUIDv4 format. Request ID to check when a problem occurs | max:42 |
Language | optional | String | The value vi or en corresponding to the payment link will be Vietnamese or English, (default: vi) | in:vi,en |
X-Account-Ref-ID | optional | String | Iidentifier of the sub account provided by AppotaPay. Mandatory be passed over when processing payment for transactions of owner-type sub account |
{
"X-APPOTAPAY-AUTH": "JWT_TOKEN",
"Content-Type": "application/json",
"X-Request-ID": "Your_Unique_id",
"Language": "vi",
"X-Account-Ref-ID": "9723f73b-9295-4acb-884b-ab6310c2e653"
}
Request Params
URL Parameters
Parameters | Requirement | Data type | Description | Note |
---|---|---|---|---|
tokenId | required | String | ID of the AppotaPay token you wish to delete. | Min:1 Max: 32 |
URL Query
Parameters | Requirement | Data type | Description | Note |
---|---|---|---|---|
merchantRefId | required | String | ID you can assign to the DELETE Token request, if you wish | Min:1 Max: 40 |
Example Request
{
"merchantRefId": "9IzaassK2"
}
Response Params
{
"tokenId": "01hqhr4qqnk66d7tg3pk5md08c",
"merchantRefId": "9IzaassK2",
"isDeleted": true
}
Success
Http Status Code
200
-OK
Parameters | Data type | Description | Note |
---|---|---|---|
tokenId | String | ID of the token submitted for deletion. | |
merchantRefId | String | ID assigned to the DELETE Token request, if added | |
isDeleted | String | Indicates if the token is deleted. Available values: true : token is successfully deleted.false : while this is a possible value when the DELETE request has issues, it is unlikely to be returned as AppotaPay will return the appropriate error response instead. |
Error
HTTP Status Code !=
200