This API allows the client to create a virtual accounts to collect funds from various payment methods like IMPS, RTGS, NEFT.
Important Note
Please use only Staging Credentials on each API Reference page to test the APIs directly from our Documentation.
Overview
This API allows clients to create a virtual account with Decentro and collect funds in the virtual account using methods like IMPS, RTGS, NEFT, etc.
Flow
Below is the flow for using the virtual account stack through Decentro.
-
Creating a Virtual Account: Clients can create a virtual account with Decentro by providing necessary details through the create virtual account API. Decentro will then assign a virtual account to the client with the provided details and respond back with the account details like account number, ifsc code, etc.
-
Using the Virtual Account: The platform can use the virtual account as a beneficiary in any transaction to directly collect funds from the customers or use it within the app/web application to collect funds. The virtual account supports various methods for collecting funds, including IMPS, RTGS, and NEFT.
-
Pre-Deposit Check Callback: The client will receive a pre-deposit check callback with the remitter details of the transaction once the remitter has completed the payment. The client has to confirm whether to accept or reject the incoming funds in the virtual account.
- If the client accepts the funds, the virtual account will be credited with the transaction amount.
- If the client rejects the funds, the virtual account will not be credited, and the funds will be reversed back to the source (payer).
-
Whitelisting a Remitter Account: Clients can also whitelist a remitter account against a virtual account, making sure that all payments from a specific remitter account are automatically accepted in the virtual account.
-
Auto-Rejection: If a client has not subscribed to the pre-deposit check callback nor whitelisted the remitter account, incoming transactions will be auto-rejected. Therefore, it is mandatory for clients to either subscribe to the pre-deposit check callback or whitelist the remitter account to ensure seamless transactions.
-
Fund Movement: After accepting or rejecting an incoming transaction, the client will receive notification callbacks indicating the actual fund movement for the virtual account. These callbacks include additional details such as the payer's name, IFSC code, updated virtual account balance, etc.
- Transaction Status Callback: This callback informs the client about the final status of the incoming transaction. If the transaction is accepted, the callback will contain a status as "SUCCESS." If the transaction is rejected, the callback will contain a status as "FAILED."
- Account Balance Callback: This callback includes the balance update and virtual account details where the funds are collected. It is triggered only in the "SUCCESS" scenario.
API Endpoints
Below are the API endpoints to be used by the platform basis the environments.
Environment | Endpoint |
---|---|
Staging/Sandbox | https://staging.api.decentro.tech/v3/banking/account/virtual |
Production | https://api.decentro.tech/v3/banking/account/virtual |
Response Keys
Below are the response keys propagated by Decentro in the response_key parameter, which cover all the scenarios a platform can encounter.
Response Key | Message |
---|---|
error_invalid_consumer_urn | Consumer URN does not exist. Please retry with a valid consumer_urn. |
error_empty_consumer_urn | Consumer URN cannot be empty. Hint: consumer_urn (string). |
error_invalid_format_consumer_urn | Consumer URN is not of type string. Hint: consumer_urn (string). |
error_invalid_length_name | Invalid length for the name parameter. Length of name should be between 2 and 255 characters. |
error_invalid_format_name | Name is not of type string. Please provide a valid format. |
error_invalid_format_customer_id | Customer ID is not of type string. Please provide a valid format. |
error_empty_customer_id | Customer ID cannot be empty. Hint: customer_id (string). |
error_invalid_length_customer_id | Invalid length for the customer_id parameter. Length of customer_id should be between 2 and 255 characters. |
error_duplicate_customer_id | Duplicate customer ID found. Please provide a unique value. |
error_invalid_format_custom_va_number | Custom VA number is not of type integer. Please provide a valid format. |
error_duplicate_custom_va_number | Provided custom VA number already exists. Please provide a unique value. |
error_invalid_length_customer_va_number | Invalid length for the custom_va_number parameter. Length of custom_va_number should be between 6 and 10 characters. |
error_invalid_block_va_settlement | Please retry with a valid block_va_settlement value. |
error_invalid_format_block_va_settlement | Block va_settlement is not of type boolean. Please provide a valid format. |
error_channel_disabled | E collect is disabled for the merchant. Please use a valid channel or contact support team to enable it. |
error_missing_key_consumer_urn | Please pass consumer_urn |
error_missing_customer_id | Please pass customer_id |
error_unsanitized_values | Unsanitized values detected for key(s): purpose_message. Kindly sanitize the corresponding values by removing special characters such as . @ # $ % ^ & * ! ; : ' " ~ ` ? = + ) ( and retry. |