Skip to main content

How it Works

1

Step 1

Customer selects bank transfer as the payment method on Checkout.
2

Step 2

A Customer Identifier is created with the bank account number and IFSC details and displayed to the customer.
3

Step 3

The customer copies these details and makes a netbanking payment from their online banking portal.
These Customer Identifiers are linked to the bank account you have registered with Razorpay. The payments are settled in your account as per the settlement schedule.
Feature RequestThis is an on-demand feature. Please raise a request with our Support team to get this feature activated on your Razorpay account.to get this feature activated on your account.

Prerequisites

Integration Steps

Step 1: Create an Order

Order is an important step in the payment process.
  • An order should be created for every payment.
  • You can create an order using the Orders API. It is a server-side API call. Know how to authenticate Orders API.
  • The order_id received in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered.
Watch Out!Payments made without an order_id cannot be captured and will be automatically refunded. You must create an order before initiating payments to ensure proper payment processing.You can create an order:
  • Using the sample code on the Razorpay Postman Public Workspace.
  • By manually integrating the API sample codes on your server.

Razorpay Postman Public Workspace

You can use the Postman workspace below to create an order:
Handy TipsUnder the Authorization section in Postman, select Basic Auth and add the Key Id and secret as the Username and Password, respectively.

API Sample Code

Use this endpoint to create an order using the Orders API./orders
Curl
Success Response

Request Parameters

amount mandatory : integer Payment amount in the smallest currency subunit. For example, if the amount to be charged is 299, then pass 29900 in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295.
Watch Out!As per payment guidelines, you should pass the last decimal number as 0 for three decimal currency payments. For example, if you want to charge a customer 99.991 KD for a transaction, you should pass the value for the amount parameter as 99990 and not 99991.currency mandatory : string The currency in which the transaction should be made. See the list of supported currencies. Length must be 3 characters.
Handy TipsRazorpay has added support for zero decimal currencies, such as JPY and three decimal currencies, such as KWD, BHD and OMR, allowing businesses to accept international payments in these currencies. Know more about Currency Conversion (May 2024).receipt optional : string Your receipt id for this order should be passed here. Maximum length is 40 characters.notes optional : json object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.partial_payment optional : boolean Indicates whether the customer can make a partial payment. Possible values:
  • true: The customer can make partial payments.
  • false (default): The customer cannot make partial payments.
first_payment_min_amount optional : integer Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of 7000 is to be received from the customer in two installments of #1 - 5000, #2 - 2000 then you can set this value as 500000. This parameter should be passed only if partial_payment is true.Know more about Orders API.

Response Parameters

Descriptions for the response parameters are present in the Orders Entity parameters table.

Error Response Parameters

The error response parameters are available in the API Reference Guide.

Step 2: Add fetchVirtualAccount method to Custom Checkout

Use the method fetchVirtualAccount to create and fetch the virtual account details. The method is called with the following data.

Sample Code

Bank Transfer

Request Parameters

order_id _mandatory : string The unique identifier of the order created in the previous step. customer_id optional : string The unique identifier of the customer. Learn how to create a customer using the Customers API. This parameter is mandatory if you want to associate the virtual account with a specific customer. notes optional : object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

Response Parameters

id : string The unique identifier of the virtual account. name : string The merchant billing label as it appears on the Dashboard. entity : string Indicates the type of entity. Here, it is virtual account. status : string Indicates whether the virtual account is in active or closed state. description : string A brief description about the virtual account. amount_paid : integer The amount paid by the customer. notes : json object Any custom notes you might want to add to the virtual account can be entered here. Refer Notes section of the API Reference Guide to learn more. customer_id : string Unique identifier of the customer to whom the virtual account is linked. Refer the Customer API section to learn more. receivers : json object Configuration of desired receivers for the virtual account. id : string The unique identifier of the virtual bank account or virtual UPI ID. Sample IDs for:
  • virtual bank account
  • ba_Di5gbQsGn0QSz3
  • virtual UPI ID
  • vpa_CkTmLXqVYPkbxx.
entity : string Name of the entity. Possible values:
  • bank_account
  • vpa
ifsc : string The IFSC for the virtual bank account created. For example, RAZR0000001. This parameter appears in the response only when bank_account is passed as the receiver type. bank_name : string The bank associated with the virtual bank account. For example, RBL Bank. This parameter appears in the response only when bank_account is passed as the receiver type. account_number : string The unique account number provided by the bank. For example, 1112220061746877. This parameter appears in the response only when bank_account is passed as the receiver type. name : string The merchant billing label as it appears on the Dashboard. This parameter appears in the response only when bank_account is passed as the receiver type. notes : json object Any custom notes you might want to add to the virtual bank account or virtual UPI ID can be entered here. Refer Notes section of the API Reference Guide to learn more. This parameter appears in the response only when bank_account is passed as the receiver type. username : string The UPI ID consists of the username and the bank handle. The username consists of the namespace (assigned by the bank to Razorpay), the merchant prefix (which can be customised by you) and the descriptor (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, rpy.payto00000gaurikumari. This parameter appears in the response only when vpa is passed as the receiver type. handle : string The bank name that forms the second half of the virtual UPI ID. For example, icici. This parameter appears in the response only when vpa is passed as the receiver type. address : string The UPI ID that combines the username and the handle with the @ symbol. For example, rpy.payto00000gaurikumari@icici. This parameter appears in the response only when vpa is passed as the receiver type. close_by : integer UNIX timestamp at which the virtual account is scheduled to be automatically closed. The time must be at least 15 minutes after the current time. The date range can be set till 2147483647 in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30).
Handy Tips Any request beyond 2147483647 UNIX timestamp will fail.closed_at : integer UNIX timestamp at which the virtual account is automatically closed.created_at : integer UNIX timestamp at which the virtual account was created.
Sample Entity
Handy TipsThe above flow also works with the following cases:
  1. With the Customer Fee bearer model, the amount validation should happen with Amount + Fee.
  2. You can pass the customer id in Checkout to ensure that a static virtual account is created for each customer.

Step 3: Subscribe to Webhook Event

You must subscribe to the virtual_account.credited webhook event on the Dashboard to receive notifications whenever customers make payments using bank transfers. Learn how to setup webhooks.

Sample Payload

virtual_account.credited