Mandate Execution API
Purpose : This Mandate Execution API is used to manually trigger the execution of a mandate.
- If autoExecute = false in the Notify API, the mandate is not executed automatically.
- The merchant can use this API to manually trigger the mandate execution.
Request Type : POST
Endpoint : /api/payments/v1/modify
Request Attributes
These are the Request Attributes of the Execute Mandate API.
| Field | Type | Mandatory | Description |
|---|---|---|---|
| txnId | String | Yes | Unique transaction identifier |
| operationType | String | Yes | Value would be "EXECUTE_MANDATE" |
| data | Object | Yes | Additional information |
| data.mandateParentOrderId | String | Yes | Parent OrderId for the Mandate |
Response Attributes
These are the Response Attributes of the Execute Mandate API
| Field | Data Type | Description |
|---|---|---|
| success | Boolean | Indicates whether the API request was processed successfully. |
| message | Object | Contains the response message details. |
| message.code | String | Response code indicating the result of the transaction/request. |
| message.text | String | Descriptive message explaining the response status. |
| data | Object | Contains the transaction-related information. |
| data.txnId | String | Unique transaction ID assigned to the transaction. |
| data.status | String | Current transaction status. Possible values: PENDING, SUCCESS, FAILED. |
Sample Request & Response
For reference, below are the sample CURL request and Response of API . It takes all required attributes to hit the Execute Mandate API.
Sample Curl Request
curl --location 'https://api.zaakpay.com/api/payments/v1/modify' \
--header 'Content-Type: application/json' \
--header 'checksum: <HMAC_OF_REQUEST_BODY_WITH_MERCHANT_SECRET>' \
--data '{
"txnId": "TXN_123456789",
"operationType": "EXECUTE_MANDATE",
"data": {
"mandateParentOrderId": "orderid3110",
}
}'Sample Request
{
"txnId": "TXN_123456789",
"operationType" : "EXECUTE_MANDATE"
"data": {
"mandateParentOrderId": "orderid3110"
}
}Sample Response
The Response will be in JSON Format
{
"success": true,
"message": {
"code": "100",
"text": "The transaction was completed successfully."
},
"data": {
"txnId": "TXN_123456789",
"status": "PENDING|SUCCESS|FAILED"
}
}Response Codes
| HTTP | success | message.code | message.text | When |
|---|---|---|---|---|
| 200 | true | 100 | The transaction was completed successfully. | Capture submitted |
| 200 | false | 180 | Checksum received with request is not equal to what we calculated. | Invalid checksum |
| 200 | false | 183 | Unfortunately, the transaction has failed.Please try again. | Something went wrong |
| 200 | false | 216 | Order Id not found. | No orderId found to be captured |
| 200 | false | 423 | Invalid operation type sent with the request | Invalid operation type sent with the request |
NOTE
- All responses return HTTP 200 OK. Clients should use the success flag and message.code to determine the operation outcome.
- The checksum request header is mandatory.
- OrderId / TxnId uniquely identifies the transaction to be modified.
- Checksum will be calculated on request-body using merchant secret-key
Updated about 5 hours ago
Did this page help you?
