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
  • Fund Post Callback: This is triggered for every refund and surcharge transaction. For refunds, this will be Fund Post credit and for surcharges it will be Fund Post debit
  • Reversal Callback: This is triggered for every failed transaction to reverse the funds back to wallet.

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.

Link to sample callback request

📘

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.

ScenarioCallback HTTP Status codeExpected Callback Response
Successful callback200, 201{"response_code": "CB_S00000"}
Unauthorized callback401, 403{"response_code": "CB_E00013"}
Failed callbackOther 4xx{"response_code": "CB_E00009"}
Failed callback due to internal server error5xx{"response_code": "CB_E00000"}

Notification Callback

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

Decentro notifies the merchant 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

Link to sample callback request

📘

Note

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

Fund Post Callback

Decentro triggers a Fund Post callback to the merchant if there are any refunds credited or surcharges debited from the wallet

The Fund Post callback is triggered for following two types of transactions:

Credit: When there is a refund processed to a wallet against a particular transaction

Debit: When funds are debited (surcharges) from a wallet after any transaction

The transactionNature parameter in the Fund Post callback payload addresses the above use cases and will have either "CREDIT" or "DEBIT" values

Link for sample payload - here

Reversal Callback

Decentro triggers a Reversal callback to reverse the transaction amount into the wallet in case the transaction fails

When the transaction is successful, Decentro triggers the Notification callback with "success" in transactionStatus parameter.

In case the transaction fails, Decentro triggers also triggers Reversal callback along with Notification callback

Link for sample payload - here

📘

Note

In the cases of failed transactions the transactionStatus for Reversal callback will be "success" and for Notification callback it will be "failure"