Login

4. Implement Callback URL

Implement webhook via callback URL

Webhook from Cellulant Tingg Express. When a full payment is made a JSON request is sent to the merchant’s callback URL. Note: Webhook is only sent when the customer has made full payment for the request raised.

We do a POST request when sending the payment details to the merchant's callback URL

Webhook Request:

Parameter NameTypeDescriptionRequired
checkout_request_idDoubleA unique identifier on Cellulant’s end.Yes
merchant_transaction_idStringUnique ID the merchant raised for the requestYes
request_amountdoubleThe converted amount for the request raised by the merchantYes
original_request_amountdoubleThe original request amount raised by the merchant in the invoice currencyYes
request_currency_codestringConverted currency for the request the customer made the payment inYes
original_request_currency_codestringISO Code of the currency code the merchant raised the request inYes
account_numberdoubleMerchant reference the customer was paying forYes
currency_codestringISO Currency code of the payment madeYes
amount_paiddoubleAmount the customer paid for the requestYes
service_charge_amountdoubleCharges added to the service for the request initiatedYes
request_datedateDate when the request was raised inYes
service_codestringUnique service code identifying the service the payment request was raised for.Yes
request_status_codeStringOverall request code indicating the status of the service
177 - partially paid requests
178 - indicating the request was fully paid for
179 - indicating the request was partially paid for but expired
129 - Request expired without payments
102 - Insufficient funds
101 - Invalid pin/canceled
99 - Generic Failed Payment Status
Yes
request_status_descriptionstringDescription of the status given back on the webhook requestYes
MSISDNstringThe mobile number the person came with from the merchant siteYes
paymentsJSON ArrayAn array of successful payments made to the requestYes
failed_paymentsJSON ArrayAn array of any payments initiated but not successfully authorizedYes
extra_datastringmetadataYes
country_abbrvstringAbbreviation of the countryYes

Payments array for both failed and successful payments array.

Parameter NameTypeDescriptionRequired
customer_namestringCustomer name of the person who made the paymentYes
account_numberstringMerchant reference the customer was paying for.Yes
cpg_transaction_idStringUnique Cellulant identityYes
currency_codestringISO Currency code of the payment madeYes
payer_client_codestringPayment option customer paid with e.g. AirtelYes
payer_client_nameStringPayment option customer nameYes
amount_paiddoubleAmount customer paid forYes
service_codeStringCode of service paid toYes
date_payment_receivedDateWhen the payment was made and receivedYes
MSISDNstringThe mobile number the customer is paying forYes
payer_transaction_idstringUnique ID the MNO or bank generated for the transactionYes
hub_overall_statusstringThe overall status of the payment made is described on the status code table belowYes
payer_narrationStringPayment description is given by MNO, bank, or card acquirer.Yes

Sample JSON Request:

{
  "request_status_code": 178,
  "account_number": "11800",
  "merchant_transaction_id": "56679792",
  "amount_paid": 15,
  "service_charge_amount": 0,
  "request_amount": "10",
  "payments": [
    {
      "account_number": "11800",
      "payer_client_name": "Mula Checkout",
      "amount_paid": 5,
      "payer_narration": "The service request is processed successfully.",
      "date_payment_received": "2021-11-26 14:47:45.0",
      "currency_code": "KES",
      "payer_transaction_id": "PKQ082LB08",
      "cpg_transaction_id": "1195072932",
      "payer_client_code": "MULACHECKOUT_KEN",
      "hub_overall_status": 139,
      "service_code": "MULACHECKOUTONLINE",
      "customer_name": "Customer",
      "msisdn": 254700000000
    },
    {
      "account_number": "11800",
      "payer_client_name": "Mula Checkout",
      "amount_paid": 5,
      "payer_narration": "The service request is processed successfully.",
      "date_payment_received": "2021-11-26 14:47:45.0",
      "currency_code": "KES",
      "payer_transaction_id": "PKQ082LB08",
      "cpg_transaction_id": "1195072932",
      "payer_client_code": "MULACHECKOUT_KEN",
      "hub_overall_status": 139,
      "service_code": "MULACHECKOUTONLINE",
      "customer_name": "Customer",
      "msisdn": 254700000000
    },
    {
      "account_number": "11800",
      "payer_client_name": "Mula Checkout",
      "amount_paid": 5,
      "payer_narration": "The service request is processed successfully.",
      "date_payment_received": "2021-11-26 14:47:45.0",
      "currency_code": "KES",
      "payer_transaction_id": "PKQ082LB08",
      "cpg_transaction_id": "1195072932",
      "payer_client_code": "MULACHECKOUT_KEN",
      "hub_overall_status": 139,
      "service_code": "MULACHECKOUTONLINE",
      "customer_name": "Customer",
      "msisdn": 254700000000
    }
  ],
  "original_request_amount": 10,
  "checkout_request_id": 6,
  "currency_code": "KES",
  "failed_payments": [],
  "request_currency_code": "KES",
  "request_date": "Fri Nov 26 11:47:04 GMT 2021",
  "service_code": "MULACHECKOUTONLINE",
  "request_status_description": "Success payment",
  "original_request_currency_code": "KES",
  "msisdn": "254700000000",
	"extra_data": "abcd",
	"country_abbrv": "KEN"
}

Webhook Response:

Parameter NameTypeDescription
checkout_request_idlongThe unique Cellulant ID on the database
merchant_transaction_idstringUnique ID the merchant raised for the request
status_codestringStatus code to indicate if a request is received successfully, failed, or accepted
status_descriptionstringStatus code explanation
183 - successful
180 - payment rejected
188 - payment received and will be acknowledged later by the merchant
receipt_numberstringUnique identifier of the acknowledgment response given back

Sample Response for Payment processed successfully:

{ 
  "checkout_request_id": 4826296, 
  "merchant_transaction_id": "abcd-efg-hijklm", 
  "status_code": "183", 
  "status_description": "Payment processed successfully", 
  "receipt_number": "r77az121236884" 
}

Sample Response for Payment processing failed:

{
  "checkout_request_id": 4826296,
  "merchant_transaction_id": "abcd-efg-hijklm",
  "status_code": "180",
  "status_description": "Payment was not processed successfully",
  "receipt_number": "r77az121236884"
}