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:

  1. Retrieves the charge request posted and attaches the validation token to it.
  2. Posts the validation request with the validation token to the payment channel to authorize the charge request made earlier.

Header Parameters

HeaderValueRequired
AuthorizationBearer <Bearer_Token> generated during authenticate request in step 1.YES
Content-Typeapplication/jsonYES

Request Parameters

Parameter NameTypeDescription
merchantTransactionIDstringThe unique transaction ID from the merchant's system identifying the request that was previously initiated on the post checkout request leg.
checkoutRequestIDintegerA unique transaction ID identifying the transaction logged in the checkout platform.
chargeRequestIDintegerThe identifier for the charge request posted.
validationTokenstringA 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 NameTypeDescription
statusCodeintegerRequest 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.
statusDescriptionstringDescription of the transaction status.
checkoutRequestIDintegerThe unique request identifying the transaction logged in the checkout platform.
merchantRequestIDstringThe unique transaction ID from merchant's system identifying the request.
chargeRequestIDintegerA unique identifier for the charge request as stored on our database.
postValidationInstructionsstringInstructions 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
}