API Command: NB_mandate_status
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 -X \
\
POST "https://test.payu.in/merchant/postservice.php?form=2" -H "accept: application/json" -H \
\
"Content-Type: application/x-www-form-urlencoded" -d”key=JF*y&command=NB_mandate_status&var1={“authpayuid”: “10731087875”,“requestId”: “1892432156”}
&hash=e36568b2dfc460eab0eb3387fb7d90543ed861154f273b9593d6fcc152ed93a91e529c2f4be0965eeb57104e82d58889fa5efb52811ec78cbd1ad646e39c29a0”
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"
}