Subscriptions
API ReferenceSubscriptionsResume Subscription
Resume Subscription
Start billing a paused subscription again.
POST /subscriptions/:subscription_id/resume
Only a paused subscription can be resumed. It becomes active and billing restarts from the moment you resume:
- A period is still unpaid (the subscription was
unpaid, or a renewal was declined before the pause): it is charged straight away. This is a single attempt. If it declines, the subscription becomesunpaidagain. - Nothing is owed: the next charge is one billing period after the resume.
Use pause and then resume to collect from an unpaid subscription after the customer has fixed their card.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
api-key | string | Yes | Your secret API key. |
X-Profile-Id | string | No | Not needed: the subscription's own profile is used. If you send it, it must be that profile, otherwise the request fails with IR_37 (subscription not found). |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
subscription_id | string | Required. ID of the subscription. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
resume_option | string | No | immediately, the only supported option. Defaults to immediately. |
Request Example
curl -X POST 'https://api.moonlinkpay.com/subscriptions/sub_YZQbEYEnzrjzBorzniG3/resume' \ -H "Content-Type: application/json" \ -H "api-key: snd_YOUR_API_KEY" \ -d '{ "resume_option": "immediately"}'Response
{"id": "sub_YZQbEYEnzrjzBorzniG3","status": "active","merchant_reference_id": "order_1001","profile_id": "pro_YOUR_PROFILE_ID","merchant_id": "merchant_1234567890","customer_id": "cus_jane_42","next_billing_at": "2026-12-03T18:01:11.843Z"}next_billing_at is when the next charge happens: now if a period is owed, otherwise one period from the resume.
Errors
| Code | When |
|---|---|
IR_37 | No subscription with this ID on your account, or X-Profile-Id names a different profile than the subscription's. |
IR_06 | The subscription is not paused, or the subscription has a fixed number of payments and all of them are complete. |