Delete Card Token API
In this page, you will learn how to delete pre-generated Card Tokens.
Delete Card Token API
To test your Delete Card Token API, you need to request using the POST method in our sandbox environment.
-Here is the request URL:
https://sandbox-cashierapi.opaycheckout.com/api/v1/international/token/delete
-Once you have a fully tested payment flow and you are ready for production, Use the following production API endpoint URL instead
https://cashierapi.opaycheckout.com/api/v1/international/token/delete
-Request Parameters:
- Header: Bearer and private key Signature
- Json object containing the information:
Authorization: "Bearer" + private key signature
MerchantId : 256612345678901
{
"opayToken": "xxx"
}
HTTP POST Parameters
-Here is a detailed description for the parameters you need to complete the POST request:
Delete Card Token Response
-Response Parameters:
the parameters contained in the response received whenever you call the API as a JSON Object.
{
"code":"00000",
"message":"SUCCESSFUL",
"data":null
}
-Here is a detailed description for the parameters received in the response:
Parameter | type | Description | example |
---|---|---|---|
code | String |
Response Code. | 00000 |
message | String |
Response Description. | SUCCESSFUL |
Error Handling
After submitting an API call to OPay, you receive a response back to inform you that
your request was received and processed. A successful OPay API should return a status code 00
,
meanwhile, in a situation where any payment processing error occurred, you will receive an error code with a
message to describe the reason of the error. A sample error response can be found below.
{
"code": "20000",
"message": "Duplicate merchant order number",
"data": null
}
Depending on the HTTP status code of the response, you should build some logic to handle any errors that a request or the system may return. A list of possible potential error codes that you may receive can be found below. A full list of all possible error codes can be found in the Error Codes section.
Error Code | Error Message |
---|---|
09 | Time out. |
90 | System failure. |
91 | Refund error, please try again later. |
96 | Search order error, please try again later. |
97 | Create checkout session failed. |
98 | Invalid request header with requestId. |
99 | Request channel parameters are not valid. |
20000 | Duplicate merchant order number. |