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 |
---|---|---|
keymandatory | varchar This parameter is the unique Merchant Key provided by PayU for your merchant account. The Merchant Key acts as the unique identifier (primary key) to identify a Merchant Account in our database. | JPTXg |
commandmandatory | varchar This parameter must incluide the API command as NB_mandate_status. | NB_mandate_status |
var1mandatory | JSON This parameter is in JSON format where: - authpayuid: The value of mihpayid is returned in the payment response of the Registration transaction when the transaction is successfully completed. As described earlier, the merchant needs to map this value against the customer profile at his end so that correct authpayuid will be passed in the request.- requestId: Unique request value generated at merchant’s end to distinguish independent request call. | { “authpayuid”: “10731087875”, “requestId”: “1892432156” } |
hash mandatory | 512 SHA hash strings generated by encrypting request parameters so that any tampering can be avoided.hash = sha512(key|command|var1|SALT) |
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"
}