Check the Net Banking Mandate Status API

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

Request parameters

ParameterDescriptionExample
key
mandatory
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
command
mandatory
varcharThis parameter must incluide the API command as NB_mandate_status.NB_mandate_status
var1
mandatory
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 NameDescription
statusINITIATED/SUCCESS/FAILED/CANCEL_INITIATED/CANCEL_PENDING/CANCEL_SUCCESS/CANCEL_FAILED/CANCEL_INITIATION_FAILED
actionAlways returned as “NB_mandate_status” to highlight the type of action.
authpayuidValue of registration transaction ID sent in the request echoed back
amountThe billing amount echoed back.
mandateStartDateMandate start date echoed back.
mandateEndDateMandate end date echoed back.
deletedonIn 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"
}