Stop a failed resume and keep the subscription paused
Changed onStops a failed resume and keeps the subscription paused.
When a resume's charge fails, the subscription stays paused and its open invoice is retried for about two weeks. This voids that invoice, so the retries stop, and restores the unused time credited at the pause, so the next resume bills what the failed one would have. The subscription stays paused with pause.resume_at cleared; resume it later with POST /v1/subscriptions/{id}/resume. A resume invoice that was already voided is accepted.
Refusals carry a typed code: subscription_pause_not_enabled (422) when the account isn't in the rollout, not_paused (422) when the subscription isn't paused, no_resume_invoice (422) when it has no failed resume to stop, resume_invoice_paid (422) when the resume invoice was paid in the meantime and the subscription resumed, resume_invoice_not_open (422) when that invoice is neither open nor void, pause_in_progress (409) while a pause request holds the subscription, and resume_in_progress (409) while a resume or another stop does.
Request
- Base URLhttps://api.withflex.com
- URLhttps://api.withflex.com/v1/subscriptions/{id}/resume/cancel
- AuthHTTP bearer
Path parameters
Response
An envelope wrapping a single subscription object.
Example response
{
"subscription": {
"subscription_id": "fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"created_at": "2026-06-15T14:30:00Z",
"items": [
{
"subscription_item_id": "fsubi_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"price": "fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"quantity": 2500,
"created_at": "2026-06-15T14:30:00Z",
"updated_at": "2026-06-15T14:30:00Z",
"test_mode": false
}
],
"latest_invoice": "fin_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"customer": "fcus_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"status": "incomplete",
"cancel_at_period_end": false,
"current_period_end": "string",
"current_period_start": "string",
"metadata": {
"order_id": "8842",
"channel": "shopify"
},
"test_mode": false,
"client_secret": {
"setup_secret": "string",
"payment_secret": "string"
},
"proration_behavior": "always_invoice",
"trial_start": "string",
"trial_end": "string",
"cancel_at": "2026-06-15T14:30:00Z",
"canceled_at": "2026-06-15T14:30:00Z",
"default_payment_method": "fpm_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"backup_payment_method": "fpm_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"discounts": [
{
"discount_id": "fdi_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"checkout_session": "fcs_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"customer": "fcus_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"subscription": "fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"invoice": "fin_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"source": {
"coupon": "fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"type": "coupon"
},
"promo_code": "fpromo_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
"test_mode": false,
"end": "string",
"start": "string"
}
],
"pause": {
"paused_at": "2026-06-15T14:30:00Z",
"resume_at": "2026-06-15T14:30:00Z",
"billing_cycle_anchor": "unchanged",
"proration_behavior": "always_invoice",
"credit": "unused_time"
}
}
}Changes
- info
endpoint added
- info