Introduction to TPV
Merchants have the option of using Third-Party Validation (TPV) to provide an extra level of security as a transaction request and response for NB and UPI Collect (/txns) APIs must also pass through the Juspay SDK (between the Merchant App and the Juspay Server). The Juspay SDK sets up a "Payment Page" for Juspay validation.
Procedure for Setup
The following steps outline the basic flow for setting up TPV for an NB or UPI Collect API transaction. Also check the flowchart below for a more visual representation of these steps:
1) Use Create or Get Customer API if needed to get customer_id and client_auth_token, which is required for SDK integration.

2) Get saved payment methods that support TPV by passing merchant_id in the Payment Methods API . Must set query parameter: options.add_tpv_payment_methods = true . (This will pass the request/response through the Juspay SDK instead of the Merchant Server , which will filter the list and add another list of payment methods that support TPV .)

3) Pass customer_id in the List Bank Accounts API to get detailed list of all bank accounts of a customer stored in the Juspay system. Compare this list with the TPV supported payment methods to filter them out and create Bank Account objects for the given customer that support TPV.

4) Create order with Create Order API with order_type = TPV_PAYMENT and one or more Bank Account objects in the bank_account_details array.

5) Use NB or UPI Collect API (/txns) to exectute the transaction. Juspay server sends Redirect Payment API to PayU, which redirects to bank page, where customer approves and bank validates. Further validation is done on the Juspay SDK via the "Juspay Payment Page".

Note that the Juspay SDK is bypassed in a non-TPV payment transaction:

6) Merchant can get update on the status of the order anytime with the Get Order Status API.

Flow Diagram for merchants using Third-Party Validation:
Changes for Netbanking and UPI Collect API transactions (/txns)
payment_method_type : Must be set to NB for Netbanking and UPI for UPI Collect payments.
payment_method : For both NB and UPI Collect transactions, payment_method must be one from the given table below for bank codes (supported only by the PayU gateway).
List of Banks Codes supported by Payu:
Bank Code (payment_method) | Bank Name |
---|---|
JP_ANDHRA | Andhra Bank |
JP_AXIS | Axis Bank |
JP_CANR | Canara Bank |
JP_ICICI | ICICI Bank |
JP_IOB | Indian Overseas Bank |
JP_KVB | Karur Vysya Bank |
JP_PNB | Punjab National Bank |
JP_SBI | State Bank of India |
JP_IDFC | IDFC Bank |
JP_HDFC | HDFC Bank |
JP_YESB | Yes Bank |
JP_DLS | Dhanalaxmi Bank |
JP_CSB | Catholic Syrian Bank |
JP_OBC | Oriental Bank Of Commerce |
JP_LVB | Lakshmi Vilas Bank Retail |
PAY | UPI Intent Payment |
COLLECT | UPI Collect Payment |
INAPP | UPI IN App Payment |
Bank Account object
Bank Account objects are elements in the bank_account_details array to be sent with the Create Order API (step 4). This array provides details of each bank account of a given customer that supports TPV. The JSON block is set up as: metadata.bank_account_details:[(...),(....),(...),..]
(Bank Account objects eclosed in parentheses)
Field | Type | Description | |
---|---|---|---|
bank_account_number | * | String | Customer's bank account number |
bank_ifsc | String | IFSC code for the bank branch | |
juspay_bank_code | String | Juspay bank code given from Eligibility API. e.g. JP_HDFC | |
bank_beneficiary_name | String | Name of account holder | |
bank_account_id | * | String | Bank account id provided by Juspay while storing bank account details |
Example:
metadata.bank_account_details : [
{“bank_account_number”:”23940293840”, ”bank_ifsc”:”HDFC011211”, “juspay_bank_code”:“JP_HDFC”, “bank_beneficiary_name”:“test”, “bank_account_id”:“bank_atghjv5hgh795”},
{“bank_account_number”:”23940293841”, ”bank_ifsc”:”ICIC011211”, “juspay_bank_code”:“JP_ICICI”, “bank_beneficiary_name”:“test”, “bank_account_id”:“bank_atghjv5hgh796”},
]
order_type = “TPV_PAYMENT”
Updated about 1 year ago