4. Query Request Status

POST https://checkout.tingg.africa/checkout-translation-service/custom/requests/query-status

This function is a subset of the callback functionality, where a payment is sent to the merchants callback, and can be used to prematurely query for the status i.e. check for request status before the full payment is done.

Header Parameters

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

Request Parameters

Parameter NameTypeDescriptionRequired
merchantTransactionIDstringThe unique transaction ID from the merchant's system identifying the request that was previously initiated on the post checkout request step.TRUE
serviceCodestringMerchant's service code. This can be found here.TRUE
checkoutRequestIDstringA unique transaction ID identifying the transaction logged in the checkout platformFALSE

Example

{
	"merchantTransactionID":"id_4148655",
	"serviceCode":"<YOUR_SERVICE_CODE>",
	"checkoutRequestID":""
}

Response Parameters

Parameter NameTypeDescription
statusCodeintegerA code providing information about the processing status of the request. See a full list of the status codes with descriptions below.
200 - Success.
500 - Generic failure occurred. Could be as a result of a system failure on the Tingg checkout platform.
1001 - No checkout request found matching the details.
1013 - Not JSON. The checkout request posted was not valid JSON.
1014 - Missing merchant transaction ID. The request did not have a merchantTransactionID.
1015 - Missing checkout request ID.The request did not have a checkoutRequestID.
statusDescriptionstringMore information regarding the status of processing.
checkoutRequestIDlongThe unique request identifying the transaction logged in the checkout platform
merchantTransactionIDstringThe unique transaction ID from merchant's system identifying the request
requestStatusCodeintegerA code identifying the status of the request i.e paid, unpaid expired etc. A list of available status codes will be provided below
129 - Request has expired with no partial payment received.
130 - New request raised by the merchant.
177 - Partial payment made for the request.
178 - Full payment made for the request.
179 - Request has expired with one or more partial payments made. The partial payment(s) will be reversed.
180 - Request Fully paid for but acknowledged as rejected by the merchant.
183 - Request fully paid for but acknowledged as accepted by the merchant.
188 - The payment was received by the merchant. An accept/reject call will be initiated later by merchant.
184 - This is indicates that a refund of part of the request amount has been initiated.
185 - This is indicates that full refund the request amount has been initiated.
186- This is indicates that the part refund for the request was successfully processed.
187 - This is indicates that the full refund for the request was successfully processed.
MSISDNintegerThe mobile number that the checkout request was originally initiated with.
serviceCodestringA unique code identifier for the merchant's service in use as provided on the checkout platform.
serviceNamestringService description offered by the merchant
accountNumberstringAn identifier for the account being paid for as posted in the checkout initiation leg.
amountPaidintegerThis is the total amount paid for at the time of fetching the checkout request status. More details of the payments can be found in the payments array as will be provided below.
requestAmountdoubleThe amount that the merchant needed to charge the customer for items selected on their platform
paymentCurrencyCodestringThe currency code used in the transaction.
requestCurrencyCodestringThe currency code used in the transaction request.
requestDatestringThe date in which the checkout request was logged onto the checkout platform.
sessionstringSession value provided for multiple payment session. Unique per merchant implementations
redirectURLstringRedirect URL provided for a specific payment session
Unique per merchant implementations
shortUrlstringA short URL that redirects to the express checkout that may be used to retrieve the request.
paymentsarrayA list of individual payments made for the checkout request. Details of what is contained in a payment payload are given below
failedPaymentsarrayA list of individual payments that may have been attempted for the checkout request but failed
rejectedPaymentsarrayA list of individual payments that may have been attempted for the checkout request but were rejected
paymentInstructionsStringInstructions to provide to the customer on how to make a payment
offlinebooleanTransaction can be paid offline

The payments/failedPayments/rejectedPayments array holds a list of payments that have been made for the current request.

Parameter NameTypeDescription
payerClientCodestringUnique code of the payment option on the Tingg checkout platform
payerTransactionIDstringUnique payment reference provided by the payment option ie MPESA reference
amountPaiddoubleAmount paid / authorized by the customer
amountPaidInOriginalCurrencydoubleAmount the customer paid in original currency code (requestCurrencyCode)
requestCurrencyCodestringCurrency code that the merchant sent in their original request.
clientNamestringName of the originating payer client.
MSISDNstringMobile number used to complete the payment
cpgTransactionIDintegerUnique transaction id on the Cellulant Payment Gateway
currencyCodestringCurrency code which the customer was charged in by the payment option
paymentDatestringThe date in which the payment was logged onto the Cellulant payment gateway.
clientCategoryIDintegerThe category ID of the payment originating clients.
clientCategoryNamestringThe category name of the payment originating clients.
extraDatastringContains extra parameters based on the type of payment made.

