I am trying to understand the pause and resume subscription functions. I can pause the subscription and I’ve had luck resuming it, but I cannot understand the dates, etc.
Let’s say I want to pause the sub at the end of the billing period, but the customer decided to reactive/resume before the new billing period (effectively un-pausing it). Is this possible? Or does the user have to wait until the new billing period to resume? I am able to pause and resume over and over in the subscription dashboard but I fail in the API. I am guessing I need to set some other params.
Successful Pause:
{
“subscription”: {
“id”: “e250fbce-746c-4871-9c07-20f28ec86fff”,
“location_id”: “LVGD0T9AA9TNK”,
“plan_id”: “NM345WR6EQABUELTFTTKOFNU”,
“customer_id”: “42JSFC1ZVP5A0FS533WVRXBH14”,
“start_date”: “2022-12-16”,
“charged_through_date”: “2023-01-16”,
“status”: “ACTIVE”,
“invoice_ids”: [
“inv:0-ChA9Evr9XWxq2OlF5lGccqCQEJwJ”
],
“version”: 1,
“created_at”: “2022-12-16T20:18:06Z”,
“card_id”: “ccof:ICBTCq1S7XlckEG43GB”,
“timezone”: “UTC”,
“source”: {
“name”: “Sandbox for sq0idp-E_upU7EIGFrTaPqrcOKu3g”
}
},
“actions”: [
{
“id”: “99b2439e-63f7-3ad5-95f7-ab2447a80673”,
“type”: “PAUSE”,
“effective_date”: “2023-01-16”
}
]
}
Successful Resume:
{
“subscription”: {
“id”: “e250fbce-746c-4871-9c07-20f28ec86fff”,
“location_id”: “LVGD0T9AA9TNK”,
“plan_id”: “NM345WR6EQABUELTFTTKOFNU”,
“customer_id”: “42JSFC1ZVP5A0FS533WVRXBH14”,
“start_date”: “2022-12-16”,
“charged_through_date”: “2023-01-16”,
“status”: “ACTIVE”,
“invoice_ids”: [
“inv:0-ChA9Evr9XWxq2OlF5lGccqCQEJwJ”
],
“version”: 1,
“created_at”: “2022-12-16T20:18:06Z”,
“card_id”: “ccof:ICBTCq1S7XlckEG43GB”,
“timezone”: “UTC”,
“source”: {
“name”: “Sandbox for sq0idp-E_upU7EIGFrTaPqrcOKu3g”
}
},
“actions”: [
{
“id”: “18ff74f4-3da4-30c5-929f-7d6fca84f115”,
“type”: “RESUME”,
“effective_date”: “2023-01-16”
}
]
}
Unsuccessful Re-Pause
{
“errors”: [
{
“code”: “BAD_REQUEST”,
“detail”: “The provided subscription e250fbce-746c-4871-9c07-20f28ec86fff
already has a pending pause date of 2023-01-16
.”,
“category”: “INVALID_REQUEST_ERROR”
}
]
}
This results in me going back to the subscription dashboard to reactive the sub from there at which point I can repeat the process. Ideally, my customer will be able to pause/resume over and over the same way I can from the dashboard. That way there will be no errors.
I think I have tried every combination of pause and resume with no luck.