Void API
This will be used to void an authorized transaction. With this, the hold on the amount will be released.
Status Understanding:
Payment Gateway Response | SmartGATEWAY Transaction Status | Description |
---|---|---|
Pending | VOID_INITIATED | Void API was initiated from SmartGATEWAY, 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 SmartGATEWAY, but the request timed out, and no response is received from the gateway. |
Consists of two parts.
Username: API Key obtained from Juspay dashboard
Password: Empty string
Example:- Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
Merchant ID provided by HDFC SmartGateway
Unique Customer ID mapped against each customer. Customer ID should be unique for each customer. In case of guest checkout, they should pass sort of customer ID equivalent (could be a cart ID, session ID) that will serve the purpose. NOTE: The provided ID serves as the basis for stickiness/affinity across our various stacks. Failure to pass the same ID for the same customers could result in improper API functionality.
The unique id generated by SmartGATEWAY for a particular transaction.
Error Codes:
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"}} |