Examples

Successful Response

{
    "status": {
        "statusCode": 200,
        "statusDescription": "Successfully processed request"
    },
    "results": {
        "checkoutRequestID": 406287,
        "merchantTransactionID": "MTX4148655",
        "MSISDN": 25470000000,
        "accountNumber": "acc_4148655",
        "requestDate": "2020-08-20 09:08:31",
        "requestStatusCode": 183,
        "serviceName": "Test Servuce",
        "serviceCode": "Test Service",
        "requestCurrencyCode": "KES",
        "requestAmount": 6618,
        "paymentCurrencyCode": "KES",
        "amountPaid": 6618,
        "amountPaidInOriginalCurrency":6618,
        "conversionRate":1,
        "session": "",
        "redirectURL": "",
        "shortUrl": "",
        "redirectTrigger": "",
        "payments": [
            {
                "payerTransactionID": "dev-test-1597903771",
                "MSISDN": 254726806777,
                "accountNumber": "acc_4148655",
                "customerName": "Customer",
                "amountPaid": 6618,
                "amountPaidInOriginalCurrency":6618,
                "requestCurrencyCode":"KES",
                "payerClientCode": "BOA-K",
                "cpgTransactionID": "10763559",
                "paymentDate": "2020-08-20 09:09:43",
                "clientName": "Bank of Africa - Kenya",
                "clientDisplayName": "Bank of Africa",
                "currencyCode": "KES",
                "currencyID": 70,
                "paymentID": 2526723,
                "hubOverallStatus": 139,
                "clientCategoryID": 3,
                "clientCategoryName": "Banks",
                "payerNarration": null
            }
        ],
      "failedPayments": [
            {
                "payerTransactionID": "dev-test-1597903771",
                "MSISDN": 254726806777,
                "accountNumber": "acc_4148655",
                "customerName": "Customer",
                "amountPaid": 6618,
                "amountPaidInOriginalCurrency":6618,
                "requestCurrencyCode":"KES",
                "payerClientCode": "BOA-K",
                "cpgTransactionID": "10763559",
                "paymentDate": "2020-08-20 09:09:43",
                "clientName": "Bank of Africa - Kenya",
                "clientDisplayName": "Bank of Africa",
                "currencyCode": "KES",
                "currencyID": 70,
                "paymentID": 2526723,
                "hubOverallStatus": 139,
                "clientCategoryID": 3,
                "clientCategoryName": "Banks",
								"paymentStatus":"TIMEOUT",
                "payerNarration": null
            }
				],
        "rejectedPayments": [],
        "paymentInstructions": "",
        "offline": true,
        "customerNationalID": "",
        "customerPassportNumber": ""
    }
}

Failure Response

{
    "status": {
        "statusCode": 1014,
        "statusDescription": "The merchant transaction i d field is required."
    },
    "results": null
}

Authentication Failure Response

{
    "message": "Unauthenticated.",
    "status_code": 500
}

Failed Payment Status (Work in Progress)

Kindly note on query under the failedPayments array we will respond with the exact failed status code under paymentStatus field of why the request failed on the MNO's end. Here the overallStatus for the request will be 130 or 129 however the individual failed payment will have the correct status code with the reason for failure. Note the new field showing the actual failure reason will be under failedPayments[].paymentStatus

Status CodeDescription
FAILEDGeneric failure reason given by the payment provider.
TIMEOUTThere was a timeout when MNO was sending request to end users handset or customer did not enter their pin in time.
INVALID_PINCustomer entered incorrect pin.
BLOCKEDCustomers mobile number was blocked by the MNO.
INSUFFICIENT_BALANCEThis indicates customer does not have enough money in their wallet to complete these transactions.
CANCELLEDRequest was cancelled by the customer.
LIMIT_EXCEEDEDDeclined due to limit rule: would exceed or fall below the transfer limits
SUCCESSPayment was debited successfully.
ERRORInternal error / network timeout when trying to reach the MNO / Authentication error when sending the request to the MNO
NOT_ALLOWEDCustomer is not allowed to make such a transaction either due to decimals or their account is on hold or it is a suspected fraudulent transaction
ENGAGEDHandset has a similar request they are processing hence cannot proceed.
INVALIDFor the request sent one of the parameters are not correct and has a problem.
ACCOUNT_NOT_FOUNDMSISDN or wallet is not available on the acquirers end.