Cancel Request
Allows a merchant to cancel a checkout request that was initiated earlier and is still active.
A request can only be cancelled if:
- It has not expired yet.
- Full payment has not yet been received for the request i.e. no payment has been received or a partial payment has been received
POST https://developer.tingg.africa/checkout/v2/custom/requests/cancel
The cancel request function does the following:
- Changes the status of the request to the one provided by the merchant.
- Updates any payments tied to the request to a rejected state. This will result in further action i.e. reversal of the rejected payment(s) to the customer.
Header Parameters
Header | Value | Required |
---|---|---|
Authorization | Bearer <Bearer_Token> generated during authenticate request in step 1. | YES |
Content-Type | application/json | YES |
Request Parameters
Parameter Name | Type | Description | Required |
---|---|---|---|
merchantTransactionID | string | Unique transaction ID identifying the transaction as given by the merchant. | TRUE |
serviceCode | string | Unique code identifier for the merchant's service in use as provided on the checkout platform. | TRUE |
checkoutRequestID | integer | Unique transaction ID identifying the transaction as provided by the checkout platform. | FALSE |
{
"merchantTransactionID":"MTX5241435",
"serviceCode":"TEST-SERVICE",
"checkoutRequestID": 12345
}
Response Parameters
Parameter Name | Type | Description |
---|---|---|
statusCode | integer | A status indicating the result of payment processing. 133 - Request has already been cancelled 200 - Request processed successfully. 500 - Generic failure occurred. Could be as a result of a system failure on the Tingg checkout platform. 1001 - No checkout request found. 1013 - The checkout request posted was not valid JSON. 1014 - Missing merchantTransactionID .1017 - Missing serviceCode . |
statusDescription | string | A description of the status provided above. |
checkoutRequestID | in 1013teger | Unique transaction ID identifying the transaction as provided by the Tingg checkout platform. |
merchantTransactionID | string | Unique transaction ID identifying the transaction as given by the merchant. |
requestStatusCode | integer | Status of the payment received 131 - The request with no partial payments was cancelled by the merchant without any payments received. 181 - The request with partial payments was cancelled by the merchant without payments received on it. |
Examples
Successful Response
{
"status": {
"statusCode": 200,
"statusDescription": "Successfully processed request"
},
"results": {
"checkoutRequestID": 407141,
"merchantTransactionID": "id_5241435",
"requestStatusCode": 133
}
}
Failure Response
{
"status": {
"statusCode": 1001,
"statusDescription": "Checkout request not available"
},
"results": null
}
Authentication Failure Response
{
"message": "Unauthenticated.",
"status_code": 500
}
Updated 12 months ago