Mandate Execution API
After the successful Mandate registration, Merchant will receive a mandate_id, mandate_token from Juspay that should be stored against a customer at their end. For the subsequent charge transactions, the merchant is supposed to pass a combination of customer_id and mandate_id to do a debit without a 2FA. This API will create an order and perform a transaction with PG based on the mandate_id passed in the request.
Request
Response
API Endpoints
Sandbox Link
POST
https://sandbox.juspay.in/txns
Production Link
POST
https://api.juspay.in/txns
Headers
Body
200 : Success
400 : Invalid Input data
Error Codes
Scroll inside to view more
|
Error Codes
|
Description
|
Sample Error Message
|
|---|---|---|
401
| Invalid Authentication
| { "status": "error", "error_code": "access_denied" }
|
400
| Duplicate order id
| { "status": "DUPLICATE_ORDER_ID", "error_message": "Order already exists with the given order_id" }
|
400
| Invalid order amount
| {"status":"Invalid Request","error_message":Invalid order amount","error_code":"Invalid"}
|
400
| Mandate max amount not found
| {"status":"Invalid Request","error_message":"Mandate max amount not found.","error_code":"Invalid"}
|
400
| Amount not found in request.
| {"status":"ERROR","error_message":"Bad request.","error_code":"Bad request."}
|
400
| Order amount greater than mandate max amount
| {"status":"Bad Request","error_message":"Order amount greater than mandate max amount (<="" style="user-select: text;">max amount>)","error_code":"Invalid"}
|
400
| Currency not valid for mandate transaction
| {"status":"Bad Request","error_message":"currency not valid for mandate transaction.","error_code":"Invalid"}
|
400
| Mandate not found
| {"status":"invalid_request_error","error_message":"Mandate not found","error_code":"Mandate not found"}
|
400
| Mandate not in active state
| {"status":"invalid_request_error","error_message":"Mandate is in PAUSED state. Recurring cannot be executed","error_code":"invalid_request"}
|
404
| Passing Invalid URL
| -
|
400
| Not passing merchant_id field
| {"error_message":"Bad request.","status":"ERROR","error_code":"Bad request.","error_info":{"user_message":"Bad request.","fields":[{"field_name":"merchant_id","reason":"Field required but not passed."}],"developer_message":"Failed while parsing your request.","code":"MISSING_MANDATORY_PARAMETER","category":"USER_ERROR"}}
|
400
| Invalid Merchant ID
| {"user_message":"Invalid merchant id. Cannot process your request.","error_message":"Invalid Request","error":true,"error_info":{"user_message":"Please pass valid merchant_id in request.","fields":[{"field_name":"merchant_id","reason":"Invalid merchant_id."}],"developer_message":"merchant_id is invalid.","code":"RESOURCE_NOT_FOUND","category":"USER_ERROR"}}
|
400
| Perfroming a transaction by providing a different currency than the create mandate
| {"error_message":"currency not valid for mandate transaction","status":"Bad Request","error_code":"Invalid","error_info":{"user_message":"Invalid request params. Please verify your input.","developer_message":"currency not valid for mandate transaction","code":"INVALID_INPUT","category":"USER_ERROR"}}
|
200
| Passing invalid customer_id
| {"payment":{"authentication":{"method":"GET","url":"https://sandbox.juspay.in/v2/pay/finish/Merchant/mozsgdGv78wAz8dpfz/1738237998"}},"status":"AUTHENTICATION_FAILED","txn_uuid":"mozsdGvg78wAz8dpfz","resp_message":"{\"status\":422,\"errorCode\":\"800\",\"message\":\"Contract not found\",\"errorType\":\"validation\",\"pspReference\":\"QV5HW3RDKLSMC375\"}","resp_code":"FAILURE_RESPONSE","offer_details":{"offers":[]},"order_id":"1738237998","txn_id":"Merchant-1738237998-1"}
|
- Have questions?
- Need help? Contact support
- LLM? Read llms.txt

