Mandate Plan API
Mandate Plan API
The Mandate Plan API allows merchants to create mandate plans for UPI-based recurring or one-time payments. A mandate plan defines the terms of a payment agreement, including the billing frequency, amount, and description.
- Request Type : POST
- Endpoint : /payments/mandate/plan
Request Attributes
These are the request attributes of the Mandate Plan API.
| Fields | Datatype | Mandatory | Description |
|---|---|---|---|
| name | String | Y | Must be a non-empty string. Maximum length of 100 characters. |
| frequency | String | Y | Must be one of the predefined allowed values: Once, Daily, Weekly, Monthly, Quarterly, Yearly. Case-sensitive. |
| amount | String | Y | Must be a positive integer greater than 0. Decimal values may not be accepted. |
| description | String | Y | Must be a non-empty string. Maximum length of 256 characters. |
Response Attributes
These are the response attributes of the Mandate Plan API
| Field | Datatype | Description |
|---|---|---|
| success | Boolean | Indicates the overall status of the API request. true if the request was processed successfully, false if an error occurred. |
| data | Object | Contains the detailed response payload. The fields within this object vary based on the success status. |
Sample Request & Response
cURL
curl --location 'https://api.zaakpay.com/api/payments/mandate/plan' \
--header 'checksum: 2d0e524122XXXXXX976860fc03XXXXXX46a5ecedXXXXXXX5020bb58' \
--header 'Content-Type: application/json' \
--header 'Cookie: JSESSIONID=7FE2EE4D879F959068E012DF95CDAF73.162.243' \
--header 'X-API-KEY: e27c67XXXXXXXX28XXX3319242e' \
--data '{
"name": "Subscription Payment",
"frequency": "Weekly",
"amount": 100,
"description": "Premium subscription service"
}'Sample Request
**Header : ** X-API-KEY: api key checksum: checksum of body json string : create using secret key
{
"name": "Subscription Payment",
"frequency": "Weekly",
"amount": 100,
"description": "Premium subscription service"
}Sample Response
{
"success": true,
"data": {
"planId": "PLAN_XXXXXXXXX1bc",
"responseCode": "1200",
"responseDescription": "Mandate plan created successfully"
}
}{
"success": false,
"data": {
"responseCode": "180",
"responseDescription": "Checksum received with request is not equal to what we calculated."
}
}Checksum Calculation
Create a concatenated string using the request parameters as given below. Checksum string will create based on the request parameters which are posted to Zaakpay in the same order as given in below string.
Now, Calculate the checksum using the HMAC SHA-256 algorithm using the string as data and your generated secret key.
{"name":"Subscription Payment","frequency":"Weekly","amount":-1,"description":"Premium subscription service"}2d0e524122531434058097976860fc030724d617ee585f46a5eced525020bb58Updated about 14 hours ago
