Hey! These docs are for version 3.2, which is no longer officially supported. Click here for the latest version, 1.0!

Third-Party Validation

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_ANDHRAAndhra Bank
JP_AXISAxis Bank
JP_CANRCanara Bank
JP_ICICIICICI Bank
JP_IOBIndian Overseas Bank
JP_KVBKarur Vysya Bank
JP_PNBPunjab National Bank
JP_SBIState Bank of India
JP_IDFCIDFC Bank
JP_HDFCHDFC Bank
JP_YESBYes Bank
JP_DLSDhanalaxmi Bank
JP_CSBCatholic Syrian Bank
JP_OBCOriental Bank Of Commerce
JP_LVBLakshmi Vilas Bank Retail
PAYUPI Intent Payment
COLLECTUPI Collect Payment
INAPPUPI 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)

FieldTypeDescription
bank_account_number* StringCustomer's bank account number
bank_ifscStringIFSC code for the bank branch
juspay_bank_codeStringJuspay bank code given from Eligibility API.
e.g. JP_HDFC
bank_beneficiary_nameStringName of account holder
bank_account_id* StringBank account id provided by Juspay while storing bank account details


* =
Conditional - either bank_account_number or bank_account_id is mandatory.

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”