The NB_mandate_status API enables you to understand the current state of the mandate with Enach at any time.
Environment
| Test Environment | <https://test.payu.in/merchant/postservice.php?form=2> |
| Production Environment | <https://info.payu.in/merchant/postservice.php?form=2> |
Request parameters
| Parameter | Description | Example |
|---|---|---|
key |
|
JPTXg |
command |
|
|
var1 |
|
{ |
hash |
512 SHA hash strings generated by encrypting request parameters so that any tampering can be avoided. |
Sample request
curl --location 'https://info.payu.in/merchant/postservice.php' \
--header 'accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: PHPSESSID=jp38t4gvop7ami1ksncksj398v; USERTXNINFO=68ed4df291d9b7.27710642' \
--data-urlencode 'form=2' \
--data-urlencode 'key=BmTY3G' \
--data-urlencode 'command=NB_mandate_status' \
--data-urlencode 'var1={"authpayuid":"10731087875","requestId":"1892432156"}' \
--data-urlencode 'hash=126f2a694a3817a1c331a3a8231fb16c094624e05602eb2bfbd7be1d969df7394391bfa77087a3d8ee758f2f8df0bbd88e5cb81dadf99ff41153cad1ff373ae6'Response parameters
| Parameter Name | Description |
|---|---|
| status | INITIATED/SUCCESS/FAILED/CANCEL_INITIATED/CANCEL_PENDING/CANCEL_SUCCESS/CANCEL_FAILED/CANCEL_INITIATION_FAILED |
| action | Always returned as “NB_mandate_status” to highlight the type of action. |
| authpayuid | Value of registration transaction ID sent in the request echoed back |
| amount | The billing amount echoed back. |
| mandateStartDate | Mandate start date echoed back. |
| mandateEndDate | Mandate end date echoed back. |
| deletedon | In case of status CANCEL_SUCCESS. It tells the actual date of mandate deletion. |
Sample response
Success scenario
- Mandate is active
{
"status": "SUCCESS", // INITIATED/SUCCESS/FAILED/CANCEL_INITIATED/CANCEL_PENDING/CANCEL_FAILED/CANCEL_INITIATION_FAILED
"action": "NB_mandate_status",
"authpayuid": "10731087875",
"amount": "100.00",
"mandateStartDate": "2022-07-19",
"mandateEndDate": "2023-12-20"
}
- Cancel is successful
{
"status": "CANCEL_SUCCESS",
"action": "NB_mandate_status",
"authpayuid": "10731087875",
"amount": "100.00",
"mandateStartDate": "2022-07-19",
"mandateEndDate": "2023-12-20",
"deletedon": "2023-03-20 00:00:00" // In case of status CANCEL_SUCCESS
}
Failure scenario
{
"status": 0,
"message": "ENACH Mandate entry not found",
"action": "NB_mandate_status"
}