Create a Virtual Account

This API is an updated version of creating a virtual account on Decentro's v3 stack.

Overview

This API lets the platform collect funds from a payer through NEFT/RTGS/IMPS on its v3 stack.

Flow

Below is the flow for using this API.

  • The platform creates a virtual account using this API and the endpoint by passing the consumer_urn shared by Decentro before going live.
  • The platform can choose a specific virtual account number as desired basis the usecase by the passing the suffix of the virtual account number under the 'custom_va_number' field in the request body.
  • The platform receives the status of virtual account creation in the response from Decentro, including the virtual account number if Decentro is generating it.
  • The platform can share the virtual account number and IFSC code with the payer on its website, app or offline for the payer to transfer funds to the virtual account.
  • The payer transfers funds to the virtual account using their Netbanking portal and any supported modes (NEFT/RTGS/IMPS).
  • Decentro triggers the account balance callback to the platform's endpoints configured by Decentro at onboarding time.
  • Decentro triggers the Terminal Transaction Status Callback/Webhook to the platform's endpoints configured by Decentro at onboarding time if Decentro receives a success or failure transaction at its end.

Note: Decentro has a standard nomenclature for creating a virtual account. The first 6 digits are static, and the subsequent 10 digits can be customized by the platform.

Understanding Decentro's Virtual Accounts

Decentro simplifies banking by generating multiple virtual accounts linked to various bank providers. While the custom virtual account number remains consistent across these accounts, the static prefix—comprising the first six digits—varies based on the bank code.

Example of virtual account families

Here’s how the virtual accounts are structured:

  1. Provider 1: 47382500000001
    (Static Prefix: 473825)
  2. Provider 2: 34598700000001
    (Static Prefix: 345987)

In this setup, the custom virtual account number is always 00000001, indicating that all accounts with this number belong to the same family.

Note: You can also identify these accounts using the customer_va_identifier assigned during their creation.

Clients can utilize any of these virtual accounts for transactions. Currently, the API response provides a single virtual account since Yes Bank is the only provider available for creating these accounts. However, we are actively working to integrate more bank providers in the near future.

Operations on virtual accounts

Clients can easily manage operations on their virtual accounts by selecting from either a single virtual account, a family of virtual accounts, or all virtual accounts associated with a consumer.

To effectively identify the relevant virtual accounts for any operation, clients can use one of the following identifiers::

IdentifierDescription
virtual_account_numberThe specific virtual_account_number in question.
custom_va_numberAll virtual account numbers across various banks linked to the specified custom VA number.
customer_va_identifierAll virtual account numbers across different banks associated with the given customer VA identifier.
consumer_urnAll virtual accounts across banks created for the consumer.

Note: Virtual accounts identified by the custom VA number will be the same as those identified by the customer VA identifier.

API Endpoints

Below are the API endpoints to be used by the platform basis the environments.

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 KeyMessage
error_invalid_consumer_urnConsumer URN does not exist. Please retry with a valid consumer_urn.
error_empty_consumer_urnConsumer URN cannot be empty. Hint: consumer_urn (string).
error_invalid_format_consumer_urnConsumer URN is not of type string. Hint: consumer_urn (string).
error_invalid_length_nameInvalid length for the name parameter. Length of name should be between 2 and 255 characters.
error_invalid_format_nameName is not of type string. Please provide a valid format.
error_invalid_format_customer_va_identifiercustomer_va_identifier is not of type string. Please provide a valid format.
error_empty_customer_va_identifierCustomer ID cannot be empty. Hint: customer_va_identifier (string).
error_invalid_length_customer_va_identifierInvalid length for the customer_va_identifier parameter. Length of customer_va_identifier should be between 2 and 255 characters.
error_duplicate_customer_va_identifierDuplicate customer_va_identifier found. Please provide a unique value.
error_invalid_format_custom_va_numbercustom_va_number is not of type integer. Please provide a valid format.
error_duplicate_custom_va_numberProvided custom_va_number already exists. Please provide a unique value.
error_invalid_length_custom_va_numberInvalid length for the custom_va_number parameter. Length of custom_va_number should be between 6 and 10 characters.
error_invalid_custom_va_numberCustom VA number can only contain digits. Hint: custom_va_number (string)
error_invalid_block_va_auto_settlementPlease retry with a valid block_va_auto_settlement value.
error_invalid_format_block_va_auto_settlementblock_va_auto_settlement is not of type boolean. Please provide a valid format.
error_channel_disabledE collect is disabled for the merchant. Please use a valid channel or contact support team to enable it.
error_missing_key_consumer_urnPlease pass consumer_urn
error_missing_customer_va_identifierPlease pass customer_va_identifier
error_unsanitized_valuesUnsanitized values detected for key(s): purpose_message. Kindly sanitize the corresponding values by removing special characters such as . @ # $ % ^ & * ! ; : ' " ~ ` ? = + ) ( and retry.
error_consumer_configuration_issueVirtual accounts cannot be created for this consumer. Please connect with us on [email protected]
Language
Click Try It! to start a request and see the response here!