Skip to main content
Available in🇮🇳 India
Third-Party Validation (TPV) of bank accounts is a mandatory requirement for merchants in the BFSI (Banking, Financial Services and Insurance) sector dealing with Securities, Broking and Mutual Funds. As per Securities and Exchange Board of India (SEBI) guidelines, transactions must be made by the investors only from those bank accounts provided when they registered with your business. With Razorpay, you can comply with the SEBI guidelines for online payment collections by offering TPV integrations with major banks at Checkout. Investors can make payments using netbanking, debit card or UPI. UPI supports both collect and intent flows at Razorpay Custom Integration checkout.
Feature RequestThis is an on-demand feature. Please raise a request with our Support team to get this feature activated on your Razorpay account.

1. Integration Flow

In TPV integration flow, Razorpay maps the investors’ bank accounts to ensure that the payment is processed only from their registered bank accounts. Follow the steps given below:
Collect the bank account details provided by the investor at the time of registration.
Pass the bank account details to the bank_account array of the Orders API:POST /ordersThe investor needs to pay using the payment method specified by you in the order. For example, if you want the investor to pay using UPI, you must pass method=upi.
Given below is the sample code when the method is netbanking.
Given below is the sample code when the method is card.
Given below is the sample code when the method is upi.

Request Parameters

Create a request payload using the following attributes:amount mandatory : integer The transaction amount expressed in paise (currency supported is INR). For example, for an actual amount of ₹1, the value of this field should be 100.currency mandatory : string The currency in which the transaction should be made. You can create orders in INR only.receipt optional : string Receipt number that corresponds to this order, set for your internal reference. 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”.method mandatory : string The payment method used to make the payment. If this parameter is not passed, investors will be able to make payments using both netbanking and UPI payment methods. Possible values:
  • netbanking: Investors can make payments only using netbanking.
  • card: Investors can make payments using debit card.
  • upi: Investors can make payments only using UPI.
bank_account mandatory : object Details of the bank account that the investor has provided at the time of registration.account_number mandatory : string The bank account number from which the investor should make the payment. For example, 765432123456789 Payments will not be processed for an incorrect account number.name mandatory : string The name linked to the bank account. For example, Gaurav Kumar.ifsc mandatory : string The bank IFSC. For example, HDFC0000053.
When creating a custom checkout form for TPV, you can ensure that only the netbanking, debit card and UPI methods are displayed to the investor.Use the sample code given below to fetch all payment methods available to you.
Know more about the various payment methods.
Include the following script, preferably in the <head> section of your page:
Index HTML
Include the Javascript, Not the LibraryInclude the script from https://checkout.razorpay.com/v1/razorpay.js instead of serving a copy from your own server. This allows new updates and bug fixes to the library to get automatically served to your application.We always maintain backward compatibility with our code.

Single Instance on a Page

Invoke a Single Instance

Multiple Instances on Same Page

If you need multiple Razorpay instances on the same page, you can globally set some of the options:
Invoke Multiple Instances
After the order is created and the investor’s payment details are obtained, the information should be sent to Razorpay to complete the payment. The data that needs to be submitted depends upon the payment method selected by the investor.You can do this by invoking the createPayment method:
$(‘button’).click( function (){ razorpay.createPayment(…) })
Handler Function Vs. Callback URL
  • Handler Function:
    When you use the handler function, the response object of the successful payment (razorpay_payment_id, razorpay_order_id and razorpay_signature) is submitted to the Checkout Form. You need to collect these and send them to your server.
  • Callback URL:
    When you use a Callback URL, the response object of the successful payment (razorpay_payment_id, razorpay_order_id and razorpay_signature) is submitted to the Callback URL.
A successful payment returns the following fields to the Checkout form.
  • You need to store these fields in your server.
  • You can confirm the authenticity of these details by verifying the signature in the next step.

razorpay_payment_id : string Unique identifier for the payment returned by Checkout only for successful payments.razorpay_order_id : string Unique identifier for the order returned by Checkout.razorpay_signature : string Signature returned by the Checkout. This is used to verify the payment.
This is a mandatory step to confirm the authenticity of the details returned to the Checkout form for successful payments.
  1. Create a signature in your server using the following attributes:
    • order_id: Retrieve the order_id from your server. Do not use the razorpay_order_id returned by Checkout.
    • razorpay_payment_id: Returned by Checkout.
    • key_secret: Available in your server. The key_secret that was generated from the Dashboard.
  2. Use the SHA256 algorithm, the razorpay_payment_id and the order_id to construct a HMAC hex digest as shown below:
HMAC Hex Digest
  1. If the signature you generate on your server matches the razorpay_signature returned to you by the Checkout form, the payment received is from an authentic source.
Given below is the sample code for payment signature verification:
After you have completed the integration, you can set up webhooks, make test payments, replace the test key with the live key and integrate with other APIs.