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.
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)..
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.
tidis not a mandatory paramater for constructing the Intent URI. Iftidis not present in th sdk_params object, you may ignore it.
application/x-www-form-urlencoded
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.
This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.
Example:- customer_1122
order_id pertaining to the order for which the payment is started.
ID of the merchant_account that you hold with us.
Must be UPI
Please use the relevant values received in payment_method field from the Payment Method API.
Must be UPI_PAY for Old UPI Intent Request. This field is obsolete for New UPI Intent Request
This is a boolean variable and accepts true/false. We recommend that you set this to true. If set to true, then the user is redirected to the return_url configured for the order. If set to false, then the user will be stopped at the response page from the gateway. Your client should be able to read the page/title to infer that the user has completed the transaction.
If it is set to json, then the response will be HTTP 200 with a JSON formatted text. Otherwise, the response is HTTP 302 with the Location attribute having the destination URL.
Should be passed as true
The package name of the UPI app used.
The key offers should be passed only when juspay offers are being used. The value for this key can set as the offerID which is received from /v1/offers/list api
eulgxNx4mgcnKwoqe2
9727125664Q20200107180320
PENDING_VBV
9727125664Q20200107180320
error
Order timed out
invalid_request

