Skip to main content
Version: Lastest

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

ParamRequiredTypeDescriptionNote
X-APPOTAPAY-AUTHrequiredString How to generate JWT_TOKEN
Content-TyperequiredStringValue: application/json
X-Request-IDoptionalStringUUIDv4 format. Request ID to check when a problem occursmax:42
LanguageoptionalStringThe value vi or en corresponding to the payment link will be Vietnamese or English, (default: vi)

in:vi,en

X-Account-Ref-IDoptionalString

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

ParametersRequirementData typeDescriptionNote
tokenIdrequiredStringID of the AppotaPay token you wish to delete.Min:1 Max: 32

URL Query

ParametersRequirementData typeDescriptionNote
merchantRefIdrequiredStringID you can assign to the DELETE Token request, if you wishMin:1 Max: 40

Example Request

{
"merchantRefId": "9IzaassK2"
}

Response Params

{
"tokenId": "01hqhr4qqnk66d7tg3pk5md08c",
"merchantRefId": "9IzaassK2",
"isDeleted": true
}

Success

Http Status Code 200 - OK

ParametersData typeDescriptionNote
tokenIdStringID of the token submitted for deletion.
merchantRefIdStringID assigned to the DELETE Token request, if added
isDeletedStringIndicates 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