The response for all Order APIs is an Order Object (except for the Create Order API).
Other objects contained in the Order Object are listed on top:
(click to open tables)
Other objects contained in the Order Object are listed on top:
(click to open tables)
Parameter | Type | Description |
---|---|---|
payment_links:wwwwwwwwi {web, mobile, iframe} | Object String | Contains 3 strings that link to a Desktop optimized, Mobile optimized as well as iFrame checkout screen for the given order. |
Payment Links Object Parameters:
Field | Type | Description |
---|---|---|
web | String | Link to checkout page that is optimized for Desktop for the given order. |
mobile | String | Link to Mobile optimized checkout page for the given order. |
iframe | String | Link to iFrame checkout screen. This is typically embedded inside of your own page. |
Payment Links
These links can directly be emailed or messaged to your customers. They will be redirected using a link to enter payment information. If you wish to use your own branding, then you can embed the iframe link into your page. Note that, these links are not valid perpetually. As soon as your order expires (this can be changed via our dashboard), the link will cease to work.
txn_detail:wwwwwnwwwww {param1, param2, ....} | Object String | Object containing transaction details wwww |
Transaction Detail Object Parameters:
Field | Type | Description | Example |
---|---|---|---|
txn_uuid | String | Transaction UUID (available in Order Status API response) | "eulneT9JkaAPa1uv" |
txn_object_type | String | Transaction object type | "EMANDATE_REGISTER" |
txn_id | String | Transaction ID | "11327833" |
txn_amount | String | Amount of transaction | 1 |
tax_amount | String | Amount of tax applied | null |
surcharge_amount | String | Extra fee charged by merchant on payment | null |
status | String | Status of the order (see Status Mapping table.) | "CHARGED" |
redirect | boolean | If true, the user is redirected to the return_url configured for the order. | false |
order_id | String | Unique Identifier for the order. | "145678234" |
net_amount | String | Net amount of order | 1 |
gateway_id | String | Unique numeric identifier for your preferred gateway. (Refer to "Gateway Mapping" table.) | 19 |
gateway | String | Name or your preferred gateway | "PAYTM_V2" |
express_checkout | boolean | True if using Express Checkout | false |
error_message | String | Bank error message | "" |
error_code | String | Numeric code of bank error message | "" |
currency | String | ISO string of the currency. Use INR for Indian Rupee. Among other accepted values are EUR, USD, GBP. Default value: INR | "INR" |
created | Date- Time | Date time (ISO representation) when order was created | "2020-04-28T06:31:37Z" |
payment_gateway_response:i {param1, param2, ....} | Object String | Object containing payment gateway response details |
Payment Gateway Response Object Parameters:
Field | Type | Description | Example |
---|---|---|---|
txn_id | String | Transaction ID | "11327833" |
rrn | String | Authorization Retrieval Reference Number | "502913366745" |
resp_message | String | Result of API action | "Payment Successful" |
resp_code | String | Numeric code of response message | "0" |
epg_txn_id | String | Electronic Payment Gateway transaction ID | "1532690566017" |
created | Date- Time | Date time (ISO representation) when order was created | "2020-04-28T06:31:37Z" |
auth_id_code | String | Authorization ID Code | "475926" |
card:wwwwwwwwwwwwww {param1, param2, ....} | Object String | Object containing credit/debit card details |
Card Object Parameters:
Field | Type | Description |
---|---|---|
using_token | Boolean | True if using a token |
using_saved_card | Boolean | True if using a saved card |
saved_to_locker | Boolean | True if card has been saved to locker |
last_four_digits | String | Last four digits of card number |
name_on_card | String | Card holder name. Should contain alphabetical characters only. |
expiry_year | String | Expiry year of the card (Format: "yyyy") |
expiry_month | String | Expiry month of the card (Format: "mm") |
card_type | String | "CREDIT" or "DEBIT" |
card_reference | String | Unique reference ID for card (if any) |
card_issuer | String | Code for bank that issued the card (Example: "HDFC Bank") |
card_isin | String | International Securities Identification Number for card (Example: "545721") |
card_fingerprint | String | Card fingerprint |
card_brand | String | Brand of card ("MASTERCARD", "VISA", etc.) |
Refunds: [{...},{...},..] wwwwwwwwwwwnwwwwww | Array of Objects | An array of Refund Objects with details of each refund (returned with the Refund Order API). Should be returned if refunded is set to true in response. |
Parameters for each object in the Refunds array:
Field | Type | Description |
---|---|---|
unique_request_id | String | The unique request ID that is passed during refund initiation. Do not pass any special characters. |
status | String | The status of the refund initiated. Initial status will always be PENDING Status codes and meaningSUCCESS This means that the refund has been successfully executed. PENDING This would mean that the refund has been queued withJusPay or with the downstream system. FAILURE We were unable to process the refund successfully. You have to try again with a new unique_request_id .MANUAL_REVIEW This would mean that the refund request was sent an ambigious response from the payment gateway and the merchant has to manually reconcile it with the payment gateway to get the proper response. Also, any refunds which are in pending for more than 10 days are sent for manual review. |
sent_to_gateway | Boolean | The flag denotes if the refund was initiated to gateway. The initial status is always false, as refunds are queued at Juspay for a maximum of 15 minutes. |
refund_type | String | The type of refund. Values can be STANDARD or INSTANT |
refund_source | String | The name of gateway |
ref | String | The refund ID provided by the PG |
initiated_by | String | The source of initiation |
id | String | The reference ID provided by PG, if not available then its mapped to the unique request ID. |
error_message | String | The error message provided by the PG |
error_code | String | The error code provided by the PG |
amount | Integer | The refund amount passed in the request |
created | Time- stamp | The timestamp when refund was created |
merchant_id | String | Unique identifier for the merchant. |
order_id | String | Unique Identifier for the order. It is suggested to keep the order id length at a maximum of 21 characters irrespective of payment methods and gateways. |
id | String | Unique ID generated by Juspay for the given order. |
customer_id | String | String that uniquely identifies the customer. Generated by Juspay when you created customer object. |
customer_email | String | Email address of the customer. Must be present if backend gateway requires it. |
customer_phone | String | Mobile number or fixed line number of the customer. Must be present if backend gateway requires it. |
product_id | String | An identifier for the product on the Lender side for which the payment is being done. This field is just echoed back in the response so that Lender can differentiate on their side. Fits well for impulse purchase usecases. |
status | String | Status of the order. If you receive “NEW”, then the order is successfully created (see order status table for status mapping). |
status_id | Integer | Status ID is a numeric id corresponding to the status value. (see order status table for code meaning). |
amount | Double | This is the amount that a customer will be charged in this transaction. Will accept double values with up to two decimal places. For example, 100.15 is valid input but 100.1532 is not valid. |
effective_amount | Double | Amount that the customer actually pays |
currency | String | ISO string of the currency. Use INR for Indian Rupee. Among other accepted values are EUR, USD, GBP. Default value: INR |
refunded | Boolean | True if the order has been completely refunded. Will be false for partial refunds or if the order doesn’t have any refunds. |
amount_refunded | Double | Amount that has been refunded so far for this order. |
date_created | Date- Time | Date-time of mandate order creation |
return_url | String | A fully qualified URL such as http://shop.merchant.com/ to which the customer will be redirected after payment completion. This URL shouldn’t contain any query parameters. This URL takes higher precedence over the common return URL configured in your account settings. |
udf1 | String | udf1 to udf10 - User defined field which will be echoed back in the response from Juspay with a Max character limit of 255. |
udf2 | String | |
udf3 | String | |
udf4 | String | |
udf5 | String | |
udf6 | String | |
udf7 | String | |
udf8 | String | |
udf9 | String | |
udf10 | String | |
txn_id | String | Transaction ID |
txn_uuid | String | Transaction UUID |
gateway_id | String | Unique numeric identifier for your preferred gateway. (Refer to "Gateway Mapping" table.) |
gateway_reference_id | String | Alphabetic reference to the payment gateway used |
bank_pg | String | Payment gateway for bank. |
metadata: {param1, param2,...} | Object | Used for sending custom parameters to the payment aggregators, irrespective of default parameters. Check here for parameter list. |
offers: [{...},{...},...] | Array of Objects | The mechanism of running offers is the responsibility of merchants in collaboration with PG/Banks. |
bank_error_code | String | Bank Error Code |
bank_error_message | String | Bank Error Message |
payment_method_type | String | Must be either CARD, NB, WALLET, or UPI. Entered when creating the order or mandate |
payment_method | String | Entered when creating the order or mandate. Found in the given tables for the corresponding API and transaction type. |
payer_vpa | String | Payer VPA used during setting up mandate |
auth_type | String | Type of authentication used |
Status Mapping - Order status codes and meaning (click to open table)
Order Status | ID | Meaning |
---|---|---|
CREATED | 1 | This order status code in used only for the Create Order API, and is returned when order is successfully created. |
NEW | 10 | Newly created order. |
PENDING_VBV | 23 | Authentication is in progress. The customer has to approve the mandate through the PSP App of their choice. |
CHARGED | 21 | Successful transaction. The subscription cost of the period has been charged. |
AUTHENTICATION_FAILED | 26 | User did not complete authentication. |
AUTHORIZATION_FAILED | 27 | User completed authentication, but the 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 response for the Create Order API is a Status, Redirect Info object.
(click to open table)
(click to open table)
Field | Type | Description |
---|---|---|
id | String | Unique ID generated by JusPay for the given order. |
order_id | String | Given order ID. |
status | String | Status of the order. If you receive “CREATED”, then the order is successfully created (see Status Mapping table for status mapping). If you invoke this API with an order_id which is already created, then this API will return the result of /order/status API. |
status_id | String | Status ID is a numeric id corresponding to the status value. See Status Mapping table for code meaning. |
payment_links.web | String | Link to checkout page that is optimized for Desktop for the given order. |
payment_links.mobile | String | Link to Mobile optimized checkout page for the given order. |
payment_links.iframe | String | Link to iFrame checkout screen. This is typically embedded inside of your own page. |
Payment Links
Order create response now has payment links for web, mobile & iFrame. These links can directly be emailed or messaged to your customers. They will be redirected using a link to enter payment information. If you wish to use your own branding, then you can embed the iframe link into your page. Note that, these links are not valid perpetually. As soon as your order expires (this can be changed via our dashboard), the link will cease to work.
Order create response now has payment links for web, mobile & iFrame. These links can directly be emailed or messaged to your customers. They will be redirected using a link to enter payment information. If you wish to use your own branding, then you can embed the iframe link into your page. Note that, these links are not valid perpetually. As soon as your order expires (this can be changed via our dashboard), the link will cease to work.