Transaction

This is a sub-module with APIs for performing actions under 'Transaction' as a resource for the linked business bank account. Some of the key functions that you can do here are -

  • Initiate a transaction without an OTP as an aggregator OR
  • Request an OTP first for initiating a transaction and then initiate it.
  • Check the latest status of any initiated transaction

Both flows are possible using our API collection below. If you want to skip the OTP for any transactions happening on the linked bank accounts, you can directly proceed to the POST 'Transaction' API endpoint below.

OTP

Request an OTP to initiate a transaction.

curl --location --request POST 'https://in.staging.decentro.tech/v2/banking/transaction/otp' \
--header 'client_id: <YOUR_CLIENT_ID>' \
--header 'client_secret: <YOUR_CLIENT_SECRET>' \
--header 'module_secret: <YOUR_BANKING_MODULE_SECRET>' \
--header 'provider_secret: <YOUR_CHOSEN_PROVIDER_SECRET>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reference_id": "0000-0000-0000-0000",
    "account": "000451XXXXXX",
    "transfer_amount": 100
}'
{
  "decentroTxnId": "DCTRTXXXXXXXXXXXXXXXXX",
  "status": "SUCCESS",
  "responseCode": "S00000",
  "message": "OTP Requested Successfully"
}

Transaction

Initiate an IMPS, NEFT, or RTGS transaction on a particular linked business account (with or without an OTP)

curl --location --request POST 'https://in.staging.decentro.tech/v2/banking/transaction' \
--header 'client_id: <YOUR_CLIENT_ID>' \
--header 'client_secret: <YOUR_CLIENT_SECRET>' \
--header 'module_secret: <YOUR_BANKING_MODULE_SECRET>' \
--header 'provider_secret: <YOUR_CHOSEN_PROVIDER_SECRET>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "reference_id": "0000-0000-0000-0001",
    "otp_request_reference_id": "0000-0000-0000-0000",
    "otp": "XXXXXX",
    "purpose_message": "Rent payment",
    "from_customer_id": "14XXXXXXXX",
    "from_account": "0004510XXXXX",
    "to_account": "0004050XXXXX",
    "transfer_type": "NEFT",
    "transfer_amount": 100,
    "currency_code": "INR",
    "beneficiary_details": {
        "name": "Sample Beneficiary",
        "ifsc": "ICIC0000XXX",
        "email": "[email protected]",
        "mobile": "9000XXXXXX",
        "address": "Bengaluru",
        "country_code": "IN"
    }
}'
{
  "decentroTxnId": "DCTRTXXXXXXXXXXXXXXXXX",
  "status": "SUCCESS",
  "responseCode": "S00000",
  "message": "Transaction request submitted",
  "data": {
    "transactionId": "DCTRTXXXXXXXXXXXXXXXXX",
    "transactionStatus": "PENDING",
    "transferType": "NEFT",
    "bankReferenceNumber": "XXXXXXXXXX"
  }
}

Status

Retrieve the latest status of a particular transaction

curl --location --request GET 'https://in.staging.decentro.tech/v2/banking/transaction/DCTRTXXXXXXXXXXXXXXXXX/status' \
--header 'client_id: <YOUR_CLIENT_ID>' \
--header 'client_secret: <YOUR_CLIENT_SECRET>' \
--header 'module_secret: <YOUR_BANKING_MODULE_SECRET>' \
--header 'provider_secret: <YOUR_CHOSEN_PROVIDER_SECRET>'
{
  "decentroTxnId": "DCTRTXXXXXXXXXXXXXXXXX",
  "status": "SUCCESS",
  "responseCode": "S00000",
  "message": "Transaction status retrieved successfully",
  "data": {
    "transactionId": "DCTRTXXXXXXXXXXXXXXXXY",
    "transactionStatus": "SUCCESS",
    "bankReferenceNumber": "XXXXXXXXXX"
  }
}

Did this page help you?