4. Acknowledge Payment

Used by merchants to acknowledge receipt of payment for the checkout request posted.

https://developer.tingg.africa/checkout/v2/custom/requests/acknowledge

At this moment the merchant has received the payments on their end by either fetching the request details using query result status or through the callback invocation on the paymentWebhookUrl. The acknowledgment can only be done on a request that is fully paid and is not yet acknowledged.

The post acknowledgement request does the following:

  1. Changes the status of the requests to the one provided by the merchant.
  2. Updates all the payments of the corresponding request to the status provided by the merchant. This may result in more actions e.g. reversal of rejected payment to customer or settlement of accepted payment.

Header Parameters

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

Request Parameters

Parameter NameTypeDescriptionRequired
checkoutRequestIDintegerUnique transaction ID identifying the transaction as provided by the checkout platform.TRUE
merchantTransactionIDstringUnique transaction ID identifying the transaction as given by the merchant.TRUE
statusCodeintegerA status indicating the result of payment processing.
180 - The payment(s) for the request was rejected by the merchant
183 - The payment(s) for the request was accepted by the merchant
188 - The payment was received by the merchant. An accept/reject call will be initiated later.
TRUE
statusDescriptionstring A description of the status provided above.TRUE
receiptNumberintegerA transaction ID indicating the receipt of the payments.TRUE
currenctCodestringAcknowledgment currency code. This should be in the original billing currency or the currency that the payment was collected in.FALSE
acknowledgeAmountdoubleAmount to acknowledge for this request.FALSE

Example

{
   "merchantTransactionID":"MTX50477520",
   "checkoutRequestID":4459156,
   "receiptNumber":"receipt-id_5241435" ,
   "statusCode":183,
   "statusDescription":"Accepted payment"
}

Response Parameters

Parameter NameTypeDescription
statusCodeintegerA status indicating the result of payment processing.
200 - Acknowledgement done successfully.
500 - Generic failure occurred. Could be as a result of a system failure on the Tingg checkout platform.
1001 - No payment available for acknowledgement. Payment might also have been acknowledged.
1013 - The checkout request posted was not valid JSON.
1014 - Missing merchantTransactionID.
1015 - Missing checkoutRequestID.
1032 - Missing statusDescription.
statusDescriptionstringA description of the status provided above.
checkoutRequestIDin 1013tegerUnique transaction ID identifying the transaction as provided by the Tingg checkout platform.
merchantTransactionIDstringUnique transaction ID identifying the transaction as given by the merchant.
requestStatusCodeintegerStatus of the payment received
paymentsJSON ArrayAn array of the payments made.

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

Parameter NameTypeDescription
paymentIDintegerUnique payment reference on the Cellulant Payment Gateway
checkoutRequestIDintegerUnique transaction ID identifying the transaction as provided by the Tingg checkout platform.
cpgTransactionIDintegerUnique transaction id on the Cellulant Payment Gateway
payerTransactionIDstringUnique payment reference provided by the payment option ie MPESA reference
MSISDNstringMobile number used to complete the payment
accountNumberstringReference presented to complete a payment
customerNamestringCustomer names. NB: Provided only when available
amountPaiddoubleAmount paid / authorized by the customer
merchantReceiptstringReceipt number provided during payment acknowledgment
payerNarrationstringDescription of payment provided by the payment option
receiverNarrationstringDescription of payment provided by merchant on acknowledgment
hubOverallStatusintegerPayment status on the Cellulant Payment Gateway
statusCodeDescstringDescription of the hubOverallStatus
currencyIDintegerUnique currency ID as provided on Tingg checkout platform
payerClientCodestringUnique code of the payment option on the Tingg checkout platform
payerClientNamestringThe name provided for the payment option on the Tingg checkout platform
payerClientDisplayNamestringThe name of the payment display on checkout when the option is selected on the Tingg checkout platform
ownerClientCodestringUnique merchant code on the Tingg checkout platform
ownerClientNamestringMerchants name on the Tingg checkout platform
ownerClientDisplayNamestringMerchants display name on the Tingg checkout platform
merchantTransactionIDstringUnique transaction ID identifying the transaction as given by the merchant.
convertedAmountdoubleAmount converted to the currency of collection in the given country
totalPayableAmountdoubleAmount to be paid by the customer on the Tingg checkout platform
datePaymentReceivedstringDate when the payment was completed by the customer
datePaymentAcknowledgedstringDate when the payment was acknowledged by the customer on the Tingg checkout platform
dateCreatedstringDate when the payment was recorded on the Tingg checkout platform
currencyCodestringCurrency code which the customer was charged in by the payment option
countryCodestringCountry ISO Code where payment was collected

Example

Successful Response

{
    "status": {
        "statusCode": 200,
        "statusDescription": "Acknowledged successfully"
    },
    "results": {
        "checkoutRequestID": 406287,
        "merchantTransactionID": "MTX4148655",
        "requestStatusCode": 183,
        "payments": [
            {
                "paymentID": 2760738,
                "checkoutRequestID": 406287,
                "cpgTransactionID": "10776883",
                "payerTransactionID": "dev-test-1610708451",
                "MSISDN": 254722100200,
                "accountNumber": "test",
                "customerName": "Customer",
                "amountPaid": 10,
                "merchantReceipt": "receipt-id_1680382",
                "payerNarration": null,
                "receiverNarration": "Accepted test payment",
                "hubOverallStatus": 139,
                "statusCodeDesc": "New Payment",
                "currencyID": 70,
                "payerClientCode": "SAFKE",
                "payerClientName": "Safaricom Limited",
                "ownerClientCode": "DEV3411",
                "ownerClientName": "Dev Client",
                "ownerClientDisplayName": "ohmzi",
                "merchantTransactionID": "id_1680382",
                "convertedAmount": 10,
                "totalPayableAmount": 10,
                "datePaymentReceived": "2021-01-15 14:00:58",
                "datePaymentAcknowledged": null,
                "dateCreated": "2021-01-15 14:00:59",
                "currencyCode": "KES",
                "countryCode": "KE"
            }
    }
}

Failure Response

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

Failed Response: Acknowledging already processed payment

{
    "status": {
        "statusCode": 1001,
        "statusDescription": "Data not found"
    },
    "results": null
}

Authentication Failure Response

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