Post Checkout and Charge Request
Used to initiate a checkout and charge request after the customer has provided information about the product or service they wish to acquire.
POST https://developer.tingg.africa/checkout/v2/custom/requests/checkout-charge
This step combines both step 2. and step 3 and is useful when the payment option (payerModeID) is predefined by the merchant.
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 identifier of the request for payment | TRUE |
currencyCode | string | Currency of the amount to be collected | TRUE |
requestAmount | double | Merchant amount to be collected. | TRUE |
countryCode | string | The ISO 3166-1 alpha-2 code of the country you wish to collect payment for. The country code ensures we present valid payment options available in that particular country. | TRUE |
currencyCode | string | The currency the amount passed is in | TRUE |
accountNumber | string | A unique reference number identifying the customer's account | TRUE |
serviceCode | string | Merchant's service code. This can be found here. | TRUE |
dueDate | string | Time window a customer should complete making a payment. If not passed passed time defaults to 12 hours. Date format is YYYY-MM-DD hh:mm:ss . | TRUE |
requestDescription | string | Shows the description of the item being purchased. | FALSE |
customerFirstName | string | Customer first name | FALSE |
customerLastName | string | Customer last name | FALSE |
MSISDN | string | Customer's phone number formatted as given in the E.164 phone numbering. | TRUE |
customerEmail | string | Customer email | FALSE |
payerModeID | integer | This is a number representing the payment option client and the mode in use e.g. using a mobile money client paying via STK push. This will be provided as part of the payment options | TRUE |
paymentWebhookUrl | string | A server to server URL endpoint that will be called to notify a merchant of a complete payment. | TRUE |
languageCode | string | This is a two digit code in which the available instructions will be provided. | TRUE |
extraData | JSON | Additional data specific to a client"s application | FALSE |
Example
{
"merchantTransactionID" : "<unique_transaction_id>",
"requestAmount" : 100.50,
"currencyCode" : "KES",
"accountNumber" : "ACC12345",
"serviceCode" : "TESTSERVICE",
"dueDate" : "0000-00-00 00:00:00",
"requestDescription" : "Getting service/good x",
"countryCode" : "KE",
"customerFirstName" :"John",
"customerLastName" : "Smith",
"MSISDN" : "<valid_mobile_number>",
"customerEmail" : "[email protected]",
"paymentWebhookUrl" : "https://my.url.com/webhook/receive",
"payerModeID": "",
"languageCode":"en",
"extraData": {
"bundleID": "30GB"
}
}
Response Parameters
Parameter Name | Type | Description |
---|---|---|
statusCode | integer | Request status code. 200 - Checkout request status fetched successfully from the checkout platforms 500 - Generic failure occurred. Could be as a result of a system failure on the checkout platform 1007 - Missing countryCode .1013 - The checkout request posted was not valid JSON 1014 - Missing merchantTransactionID .1015 - Missing checkoutRequestID .1017 - Invalid charge MSISDN provided.1019 - Missing or invalid customerEmail 1020 - Missing dueDate 1027 - Invalid amount provided. The chargeAmount should be between the minimum and maximum amounts provided for the payment option. |
statusDescription | string | Description of the transaction status. |
checkoutRequestID | integer | The unique request identifying the transaction logged in the checkout platform. |
merchantTransactionID | 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. |
paymentInstructions | string | Instructions to provide to the customer on how to make a payment. |
paymentOptions | JSON Array | A list of payment options available for the service selected. More information on the option parameters can be found under Fetch Payment Options. |
chargeResults | string | Containing details of the results of the request being processed. |
languageCode | string | A two letter code representing the language that the instructions are in. |
chargeMsisdn | integer | The charge mobile number provided earlier in the request. |
chargeAmount | integer | The charge amount as was provided earlier in the request. |
chargeRequestDate | string | The date and time in which the charge request was logged. This will be in UTC time. |
Example
Updated 12 months ago