Unsubscribe, Pause, Resume
SUBSCRIPTION - Unsubscribe, Pause, Resume
Section titled “SUBSCRIPTION - Unsubscribe, Pause, Resume”This API will be used by merchant who wants to accept recurring payments via subscription model. Auto debit can be done based on the preference or interval. Unsubscribe allows to stop the subscription to no longer continue it, Pause allows you to pause the subscription for an interval and Resume allows you to again start the subscription after an interval.
https://kraken.airpay.co.in/airpay/api/updatesubscription.phpHeader
Section titled “Header”| Field | Type | Description |
|---|---|---|
| Content-Type | String | For JSON: application/json For XML: application/xml |
Parameter
Section titled “Parameter”| Field | Type | Description |
|---|---|---|
| merchant_id | Number | Merchant Identification Number (required) |
| subscription_id | Number | Airpay Subscription Id (required) |
| action | String | Request Type (required) “U” - Unsubscribe ”P” - Pause ”R” - Resume |
| sb_date | Date | Request date is future date when to update the subscription (Ex : DD-MM-YYYY) (required) |
| checksum | Alphanumeric | Checksum (length 10-200) (required) privatekey = hash(‘sha256’, secret.’@’.username.’: |
{ "merchant_id": "11111", "subscription_id": "1000001", "action": "U", "sb_date": "12-12-2020", "checksum": "92c617a556982a8d124ff2b7ce9eae3e"} <?xml version="1.0" encoding="utf-8"?> <REQUEST> <SUBSCRIPTION> <MERCHANT_ID><![CDATA[11111]]></MERCHANT_ID> <SUBSCRIPTION_ID><![CDATA[11111]]></SUBSCRIPTION_ID> <ACTION><![CDATA[U]]></ACTION> <SB_DATE><![CDATA[12-12-2020]]></SB_DATE> <CHECKSUM><![CDATA[92c617a556982a8d124ff2b7ce9eae3e]]></CHECKSUM> </SUBSCRIPTION></REQUEST>Success 200
Section titled “Success 200”| Field | Type | Description |
|---|---|---|
| status | Number | Status value will pass as per the condition |
| message | String | Status message value will pass as per the condition |
Success-Response:
Section titled “Success-Response:” HTTP/1.1 200 OK { "status" : "200", "message" : "Subscription updated successfully.", }Failed-Response:
Section titled “Failed-Response:” HTTP/1.1 200 OK { "status" : "400", "message" : "Charge not possible on this Date.", }Success-Response: XML
Section titled “Success-Response: XML”HTTP/1.1 200 OK <?xml version="1.0" encoding="utf-8"?> <RESPONSE> <SUBSCRIPTION> <STATUS>200</STATUS> <MESSAGE>Subscription updated successfully.</MESSAGE> </SUBSCRIPTION> </RESPONSE>Failed-Response: XML
Section titled “Failed-Response: XML”HTTP/1.1 200 OK <?xml version="1.0" encoding="utf-8"?> <RESPONSE> <SUBSCRIPTION> <STATUS>400</STATUS> <MESSAGE>Charge not possible on this Date. </MESSAGE> </SUBSCRIPTION> </RESPONSE>Status List:
Section titled “Status List:”200 - Subscription updated successfully533 - Error in unsubscription603 - Subscription is in Unsubscribed state604 - Amount should not be greater than <Your request amount>605 - Amount should be greater than or equal to 1619 - Subscription id is invalid620 - Subscription request was not accepted621 - Subscription action is invalid622 - Subscription is already set one skip recurring623 - Error in update amount subscription624 - Subscription is already in Subscribed state625 - Subscription is already in Paused state626 - No future recurring subscription627 - Error in pausing subscription628 - Error in resuming subscription