post https://api.juspay.in/txns#UPIpay
Create a UPI payment transaction. In UPI Pay transactions, the response of the /txns call will have SDK object parameters for generating the intent URI/ QR code etc. Merchants can then use these parameters appropriately
The response for the UPI Intent Payment API is a Payment Status Object (with two extra parameters: "txn_uuid" and "payment.sdk_params":{...} (object)) (click to open table)
Parameter | Type | Description |
---|---|---|
order_id | String | Unique Identifier for the order. |
txn_id | String | Transaction ID for the payment attempt. |
txn_uuid | String | Transaction UUID |
status | String | Status of the transaction. See Appendix below for status mapping. PENDING_VBV indicates that the transaction requires authentication to complete. |
payment:wwiw {{...},{...}} | Object | Contains authentication object:{ method, url, params } and sdk_params: {...} object. |
Parameters for the payment
object:
{click to open)
authentication: {method, url, params} | Object | Authentication parameterswwwww |
Parameters for the authentication
object:
(click to open)
Parameter | Type | Description | |
---|---|---|---|
method | String | HTTP Method for authentication. Can be one of GET or POST. (For redirection instructions, see the "Handling the Redirection Method" section.) | |
url | String | URL to which the user has to be taken to for completing the authentication | |
params | String | Present only when the method is POST. Parameter map that has to be sent along with the URL for authentication. Do not hardcode the params in your client * Never assume that you will receive param “x” or param “y”. This is completely dynamic and will vary on a case by case basis. |
sdk_params: {{...},...}wt | Object | List of SDK parameterswwwwww |
Parameters for the sdk_params
object:
(click to open)
merchant_vpa | String | "[email protected]" |
merchant_name | String | "juspay" |
tr | String | "202101345671229366" |
tid | String | "121313202101345671229366" |
mcc | String | "1234" |
amount | String | "1" |
Status | ID | Meaning |
---|---|---|
NEW | 10 | Newly created order |
PENDING_VBV | 23 | Authentication is in progress |
CHARGED | 21 | Successful transaction |
AUTHENTICATION_FAILED | 26 | User did not complete authentication |
AUTHORIZATION_FAILED | 27 | User completed authentication, but bank refused the transaction |
JUSPAY_DECLINED | 22 | User input is not accepted by the underlying PG |
AUTHORIZING | 28 | Transaction status is pending from bank |
⭣
The request consists of Payment Method Details and three extra parameters: upi_app, 'txn_type' (must be set to 'UPI_PAY'), and 'sdk_params' (set to "true" to return SDK parameters) Parameters are listed below:
Note:If using the Third-Party Validation (TPV) option, payment_method must be one from this table: (click to open)
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 |