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

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

Request Parameters

Parameter NameTypeDescriptionRequired
merchantTransactionIDstringUnique identifier of the request for paymentTRUE
currencyCodestringCurrency of the amount to be collectedTRUE
requestAmountdoubleMerchant amount to be collected.TRUE
countryCodestringThe 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
currencyCodestringThe currency the amount passed is inTRUE
accountNumberstringA unique reference number identifying the customer's accountTRUE
serviceCodestringMerchant's service code. This can be found here.TRUE
dueDatestringTime 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
requestDescriptionstringShows the description of the item being purchased.FALSE
customerFirstNamestringCustomer first nameFALSE
customerLastNamestringCustomer last nameFALSE
MSISDNstringCustomer's phone number formatted as given in the E.164 phone numbering.TRUE
customerEmailstringCustomer emailFALSE
payerModeIDintegerThis 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 optionsTRUE
paymentWebhookUrlstringA server to server URL endpoint that will be called to notify a merchant of a complete payment.TRUE
languageCodestringThis is a two digit code in which the available instructions will be provided.TRUE
extraDataJSONAdditional data specific to a client"s applicationFALSE

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 NameTypeDescription
statusCodeintegerRequest 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.
statusDescriptionstringDescription of the transaction status.
checkoutRequestIDintegerThe unique request identifying the transaction logged in the checkout platform.
merchantTransactionIDstringThe unique transaction ID from merchant's system identifying the request.
chargeRequestIDintegerA unique identifier for the charge request as stored on our database.
paymentInstructionsstringInstructions to provide to the customer on how to make a payment.
paymentOptionsJSON ArrayA list of payment options available for the service selected. More information on the option parameters can be found under Fetch Payment Options.
chargeResultsstringContaining details of the results of the request being processed.
languageCodestringA two letter code representing the language that the instructions are in.
chargeMsisdnintegerThe charge mobile number provided earlier in the request.
chargeAmountintegerThe charge amount as was provided earlier in the request.
chargeRequestDatestringThe date and time in which the charge request was logged. This will be in UTC time.

Example