UPI Intent Payment

The API can be used for providing intent support on app, mobile web or web (Dynamic QR). When the Customer chooses the UPI app on the payment page and clicks the Pay button, Merchant calls Juspay’s transaction API with parameters depending on different payment methods chosen by the Customer. The API response will have the parameters required for constructing the intent URI. Merchant can then construct the URI and invoke the APP using chrome intent feature.

Note

Please use the relevant parameters received from the Payment Method API in UPI for payment_method_type and payment_method fields.

Construction of UPI Pay String code through the string mentioned

The sdk_params obtained in the response of the UPI transaction call should be used for constructing the Intent URI.

Sample URI:
upi://pay?tr=202101345671229366&tid=121313202101345671229366&pa=juspay@axisbank&mc=1234&pn= Merchant%20Inc&am=1.00&cu=INR&tn=Pay%20for%20merchant

Format:
upi://pay?tr=...(enter the tr).......&tid=...(enter the tid).......&pa=.....(enter merchant_vpa)...&mc=....(enter the mcc)...&pn=....(enter
the Merchant name)...&am=.....(enter the amount).....&cu=INR&tn=....(description for the transaction)..

Note
  1. In the URI spaces are replaced by "%20". The URI is encoded. Kindly generate the intent URI dynamically ie, based on the params received in the sdk_params response. Do not hardcode any keys or values as it can differ with different PG’s.

  2. tid is not a mandatory paramater for constructing the Intent URI. If tid is not present in th sdk_params object, you may ignore it.

API Endpoints
Sandbox Link
POST
https://sandbox.juspay.in/txns
Production Link
POST
https://api.juspay.in/txns
Headers
Body
200 : Success
400 : Invalid Input data
Last updated 1 month ago