Body
Cancel Order
Cancels the specified order. Once canceled, the order cannot be processed or completed.
Request
Response
API Endpoints
Sandbox Link
POST
https://api.sandbox.juspay.io/merchants/{merchant_id}/order/{order_id}/cancel
Production Link
POST
https://api.juspay.io/merchants/{merchant_id}/order/{order_id}/cancel
Authorization Header
Basic Auth
*
Base64 Encoded Username:Password
Required
Consists of two parts.
Username: API Key obtained from Juspay dashboard
Password: Empty string
Example:- Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
Headers
Content-Type
String
application/x-www-form-urlencoded
Path Params
order_id
*
String
Mandatory
A unique identifier assigned to each order.
merchant_id
*
String
Mandatory
Merchant ID provided by Juspay
Request Schema: application/json
body
cancel_reason
*
String
Mandatory
Example:- Testing
200 : Success
Response Body
order_id
String
Example:- 12345
status
String
Example:- Success
message
String
Example:- Order cancelled successfully
400 : Invalid Input data
Response Body
status
String
error
error_message
*
String
Mandatory
invalid_card_number
error_code
*
String
Mandatory
invalid_request
Have questions?
- Need help? Contact support
- LLM? Read llms.txt

