Subscriptions
API ReferenceSubscriptionsUpdate Subscription
Update Subscription
Change a subscription's price or its plan labels.
PUT /subscriptions/:subscription_id/update
A new amount applies from the next billing period. A renewal that already failed and is being retried keeps charging the amount on its invoice, so the customer pays what they were billed for that period. On a subscription that has not been confirmed yet, the new amount is what confirm charges.
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 |
|---|---|---|---|
amount | integer | No | New amount per period, in the smallest currency unit. |
plan_id | string | No | Your own plan label. |
item_price_id | string | No | Your own price label. |
The card on a subscription cannot be changed through this endpoint.
Request Example
curl -X PUT 'https://api.moonlinkpay.com/subscriptions/sub_YZQbEYEnzrjzBorzniG3/update' \ -H "Content-Type: application/json" \ -H "api-key: snd_YOUR_API_KEY" \ -d '{ "amount": 2000}'Response
The subscription, in the same shape as Retrieve Subscription, with the new amount.
{"id": "sub_YZQbEYEnzrjzBorzniG3","status": "active","amount": 2000,"currency": "USD","billing_cycle_count": 0,"next_billing_at": "2026-12-03T18:01:10.526Z","cancel_at_period_end": false}