Suspend API
This API enables you to suspend a specific subscription identified by {{SUBSCRIPTION_ID}}. To utilize this functionality, send a POST request to the provided URL with the relevant Bearer Token in the request header. Suspending a subscription temporarily stops its active billing. This API allows you to manage subscription states as needed.
Suspend API Request:
URL: https://accept.paymob.com/api/acceptance/subscriptions/{{SUBSCRIPTION_ID}}/suspend
Method: POST
Source: Merchant's server
Recipient: Accept's server
Authentication: Bearer Token {auth token}
Example response data:
{
"id": 3,
"client_info": {
"full_name": "Clifford Nicolas",
"email": "[email protected]",
"phone_number": "+86(8)9135210487"
},
"frequency": 7,
"created_at": "2023-11-28T14:44:53.587174",
"updated_at": "2023-11-28T14:44:53.587191",
"name": "Test Subscription",
"reminder_days": 3,
"retrial_days": 3,
"plan_id": 3,
"state": "suspended",
"amount_cents": 200,
"starts_at": "2023-11-28",
"next_billing": "2023-12-12",
"reminder_date": "2023-12-09",
"ends_at": null,
"resumed_at": null,
"suspended_at": "2023-12-05",
"integration": 3381753,
"initial_transaction": 147018623
}
Note :
In response to Suspend API request ,you will receive a state of the subscription in the response parameters as mentioned above in response body i.e. "state": "suspended".
You can also find the "resumed at" and "suspended at" parameters in the response body.
Updated 5 months ago