Subscriptions
API ReferenceSubscriptionsResume
Resume Subscription
Resumes a paused subscription. Billing restarts from the next billing date and any unpaid invoices can be handled as part of the resume.
POST /subscriptions/{subscription_id}/resume
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
subscription_id | string | Yes | The unique identifier for the subscription. |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
api-key | string | Yes | Your secret API key. |
X-Profile-Id | string | Yes | Profile ID for authentication. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
resume_option | string | No | When to resume: immediately or specific_date. Defaults to immediately if omitted. |
resume_date | string | No | ISO 8601 date when the subscription should resume. Required when resume_option is specific_date. |
charges_handling | string | No | How to handle charges accrued during the pause: invoice_immediately or add_to_unbilled_charges. |
unpaid_invoices_handling | string | No | How to handle any unpaid invoices: no_action or schedule_payment_collection. |
Request Example
curl -X POST 'https://api.sandbox.paychtec.com/subscriptions/sub_abc123/resume' \ -H "Content-Type: application/json" \ -H "api-key: snd_YOUR_API_KEY" \ -H "X-Profile-Id: prof_12345" \ -d '{ "resume_option": "immediately", "unpaid_invoices_handling": "schedule_payment_collection"}'Response
{
"id": "sub_abc123",
"status": "active",
"profile_id": "prof_12345",
"merchant_id": "mer_abc123",
"customer_id": "cust_123456789",
"merchant_reference_id": "mer_ref_123456789",
"next_billing_at": "2024-07-01T00:00:00Z"
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the subscription. |
status | string | Updated subscription status — will be active. |
profile_id | string | The profile this subscription belongs to. |
merchant_id | string | The merchant account identifier. |
customer_id | string | The customer this subscription belongs to. |
merchant_reference_id | string | Your own reference ID for this subscription, if set. |
next_billing_at | string | ISO 8601 timestamp of the next scheduled billing date. |
Resume Options
| Option | Description |
|---|---|
immediately | Resume the subscription right away. |
specific_date | Resume on the date provided in resume_date. |
Charges Handling
| Option | Description |
|---|---|
invoice_immediately | Generate and charge an invoice immediately for any accrued charges. |
add_to_unbilled_charges | Add accrued charges to the next billing cycle. |
Unpaid Invoices Handling
| Option | Description |
|---|---|
no_action | Leave unpaid invoices as-is. |
schedule_payment_collection | Attempt to collect payment on unpaid invoices when the subscription resumes. |
Error Responses
| Status Code | Description |
|---|---|
400 | Invalid resume data — check resume_option value or resume_date format. |
404 | Subscription not found — verify the subscription_id. |