get https://sandbox.juspay.in/orders/
Similar to the Get Order Status API. This API is used to fetch the order status of a mandate. (click to open tables)
Response Parameters for the Get Mandate Order Status API:
This response is similar to the Order Object returned for the Get Order Status API, except that it includes a Mandate Object.
Parameter Type Description mandate:wwwwwwwwwwwt
{param1, param2, ....}Object
StringObject containing mandate details.
(Parameters listed in table below - click to open)Mandate Object Parameters:
Normally, just the first three parameters are returned for this API:
mandate_id, mandate_token,
andmandate_status
.
Full object is returned for the Get Mandate Execution Status and List Mandate APIs.
Field Type Description mandate_id String Mandate ID is a unique identifier generated and sent by Juspay after mandate creation. Must be sent with Notification and Revoke Mandate APIs. For the Mandate Execution API, either mandate_id
ormandate_token
can be used.mandate_token String Mandate token is another unique identifier generated and sent by Juspay after mandate creation. This is a 32 digit alphanumeric unique value. Can can be sent with the Mandate Execution API along with customer_id
. Allows a charge without a 2nd factor.mandate_status String--- Current status of the mandate. Must be one of the states listed in this table
mandate_type-- String EMANDATE in case of UPI/NB/Wallet payment
MANDATE in case of Card paymentmax_amount String Maximum amount for a mandate. Mandatory only if mandate.amount_rule
= VARIABLE.currency String ISO string of the currency. Default value: INR
(Indian Rupee). Among other accepted values are EUR, USD, GBP. This should be included also.activated_at String Time stamp of mandate activation
This should be included also.frequency String Defines the frequency of mandate execution, or how often a customer should be charged.
(see description formandate.frequency
here.)amount_rule String Data type ENUM
Possible values: FIXED, VARIABLE.
By Default, it is considered as VARIABLE.
In case of FIXED,max amount
will be equal toamount
start_date String Mandate start date in UNIX EPOCH timestamp (UTC timezone). In case of UPI mandate, the start date has to be today’s date. Mandatory only for UPI Mandate end_date String Mandate end date in UNIX EPOCH timestamp (UTC timezone), from when a mandate will move to EXPIRED state and recurring mandate will not be allowed. Mandatory only for UPI Mandate. block_funds Boolean Set to TRUE if funds have to be blocked while a mandate is being created. Should be TRUE for ONETIME and FALSE for Recurring. By default, value will be TRUE for ONETIME and FALSE for Recurring. rule_value String Determines the day of week or month that a mandate will be executed, depending on the mandate.frequency
.
(see description formandate.rule_value
here.)rule_type String ON / BEFORE / AFTER
For Razorpay, rule_type will be updated to BEFORE.
For Paytm, rule_type will be updated to AFTER
revokable_by_customer Boolean If FALSE, the mandate cannot be revoked by the customer once set. Applicable only for UPI mandate. It should be TRUE for Recurring and TRUE/FALSE for ONETIME. By default, value will be TRUE
payment_links:wwwwwwwwii
{web, mobile, iframe}Object
StringThree links for a Desktop , Mobile, and iFrame checkout screen for the given order
(Parameters listed in table below - click to open)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_gateway_response:
{param1, param2, ....}Object
StringObject containing payment gateway details
(Parameters listed in table below - click to open)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 String Date time (ISO representation) when order was created "2020-04-28T06:31:37Z" auth_id_code String Authorization ID Code "475926"
merchant_id String Unique identifier for the merchant. order_id String Unique Identifier for the order. id String Unique ID generated by Juspay for the given order. customer_id String Customer Identifier against which a mandate should be created. This has to be unique for a customer customer_email String Email address of the customer. customer_phone String Mobile number or fixed line number of the customer. 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. status String Status of the mandate order. If you receive “NEW”, then the order is successfully created. See Appendix for status mapping. status_id Integer Status ID is a numeric id corresponding to the status value. See Appendix for code meaning. amount Double This is the amount that a customer will be charged in this transaction. 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 Boolean value that determines if the amount was refunded or not. amount_refunded Double The amount that was refunded date_created String 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. udf1 String 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 Integer Unique numeric identifier for your preferred gateway. gateway_reference_id String Alphabetic reference to the payment gateway used (possible additional parameter) bank_error_code String Bank Error Code bank_error_message String Bank Error Message payment_method_type String Payment method type used at the time of creating a mandate payment_method String Payment method used at the time of creating a mandate payer_vpa String Payer VPA used during setting up mandate auth_type String Type of authentication used Other possible objects that should be included in response: (All objects listed here are also found in the response for Get Order Status API, except for the Mandate object.)
txn_detail:
{param1, param2, ....}Object
StringObject 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_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 below.) "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 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 String Date time (ISO representation) when order was created "2020-04-28T06:31:37Z"
card:
{param1, param2, ....}Object
StringObject containing credit/debit card details Card Object Parameters:
Field Type Description 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_issuer String Code for bank that issued the card
(Example: "HDFC Bank")card_isin String International Securities Identification Number for card (Example: "545721") card_brand String Brand of card ("MASTERCARD", "VISA", etc.)
Refunds: [{...},{...},..]
wwwwwwwwwwwwwwwwwArray
wwwAn array of Refund Objects with details of each refund (returned with the Refund Order API). One more possible object that could be included in response: (This was found in the "EMANDATE registration transaction order status" response for the Getting Order Status API).Refunds Object Parameters:
Field Type Description id String ID generated for the refund ref String Reference number provided by the bank for the refund amount Double Amount refunded (or to be refunded) created String Date time (ISO representation) when refund was created status String Status of the refund. Can be one of PENDING, SUCCESS, FAILURE, or MANUAL_REVIEW (see table below for meaning).
Status Meaning SUCCESS This means that the refund has been successfully executed. PENDING This would mean that the refund has been queued with JusPay or with the downstream system. FAILURE We were unable to process the refund successfully. You have to try again with 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.
bank_details:wwwwww
{param1, param2,...}Object
StringBank details. (This object was also found in the "Card" response for the List Mandate API.) Bank Details Object Parameters:
Field Type Description bank_name String Name of bank account_number String Bank account number beneficiary_name String Name of the customer in a given bank account ifsc String IFSC code for a bank branch
Order Status Mapping - Order status codes and meaning:
Status ID Meaning NEW 10 Newly created mandate 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 bank refused the transaction JUSPAY_DECLINED 22 User input is not accepted by the underlying PG AUTHORIZING 28 Transaction status is pending from bank
Mandate Status Mapping - Mandate status codes and meaning:
Status Description CREATED Mandate has been created, but awaiting status from PG. ACTIVE When PG accepts the chosen mode of payment, the mandate is set to the active state. The state remains ACTIVE (except when PAUSED temporarily) until terminated (either when mandate expires or customer/merchant decides to revoke the mandate). PAUSED Customer has an option to pause the mandate. Status changes to PAUSED when customer exercises this option. REVOKED Mandate is revoked by either the customer or the merchant. Revoked is a terminal state, once Revoked the status cannot be changed. FAILURE Mandate creation was unsuccessful. This is a terminal state, the merchant has to create a new mandate if failed. PENDING Mandate is in a pending state. EXPIRED Mandate validity has expired. This is a terminal state.