v1

latestOpenAPI 3.1.02026-07-261444991.2 MB
Subscription Change

Apply subscription change

Apply a subscription change to perform the intended action. If a positive amount is passed with a request to this endpoint, any eligible invoices that were created will be issued immediately if they only contain in-advance fees.

post/subscription_changes/{subscription_change_id}/apply

Path parameters

subscription_change_idstring required

Request body

previously_collected_amountstring nullable

Amount already collected to apply to the customer's balance. If mark_as_paid is also provided, credit the difference to the customer's balance.

mark_as_paidboolean nullable

Mark all pending invoices that are payable as paid. If amount is also provided, mark as paid and credit the difference to the customer's balance.

descriptionstring nullable

Description to apply to the balance transaction representing this credit.

payment_received_datestring date nullable

A date string to specify the date the payment was received. Only applicable when mark_as_paid is true. If not provided, defaults to the current date.

payment_external_idstring nullable

An optional external ID to associate with the payment. Only applicable when mark_as_paid is true.

payment_notesstring nullable

Optional notes about the payment. Only applicable when mark_as_paid is true.

Response

OK

idstring required
status'pending' | 'applied' | 'cancelled' required
applied_atstring date-time nullable

When this change was applied.

cancelled_atstring date-time nullable

When this change was cancelled.

expiration_timestring date-time required

Subscription change will be cancelled at this time and can no longer be applied.

change_typestring required

The type of change (e.g., 'schedule_plan_change', 'create_subscription').

effective_datestring date-time nullable

When this change will take effect.

change_optionstring nullable

How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term', 'requested_date').

plan_idstring nullable

The target plan ID for plan changes.

billing_cycle_alignmentstring nullable

Billing cycle alignment for plan changes.