Cancel Subscription

This API allows you to cancel a specific subscription identified by {{SUBSCRIPTION_ID}}. To use this functionality, send a POST request to the provided URL with the appropriate Bearer Token in the request header.

Please note only the suspended subscription can be resumed , cancel subscription will permanently close the subscription.

Cancel API Request:

URL: https://accept.paymob.com/api/acceptance/subscriptions/{{SUBSCRIPTION_ID}}/cancel

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": "canceled",
    "amount_cents": 200,
    "starts_at": "2023-11-28",
    "next_billing": "2023-12-12",
    "reminder_date": "2023-12-09",
    "ends_at": null,
    "resumed_at": "2023-12-05",
    "suspended_at": "2023-12-05",
    "integration": 3381753,
    "initial_transaction": 147018623
}

πŸ“˜

Note :

In response to Cancel Subscription API request ,you will receive a state of the subscription in the response parameters as mentioned above in response body i.e. "state": "canceled"..
You can also find the "resumed at" and "suspended at" parameters in the response body.