- You want to treat the subscription as unentitled until payment is confirmed.
- You need to control the first payment flow yourself, especially if you don’t want Orb to immediately issue a fixed fee invoice.
- You want to show your user an invoice preview before creating the subscription — which makes this ideal for powering checkout flows.
- These benefits apply both to creating new subscriptions and mutating existing ones.
Example use case: Checkout flow

- Backend calls
POST /subscriptions
with headerCreate-Pending-Subscription-Change: true
- Orb returns the subscription preview and a
pending_subscription_change
ID - Backend uses the invoice preview to create a PaymentIntent with Stripe
- Frontend collects + confirms payment
- Backend calls
/subscription_changes/{id}/apply
once payment is successful, usually providing thepreviously_collected_amount
to cover the initial invoice.
Usage
To stage a pending change, pass this header on any subscription mutation endpoint:- Create subscription
- Schedule plan change
- Trigger phase
- Update price quantity
- Update trial for subscription
- Add or edit price intervals — particularly useful for powering checkout flows with add-ons
- Return a
pending_subscription_change
in the subscription response - Show the post-change state of the subscription (acts as a preview)
- Prevent further changes until this change is applied or canceled
You can only have one pending change at a time per subscription.
Follow-up actions
Once you’ve staged a change, use the following endpoints to manage it:Fetch the pending change
- View what will be changed
- Extract associated invoice amounts
- Display checkout UI to your user
Apply the change
You should explicitly pass
previously_collected_amount
when applying a change
if payment has been collected for the initial invoice to ensure that Orb’s initial
invoice is a $0 charge that is automatically marked as paid.previously_collected_amount
- Amount already collected externally (e.g., via Stripe, manual payment)
- This amount will be credited to the customer’s balance
- Helps avoid double-charging for amounts already collected in cases where mark_as_paid is not used
mark_as_paid
- Boolean flag to mark all payable invoices as finalized and paid
- Use when you’ve collected payment externally and want to mark invoices as paid
- Only affects invoices where
is_payable_now
is true in the changed resources - Does not modify customer balance when used alone
- Mark all payable invoices as finalized and paid
- Calculate the difference:
previously_collected_amount
- total_invoice_amount - Adjust the customer balance by this difference
Cancel the change
Expiration
Pending changes expire automatically after 1 day. This prevents abandoned sessions from blocking further changes.Previewing charges
The subscription returned when a pending change is staged reflects the intended state. To understand the associated invoices:- Inspect the
changed_resources
field on the subscription - Look at
created_invoices
, which include both immediate and lookahead (upcoming beyond that) invoices - Use the
is_payable_now
field on created invoices to identify which invoices need payment first. These will be invoices that are payable now with only in-advance fixed fee line items. You can use this field to determine which invoices should be paid to enable access to a subscription change (eg. plan upgrade).
Resources within
changed_resources
are a preview of the invoicing changes that will be made.
After applying, you can expect the shape of newly created invoices to match expect the id
field.- Identify the invoice to pay in your integration
- Validate invoice totals before confirmation
Subscriptions with a pending change cannot be mutated again until the change is applied or canceled.
Additional behavior notes
- Pending changes can be used on existing subscriptions, not just new ones. This includes actions like plan changes or price updates. Just note that you cannot perform another mutation while a pending change exists.
- If you’re using pending changes to create a new subscription, you won’t be able to fetch it by ID until the change is applied.
- Pending subscriptions are skipped in migrations. They must be confirmed before they’re considered active.
- Pending subscriptions do not appear in data exports. This avoids polluting analytics or reporting pipelines with draft states.
- A new pending change is created
- A pending change expires
- A pending change is applied
- A pending change is canceled