API Docs
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

HeaderTypeRequiredDescription
api-keystringYesYour secret API key.
X-Profile-IdstringNoNot 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

ParameterTypeDescription
subscription_idstringRequired. ID of the subscription.

Body Parameters

ParameterTypeRequiredDescription
amountintegerNoNew amount per period, in the smallest currency unit.
plan_idstringNoYour own plan label.
item_price_idstringNoYour 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}