Validate Charge Request
Used by merchants to authorize a charge request that was created using the Post Charge Request endpoint.
Before you Proceed...
This function is mainly used for Orange Ivory Coast which uses the voucher code for authorization
POST https://developer.tingg.africa/checkout/v2/custom/requests/validate-charge
Validate charge requires a voucher code that is generated from the payment channel to authorize a debit on the customer’s wallet.
The validate charge request does the following:
- Retrieves the charge request posted and attaches the validation token to it.
- Posts the validation request with the validation token to the payment channel to authorize the charge request made earlier.
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 |
---|---|---|
merchantTransactionID | string | The unique transaction ID from the merchant's system identifying the request that was previously initiated on the post checkout request leg. |
checkoutRequestID | integer | A unique transaction ID identifying the transaction logged in the checkout platform. |
chargeRequestID | integer | The identifier for the charge request posted. |
validationToken | string | A string generated by the payment channel that will be used to authorize debits on the customer’s account. |
Example:
{
"merchantTransactionID" : "<your_unique_id>",
"checkoutRequestID" : "<checkout_request_id>",
"chargeRequestID" : "<id_from_post_charge_request>",
"validationToken" : "123456"
}
Response Parameters
Parameter Name | Type | Description |
---|---|---|
statusCode | integer | Request status code. 200 - Checkout request status fetched successfully from the checkout platform. 500 - Generic failure occurred. Could be as a result of a system failure on the checkout platform. 1001 - No checkout request found. 1013 - The checkout request posted was not valid JSON 1014 - Missing merchant transaction ID. 1015 - Missing checkout request ID. |
statusDescription | string | Description of the transaction status. |
checkoutRequestID | integer | The unique request identifying the transaction logged in the checkout platform. |
merchantRequestID | string | The unique transaction ID from merchant's system identifying the request. |
chargeRequestID | integer | A unique identifier for the charge request as stored on our database. |
postValidationInstructions | string | Instructions to provide to the customer on how to authorize the payment |
Example
Successful Response
{
"status": {
"statusCode": 200,
"statusDescription": "Successfully validated the charge request"
},
"results": {
"checkoutRequestID": "4811205",
"merchantTransactionID": "MTX2141925",
"chargeRequestID": 4415751,
"postValidationInstructions": "Please click on the complete button below to confirm that the payment has been made"
}
}
Failure Response
{
"status": {
"statusCode": 1014,
"statusDescription": "The merchant transaction id field is required."
},
"results": null
}
Authentication Failure Response
{
"message": "Unauthenticated.",
"status_code": 500
}
Updated about 1 year ago