Transaction Callbacks
This section covers the transaction callbacks triggered by Decentro for incoming and outgoing transactions.
Decentro uses callbacks to intimate the platform about transactions, incoming or outgoing and irrespective of the mode of transfer. The callback will be posted on the endpoints provided by the platform.
Decentro can configure custom endpoints (URLs) that you can share with our team on [email protected] or with your assigned RM, you can receive callbacks for any changes in the balance for your virtual accounts, or status updates for any transaction.
Decentro triggers transaction callbacks for the below transactions.
- Payouts: Direct Payouts]
- Collection Request: Issue Collect Request
- Payment Link: Generate UPI Payment Link
The transaction callbacks are over and above the account balance callbacks Account Balance triggered for each virtual account.
Transaction Status
This callback is triggered by Decentro to an endpoint provided by the platform for a specific transaction. This is over and above the account balance callback provided for updates in a specific virtual account.
Salient points:
- 3 times maximum retry, post which the explicit Get status call has to be made for obtaining the transaction status.
- It is mandatory to adhere to the response structure as specified in the examples.
- It is recommended that you whitelist Decentro's originating IP.
- It is recommended that you share your auth of preference with us, which will then be propagated as part of the callback request.
- Callbacks will be triggered only in case of conclusive statuses (failure or success) and not while the transaction is pending.
- Beneficiary Name and Bank Reference Number will be present only when Decentro's banking partners respond accordingly.
- The keys in the request will be in snake/ camel case based on the company configuration (defaulting to camel case if nothing has opted). Response, however, has to be in snake case always.
Scenario Overview
Scenario | Callback HTTP Status code | Expected Callback Response |
---|---|---|
Successful transaction, successful callback | 200, 201 | {"response_code": "CB_S00000"} |
Successful transaction, unauthorized callback | 401, 403 | {"response_code": "CB_E00013"} |
Successful transaction, failed callback | Other 4xx | {"response_code": "CB_E00009"} |
Successful transaction, failed callback due to internal server error | 5xx | {"response_code": "CB_E00000"} |
Failed transaction, successful callback | 200, 201 | {"response_code": "CB_S00000"} |
Failed transaction, unauthorized callback | 401, 403 | {"response_code": "CB_E00013"} |
Failed transaction, failed callback | Other 4xx | {"response_code": "CB_E00009"} |
Failed transaction, failed callback due to internal server error | 5xx | {"response_code": "CB_E00000"} |
Link to Transaction Callbacks
{
"attempt": 1,
"timestamp": "2020-09-16 22:22:22",
"callbackTxnId": "CLBACKxx",
"originalCallbackTxnId": "CLBACKxx",
"transactionStatus": "success",
"referenceId": "company_reference_id_1",
"decentroTxnId": "DCTRTXxx",
"transactionMessage": "This is the message for a successful transaction",
"transferType": "IMPS",
"bankReferenceNumber": "abcdefghijk",
"beneficiaryName": "some_beneficiary_name",
"transactionAmount": 5,
"providerMessage": "Processed successfully",
"errorKey": ""
}
{
"attempt": 1,
"timestamp": "2020-09-16 22:22:22",
"callbackTxnId": "CLBACKxx",
"originalCallbackTxnId": "CLBACKxx",
"transactionStatus": "failure",
"referenceId": "company_reference_id_1",
"decentroTxnId": "DCTRTXxx",
"transactionMessage": "This is the message for a failure transaction",
"transferType": "IMPS",
"bankReferenceNumber": "abcdefghijk",
"beneficiaryName": "some_beneficiary_name",
"transactionAmount": 5,
"providerMessage": "Failed transaction",
"errorKey": "error_at_remitter_bank"
}
Account Balance Callback
Please note that the account balance callback is covered in detail here
Pre-Deposit Check
Via this callback, it is possible for any company to accept or reject incoming transactions for their virtual accounts based on their custom criteria.
The incoming transactions will be accepted under the following scenarios:
- Company has not opted for pre-deposit checks.
- Company accepts the transaction.
- Company does not respond with the valid payload. (Refer to examples)
- Company does not respond within the configured timeframe of 15 seconds.
The custom endpoints for different providers(if opted) need to be different.
Link to Pre-Deposit Check
Updated 10 months ago