Express Checkout APIs are built around basic HTTP communication and closely follows the standards of REST. While the URL themselves are not specific to resources, the URL path is intuitive to reflect the action performed by the API.
All the APIs except POST /txns use Basic HTTP authentication scheme to authenticate the requests and identify your account. The API key can be obtained from the Juspay dashboard. Provide your API key as the basic auth username value. You do not need to provide a password.
Transaction POST /txns API is exempted from authentication so that the card numbers (sensitive data) can be posted from your servers to JusPay’s servers if you are PCI Compliant
Note: API Key is like the password to your account. You must never send this information to browser or application clients. Also, do not publish your API Key in publicly accessible areas such as Git repositories, Android/iOS clients, support forums, etc..
curl https://api.juspay.in/orders \ -u "$your_api_key:"
-H 'Content-Type: application/x-www-form-urlencoded'
Proper version headers ensure that we do not send any information that your client is not capable of handling. Our latest API version is 2018-10-25. The changelog for the revisions is given below.
Rewards_breakup info will be present in order status response
For this version, txn_sub_details param is included in order status response if txnObjectType == PARTIAL_CAPTURE.
If txn type is PREAUTH_AND_SETTLE, captured_amount, Refundable_amount params are included in order status response
For this version, metadata params is included in refund block in order status response
For this version, error_code param is included in refund block in order status response
For this version the Metadata that is passed during the order creation will be present in order status response
For this version, refund_source, refund_type params are included in refund block in order status response
For this version Status in order status API Response can be AUTO_REFUNDED with status_id as 36 if transaction is auto refunded
For this version, ‘gateway_reference_id’ param is included in order status response payload.
For this version, 'initiated_by’ param is included in order refund whether the refund was initiated by API or from the dashboard
Surcharge information is included in the order status response
Chargebacks against the order will be included in the response payload.
For this version, PG offer related params are included in the payment_gateway_response block.
Refunds are marked as MANUAL_REVIEW if they remain in PENDING state for a considerably longer duration. Typically, network timeout errors at the time of the transaction will result in such state and most importantly, for gateways that do not provide automatic reconciliation.
For this version, webhooks are posted whenever the payment is initiated for an order.
For order payment failures, webhooks will be sent to your server. Remember to configure this version in the Webhook settings page.
/order/status will respond with all the failed refunds too. Prior to this version, failed refunds were expressly excluded from the listing as clients did not have the capability to handle refunds in the failure state.
Refunds in the pending state will have status PENDING. Prior to this, refund status PENDING was sent as SUCCESS.
Note: JusPay introduced PENDING status for refunds as a large number of PayU refunds were initially queued and the success of these refunds was not guaranteed.
curl https://api.juspay.in/orders \ -H "version: 2018-10-25" \ -u "$your_api_key:"