Skipping a Cycle
This API will be used by merchant to skip only next recurring subscription. We must pass merchant id, subscription id and action: “S” for skipping next recurring in request. If the request has valid details, we will get a success response as “Subscription updated successfully”.
https://kraken.airpay.co.in/airpay/api/updatesubscription.phpHeader
Section titled “Header”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| Content-Type required | String | The Content-Type header specifies the media type of the request or response body, allowing the receiver to correctly interpret the data. For XML data, use application/xml. | For JSON: application/json,For XML: application/xml |
Request Body
Section titled “Request Body”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| merchant_id required | Number | Merchant Identification Number | 11111 |
| subscription_id required | Number | airpay Subscription Id | 1000001 |
| action required | String | Request Type ”S”- Skipping next recurring | S |
| checksum required | Alphanumeric (10-200) | Checksum privatekey = hash(‘sha256’, secret.’@’.username.’: | :‘.password) Hash generated by: hash_hmac(‘sha256’, subscription_id+private_key+merchant_id+action, <secret_key>) Note: Use the same secret key, username and password provided on payment kit to generate private key |
Success 200
Section titled “Success 200”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| status required | Number | Status value will pass as per the condition | 200,533 |
| message required | String | Status message value will pass as per the condition | Subscription updated successfully,Error in unsubscription |
Request Example (JSON)
Section titled “Request Example (JSON)”{ "merchant_id" : "11111", "subscription_id" :"1000001", "action" : "S", "sb_date" : "12-12-2023", "checksum" : "49485184de39db56dad9b9e0aa6e6a29"}Request Example (XML)
Section titled “Request Example (XML)”<?xml version="1.0" encoding="utf-8"?><REQUEST> <SUBSCRIPTION> <MERCHANT_ID><![CDATA[11111]]></MERCHANT_ID> <SUBSCRIPTION_ID><![CDATA[1000001]]></SUBSCRIPTION_ID> <ACTION><![CDATA[S]]></ACTION> <SB_DATE><![CDATA[12-12-2020]]></SB_DATE> <CHECKSUM><![CDATA[92c617a556982a8d124ff2b7ce9eae3e]]></CHECKSUM> </SUBSCRIPTION></REQUEST>Success Response (JSON)
Section titled “Success Response (JSON)”HTTP/1.1 200 OK { "status" : "200", "message" : "Subscription updated successfully.", }Error Response (JSON)
Section titled “Error Response (JSON)”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>Error Response (XML)
Section titled “Error 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