Order Status API

This is a Server-to-Server API that takes orderid as a path parameter and returns the status of the order along with other details.

Warning

Validate the order amount and status using the Order Status API before proceeding with order fulfillment. Neglecting this step could lead to mismatched orders, incorrect or fraudulent transactions.

If multiple transactions are performed for the same order, the final order status is determined by the highest precedence among the transaction statuses.
Precedence (in ascending order): NEW → PENDING_VBV → CHARGED

API Endpoints
Sandbox Link
GET
https://api.sandbox.juspay.io/orders/{order_id}
Production Link
GET
https://api.juspay.io/orders/{order_id}
Authorization Header
Headers
Path Params
Query Params
200 : Success
400 : Invalid Input data
401 : Authentication Failed
500 : Unexpected Error

Error Codes

Scroll inside to view more
Scenario
Error Code
Description
Sample Response
Not passing the version in header
-
Note: If a version is provided, the response will include data corresponding to that specific version date. It is recommended not to enforce strict validation on the entire response on the merchant's side to allow for future key additions.
Response with 200
Invalid order id
400
Bad Request
{"status":"NOT_FOUND","error_info":{"user_message":"Order Not Found","developer_message":"Order Not Found","code":"RESOURCE_NOT_FOUND","category":"USER_ERROR"},"status_id":40,"order_id":"173824171"}
Invalid API Key
401
Unauthorized
{"status":"error","error_code":"access_denied","error_info":{"user_message":"Unauthorized.","developer_message":"Invalid API Key. Please pass a valid and active api key.","code":"UNAUTHORIZED","category":"USER_ERROR"}}
Passing an invalid URL
404
Not Found

Sample Order Status Responses

Last updated 1 month ago