Callbacks

Decentro uses Callbacks in the Prepaid programs to authorize a transaction as well as receive the status of a transaction after the success or failure.

The platform can use custom URLs that can be shared with our team on [email protected] or with your assigned RM, you can receive callbacks for the outgoing wallet transactions.

For every transaction, Decentro follows the below flow.

  • Pre-Authorization Callback: This is triggered for every transaction on a card across channels (ECOM, POS, ATM). This contains all the details for the platform to check and acknowledge.
  • Notification Callback: This is triggered for every transaction only if the pre-authorization callback is successfully acknowledged. This contains all the details for the platform to check and acknowledge

Pre-Authorization Callback

This callback will be triggered by Decentro to the merchant when the cardholder swipes the card online/offline.

If the merchant approves the transaction, the merchant receives a notification when the transaction goes through.

If the merchant rejects the transaction, the same is conveyed to the merchant and the transaction is declined.

📘

Note

If the amount parameter is not sent OR if an incorrect data type is passed for this parameter, the default amount (as shared by the bank) will be loaded into the wallet.

Scenario

Callback HTTP Status code

Expected Callback Response

Successful callback

200, 201

{"response_code": "CB_S00000"}

Unauthorized callback

401, 403

{"response_code": "CB_E00013"}

Failed callback

Other 4xx

{"response_code": "CB_E00009"}

Failed callback due to internal server error

5xx

{"response_code": "CB_E00000"}

curl --location --request POST '<your_custom_endpoint>' \
--header 'custom_key_1: custom_value_1' \
--header 'custom_key_2: custom_value_2' \
--data-raw '{
    "attempt": 1,
    "timestamp": "2021-08-02T11:35:02.978686",
    "callbackTxnId": "CLBACKxx",
    "originalCallbackTxnId": "CLBACKxx",
    "bankReferenceNumber": "ABC",
    "network": "RUPAY",
    "channel": "POS",
    "transactionType": "POS",
    "transactionCurrency": "356",
    "transactionAmount": 100,
    "fee": 0,
    "merchantId": "TECHNO",
    "entityId": "441",
    "merchantName": "TECHNO TECHNOLOGIES BANGALORE",
    "terminalId": "4977",
    "mcc": "4511",
    "amount": 100,
    "traceNumber": "67584332",
    "institutionCode": "555777",
    "retrievalReferenceNumber": "ntso4b20t8",
    "mobile": "9999900000",
    "proxyCardNumber": "25XXXXXXXX",
    "partnerName": "YES BANK XXXXXXX Card"
}'
{
  "response_code": "CB_S00000",
  "amount": 100
}

Notification Callback

Decentro notifies the platform about a transaction ONLY IF the pre-authorization callback was successfully acknowledged.

Decentro notifies the platform for success and failure after the pre-authorization callback was successfully acknowledged.

The transaction goes through as per the below logic even if the pre-authorization callback was successfully acknowledged.

  • Regular program: The transactions go through only if the wallet has sufficient funds
  • JIT program: The transactions go through only if the allotted pool account has sufficient funds

🚧

If the relevant source of funds (wallet or pool account) doesn't have sufficient balance, the transaction fails.

Scenario

Callback HTTP Status code

Expected Callback Response

Successful callback

200, 201

{"response_code": "CB_S00000"}

Unauthorized callback

401, 403

{"response_code": "CB_E00013"}

Failed callback

Other 4xx

{"response_code": "CB_E00009"}

Failed callback due to internal server error

5xx

{"response_code": "CB_E00000"}

curl --location --request POST '<your_custom_endpoint>' \
--header 'custom_key_1: custom_value_1' \
--header 'custom_key_2: custom_value_2' \
--data-raw '{
    "attempt": 1,
    "timestamp": "2021-08-02T11:35:02.978686",
    "callbackTxnId": "CLBACKxx",
    "originalCallbackTxnId": "CLBACKxx",
    "bankReferenceNumber": "ABC",
    "network": "RUPAY",
    "channel": "POS",
    "transactionType": "POS",
    "transactionCurrency": "356",
    "transactionAmount": 100,
    "fee": 0,
    "merchantId": "TECHNO",
    "entityId": "441",
    "merchantName": "TECHNO TECHNOLOGIES BANGALORE",
    "terminalId": "4977",
    "mcc": "4511",
    "amount": 100,
    "traceNumber": "67584332",
    "institutionCode": "555777",
    "retrievalReferenceNumber": "ntso4b20t8",
    "mobile": "9999900000",
    "transactionDate": "02-08-2021 11:34",
    "proxyCardNumber": "25XXXXXXXX",
    "partnerName": "YES BANK XXXXXXX Card",
    "transactionStatus": "success"
}'
{
  "response_code": "CB_S00000"
}

Did this page help you?