Revoke/Cancel Mandate
Revoke Mandate API
Purpose : This API is used to permanently cancel (revoke) an active mandate. Once a mandate is revoked, no further debits can be executed against it. This is typically used when a customer unsubscribes from merchant's service or explicitly requests to stop future payments.
Environment details:
- Staging Server: https://zaakstaging.zaakpay.com
- Live Server: https://api.zaakpay.com
Request Type : Post
Endpoint : /api/v2/updateTransaction
Request Attributes
These are the Request Attributes of Revoke Mandate API
Response Attributes
These are the Response Attributes of the Revoke/ Cancel Mandate API.
Sample Request
For reference, below are the sample CURL request and Response of API . It takes all required attributes to hit the Revoke/ Cancel Mandate API.
cURL Request
We have created a sample request of Revoke/ Cancel Mandate API with all required attributes and their values, in the order in which they’ll be sent to the API.
The resulting checksum calculated should be posted to the Zaakpay API along with other required attributes.
curl --location 'https://zaakstaging.zaakpay.com/updateTxn' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: JSESSIONID=3253388BCF7BF29453346258402DBC3E; JSESSIONID=DCAA163F07B1059473CF320670097D62; JSESSIONID=FB68D3733DE355D732259D5D18101B9E; JSESSIONID=CE50AF6F6B4FFAC53D311580FF05B3E5.165.243' \
--data-urlencode 'data={"merchantIdentifier":fbXXXXXXXXXXXXXXXX71a4,"orderDetail":{"orderId":ZPLXXXXXXXX2375,"amount":100,"productDescription":"Revoke Mandate"},"mode":"0","updateDesired":"54","updateReason":"Revoke"}' \
--data-urlencode 'checksum=9bda580XXXXXXXXXXXXXXX0dead9fade0d6ccef478b308f2ea'Sample Request
{
"merchantIdentifier": "fbXXXXXXXXXXXXXXXX71a4",
"orderDetail": {
"orderId": "ZPLXXXXXXXX2375",
"amount": 100,
"productDescription": "Revoke Mandate"
},
"mode": "0",
"updateDesired": "54",
"updateReason": "Revoke"
}
Sample Response
{
"merchantIdentifier": "fbXXXXXXXXXXXXXXXX71a4",
"orderDetail": {
"orderId": "ZPLXXXXXXXX2375"
},
"responseCode": "1114",
"responseDescription": "UPI Mandate revoked successfully",
"merchantRefId": "TXXXXXXXX3"
}{
"merchantIdentifier": "b1XXXXXXXXXXXXXXXXX3",
"orderDetail": {
"orderId": "ZaXXXXXXXX24"
},
"responseCode": "180",
"responseDescription": "Checksum received with request is not equal to what we calculated."
}Checksum Calculation
Create a string(JSON) using the request attributes as given below. Checksum string will create based on the request attributes which are posted to Zaakpay as same as given in the string below.
Now, Calculate the checksum using the HMAC SHA-256 algorithm using the string as data and your generated secret key. The resulting checksum calculated should be posted to the Zaakpay API along with other data.
The Checksum string will be:
Secret Key used: 0678056d96914a8583fb518caf42828a
{"merchantIdentifier":fbXXXXXXXXXXXXXXXX71a4,"orderDetail":{"orderId":ZPLXXXXXXXX2375,"amount":100,"productDescription":"Revoke Mandate"},"mode":"0","updateDesired":"54","updateReason":"Revoke"}9bda580ef7XXXXXfc55ddc26XXXXXXfade0dXXXX478b308f2eaUpdated about 14 hours ago
