API Command: check_mandate_status
The Check Mandate Status API enables you to understand the current state of the mandate with cards at any time.
HTTP Method: POST
Environment
Test Environment | https://test.payu.in/merchant/postservice.php?form=2 |
Production Environment | https://info.payu.in/merchant/ |
Request parameters
Variable | Description | Example |
---|---|---|
key mandatory | varchar This parameter is the unique Merchant Key provided by PayU for your merchant account. | Your Test Key |
command mandatory | varchar For initiating a recurring transaction, the value of the parameter will be passed as “check_mandate_status” | check_mandate_status |
var1 mandatory | JSON This parameter is in JSON format where:* authPayuId (mandatory): 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 (mandatory): Unique request value generated at merchant’s end to distinguish independent request call. | { “authPayuId”: “10731087875”, “requestId”: “1892432asds15g6” `} |
hash mandatory | varchar 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=check_mandate_status&var1={“authPayuId”: “10731087875”,`“requestId”: “1892432asds15g6”x}&hash=e36568b2dfc460eab0eb3387fb7d90543ed861154f273b9593d6fcc152ed93a91e529c2f4be0965eeb57104e82d58889fa5efb52811ec78cbd1ad646e39c29a0”
Response parameters
Parameter Name | Description |
---|---|
status | Status defines acknowledgment from PayU. Possible values are: . active - returned when Mandate is in active state . revoked – returned when Mandate is canceled *. paused – returned when Mandate is paused. |
action | Always returned as “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. |
Sample response
{
"status": "active",
"action": "MANDATE_STATUS",
"authpayuid": "10731087875",
"amount": "100.00",
"mandateStartDate": "2020-07-19 00:00:00",
"mandateEndDate": "2020-12-20 00:00:00"
}