Skip to main content
PATCH
Update Subscription
Subscription TransitionThe fields billing_cycles and availability.finish_at have an impact on each other. If both are completed during the subscription creation, it will transition to the COMPLETED state upon reaching the nearest event defined in these fields, whether it is the billing cycle or the corresponding finish_at. They are independent end conditions: whichever is reached first completes the subscription.When the availability object is included, finish_at is applied as sent: omit it or send it as null and any previously set end date is removed, so the subscription becomes open-ended and keeps renewing until it is canceled. This means that when you update availability.start_at, you must include finish_at in the same request if you want to keep the end date. start_at does not behave this way: omitting it leaves the current start date unchanged. Omitting the whole availability object leaves both dates unchanged.Note that availability.start_at can only be moved earlier on update. Sending a later date returns a 400 error: The availability start date cannot be greater than the current availability start date.
Retroactive Credential UpdateIf you have existing subscriptions that are failing rebills because of missing credential usage (e.g. from an initial CIT payment), you can use this PATCH endpoint to set payment_method.card.usage retroactively to fix the issue.
Scheduled Plan ChangesUse the plan_change block to move a subscription to another plan effective at its next billing cycle — no proration, no mid-cycle charge. The subscription must be ACTIVE or TRIALING and already on a plan; the target plan must be active and only one change can be pending at a time. Send "plan_change": null to undo a pending change; omitting the field never touches it. The pending change is returned as pending_plan_change on this endpoint and on the subscription object, and the subscription.plan_change_scheduled, subscription.plan_change_canceled and subscription.plan_changed webhooks track its lifecycle.amount, frequency, billing_date and country are managed by the plan and cannot be sent for a plan-linked subscription — combining any of them with plan_change returns 400.

Plan change errors

Each of the 409 and 422 errors below carries a current_status field alongside code and messages, holding the subscription’s status at the moment the request was rejected. The rejected request makes no change.
409 Conflict
A CANCELED or COMPLETED subscription is rejected earlier with 400 INVALID_STATE, which does not carry current_status. Validation problems in the block itself — a missing plan_id, an unsupported effective, a target plan in another currency, or a HONOR_PHASES ladder longer than the remaining billing cycles — return 400 BAD_REQUEST without current_status.

Authorizations

public-api-key
string
header
default:<Your public-api-key>
required
private-secret-key
string
header
default:<Your private-secret-key>
required

Path Parameters

id
string
required

The unique identifier of the subscription.

Body

application/json
name
string

The subscription plan name (MAX 255; MIN 3).

description
string

The subscription plan description (MAX 255; MIN 3).

account_id
string

The unique identifier of the account that will have the subscription plan available to use (MAX 64 ; MIN 36).

merchant_reference
string

Identification of the subscription plan (MAX 255; MIN 3).

soft_descriptor
string

Statement descriptor shown on the cardholder's bank statement. Updating it changes the descriptor applied to subsequent rebills generated by the subscription engine. Length and formatting limits vary by provider (for example, Unlimit truncates to 22 characters and Airwallex to 30). Worldpay does not read this field; it builds the statement narrative from payment_description instead.

Maximum string length: 255
country
string

The subscription's country.

amount
object

Specifies the amount object, with the value of each subscription payment and the used currency.

frequency
object

Specifies the frequency object. Defines the billing frequency for the subscription. Including type and value.

billing_cycles
object

Specifies the billing_cycles object. Defines the number of charges associated to the subscription.

customer_payer
object

Specifies the customer_payer object to identify the customer.

payment_method
object

Specifies the payment_method object. Supported types are CARD and PAYPAL_ENROLLMENT. You can use the token, the vaulted_token, or the card information through the card object.

availability
object

Specifies the availability object. Defines a date interval based on starting and ending dates when the subscription is available to use. If this object is omitted from the request, the availability dates are left unchanged. When it is included, omitting finish_at (or sending it as null) removes any previously set end date; omitting start_at leaves the current start date unchanged.

retries
object

The retries configuration to apply going forward. Accepts the same object as Create Subscription — including strategy and schedule — except cancel_on_exhausted_retries, which is create-only. Changes apply the next time retries are scheduled: a billing cycle already running its retries finishes on the configuration it started with, and the update takes effect from the next cycle.

plan_change
object | null

Schedules a move to another plan, effective at the next billing cycle. The subscription must be ACTIVE or TRIALING and already on a plan; the target plan must be ACTIVE. Only one change can be pending at a time. Send "plan_change": null to undo a pending change before it applies. amount, frequency, billing_date and country are managed by the plan and cannot be sent for a plan-linked subscription — combining any of them with plan_change returns 400.

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

Response

200

id
string
Example:

"0c7fed3e-ee0d-4d34-9547-778be4ec0798"

name
string
Example:

"Test Subscription"

account_id
string
Example:

"493e9374-510a-4201-9e09-de669d75f256"

country
string
Example:

"US"

description
string
Example:

"Subscription Test"

merchant_reference
string
Example:

"subscription-ref-merchant-AA01"

soft_descriptor
string
Example:

"ACME SUBSCRIPTION"

status
string
Example:

"ACTIVE"

amount
object
frequency
object
billing_cycles
object
customer_payer
object
payment_method
object
availability
object
metadata
any
pending_plan_change
object | null

The plan change scheduled for the next billing cycle, or null when none is pending.

created_at
string
Example:

"2024-09-30T12:04:23.265372Z"

updated_at
string
Example:

"2024-09-30T12:04:23.265372Z"