How it Works
1
Step 1
Customer selects bank transfer as the payment method on Hosted Checkout.
2
Step 2
A virtual bank account is created with bank account number and IFSC details and displayed to the customer.
3
Step 3
Customer copies these details and make a netbanking payment from their online banking portal.
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.You can choose:
Method 1: Create New Virtual Bank Account Per Order
This creates a new virtual bank account every time a customer selects bank transfer as the payment method on Hosted Checkout.Integration
The bank transfer payment method will appear for the payment gateway and products such as Payment Links, Payment Pages and Subscriptions.| Approval | Integration
Payment Gateway | ✓ | ✓
Products such as Payment Links, Payment Pages, Invoices, etc. | ✓ | Not Required Complete the following steps to integrate this payment method on your Razorpay Hosted Checkout Integration:1
Step 1
Create Order.
2
Step 2
Pass
method and order_id to Hosted Checkout.3
Step 3
Subscribe to webhooks event.
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_idreceived in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered.
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./ordersCurl
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.
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 method parameter to Hosted Checkout
Update your integration with the method and order parameters as shown below. This will display bank transfer as a payment method.
Hosted Checkout
Request Parameter
method[smartcollect] mandatory
: boolean Display bank transfer payment method on Checkout. Possible values:
true: Bank transfer payment method is displayed on Checkout.false: Bank transfer payment method is not displayed on Checkout.
Step 3: Subscribe to Webhook Event
You must subscribe to thevirtual_account.credited webhook event on the Dashboard to receive notifications whenever customers make payments using bank transfers. Know how to set up webhooks.
Sample Payload
virtual_account.credited
Method 2: Create New Virtual Bank Account Per Customer
This ensures that each customer will be allocated a unique virtual bank account, whenever they use bank transfer method on Hosted Checkout. This method requires specific integration steps, which are mentioned in the following section.Integration
The bank transfer payment method will appear for the payment gateway and products such as Payment Links, Invoices and Subscriptions.| Approval | Integration
Payment Gateway | ✓ | ✓
Products such as Payment Links, Payment Pages, Invoices, etc. | ✓ | Not Required Complete the following steps to integrate this payment method on your Razorpay Hosted Checkout Integration:1
Step 1
Create a Customer.
2
Step 2
Create an Order.
3
Step 3
Pass
method, customer_id and order_id to Hosted Checkout.4
Step 4
Subscribe to webhooks event.
Step 1: Create a Customer
You must create a customer using the Customers ID. You can also do same using the Dashboard. The following endpoint creates or add a customer with basic details such as name and contact details. You can use this API for various Razorpay Solution offerings. /customersCurl
Success Response
Request Parameters
name optional
: string Customer’s name. Alphanumeric value with period (.), apostrophe (’), forward slash (/), at (@) and parentheses are allowed. The name must be between 3-50 characters in length. For example, Gaurav Kumar.
contact optional
: string The customer’s phone number. A maximum length of 15 characters including country code. For example, +919876543210.
email optional
: string The customer’s email address. A maximum length of 64 characters. For example, gaurav.kumar@example.com.
fail_existing optional
: string Possible values:
1(default): If a customer with the same details already exists, throws an error.0: If a customer with the same details already exists, fetches details of the existing customer.
gstin optional
: string Customer’s GST number, if available. For example, 29XAbbA4369J1PA.
notes optional
: object This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
Request Parameters
id
: string Unique identifier of the customer. For example, cust_1Aa00000000004.
name
: string Customer’s name. Alphanumeric, with period (.), apostrophe (’), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, Gaurav Kumar.
contact
: string The customer’s phone number. A maximum length of 15 characters including country code. For example, +919876543210.
email
: string The customer’s email address. A maximum length of 64 characters. For example, gaurav.kumar@example.com.
gstin
: string GST number linked to the customer. For example, 29XAbbA4369J1PA.
notes
: json object This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
created_at
: integer UNIX timestamp, when the customer was created. For example, 1234567890.
Pass the customer_id available in the response to Checkout.
Step 2: 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_idreceived in the response should be passed to the checkout. This ties the order with the payment and secures the request from being tampered.
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./ordersCurl
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.
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 3: Pass customer_id and order_id to Hosted Checkout
You must pass the customer_id and order_id generated in the previous steps to Checkout, as shown below:
Hosted Checkout
Request Parameter
method[smartcollect] mandatory
: boolean Display bank transfer payment method on Checkout. Possible values:
true: Bank transfer payment method is displayed on Checkout.false: Bank transfer payment method is not displayed on Checkout.
customer_id mandatory
: string Unique identifier of the customer to whom the virtual account has been allocated. Generated in Step 1.
order_id mandatory
: string Unique identifier of the order. Generated in Step 2.
Read More: List of parameters for Hosted Checkout.
Subscribe to Webhook Event
You must subscribe to thevirtual_account.credited webhook event on the Dashboard to receive notifications whenever customers make payments using bank transfers. Know how to set up webhooks.
Sample Payload
virtual_account.credited
Try It Out
To understand how your customers can transfer money to you:2
Step 2
Provide your phone number and email address.
3
Step 3
Select Bank Transfer as your payment method.
4
Step 4
Click Copy Details to copy the account number, IFSC and Beneficiary Name.
5
Step 5
Go to your preferred netbanking portal, enter the copied details and initiate an online bank transfer.