Void API

This will be used to void an authorized transaction. With this, amount will be refunded to the original source.

Status Understanding:

Scroll inside to view more
Payment Gateway Response
Juspay Transaction Status
Description
Pending
VOID_INITIATED
Void API was initiated from Juspay, and the request is pending at the gateway's end.
Success
VOIDED
Void API was initiated, and void transaction was successfully completed.
Failure
VOID_FAILED
Void API was initiated, but the void transaction failed.
Timeout/no response from gateway
AUTHORIZED
Void API request initiated from Juspay, but the request timed out, and no response is received from the gateway.
API Endpoints
Production Link
POST
https://api.juspay.in/v2/txns/{txn_uuid}/void
Authorization Header
Headers
Path Params
200 : Success
400 : Invalid Input data
401 : Authentication Failed

Error Codes:

Scroll inside to view more
Scenario
Error Codes
Description
Sample Error Message
Performing VOID on AUTHENTICATION_FAILED transaction
400
Bad Request
{"error_message":"Cannot Void AUTHENTICATION_FAILED Transaction","status":"Bad Request","error_code":"Invalid","error_info":{"user_message":"Invalid request params. Please verify your input.","developer_message":"Cannot Void AUTHENTICATION_FAILED Transaction","code":"INVALID_INPUT","category":"USER_ERROR"}}
Performing void on charged transaction
400
Bad Request
{"error_message":"Cannot Void CHARGED Transaction","status":"Bad Request","error_code":"Invalid","error_info":{"user_message":"Invalid request params. Please verify your input.","developer_message":"Cannot Void CHARGED Transaction","code":"INVALID_INPUT","category":"USER_ERROR"}}
Performing void on charged transaction
400
Bad Request
{"error_message":"Cannot Void CHARGED Transaction","status":"Bad Request","error_code":"Invalid","error_info":{"user_message":"Invalid request params. Please verify your input.","developer_message":"Cannot Void CHARGED Transaction","code":"INVALID_INPUT","category":"USER_ERROR"}}
Adding double slash at the end of the endpoint of void curl
404
Not Found
Passing Invalid txn_uuid in void curl
400
Bad Request
{"status":"NOT_FOUND","error_info":{"user_message":"Cannot process your request as txn not found.","developer_message":"Txn not found.","code":"RESOURCE_NOT_FOUND","category":"USER_ERROR"},"status_id":40}
Passing V1 in place of V2 in void curl
404
Not Found
Performing Void on transaction which is in'PENDING' status
400
Bad Request
{"error_message":"Cannot Void PENDING_VBV Transaction","status":"Bad Request","error_code":"Invalid","error_info":{"user_message":"Invalid request params. Please verify your input.","developer_message":"Cannot Void PENDING_VBV Transaction","code":"INVALID_INPUT","category":"USER_ERROR"}}
Last updated 9 months ago