This feature is still in beta - although it is publicly exposed, we expect to iterate on its exact functionality until generally available.
- Subscription preview: When creating a new subscription, view the line items on the invoice that will be issued for a checkout flow
- Upgrade preview: When executing a plan change, view the line items on invoices that will be issued, and credit notes that may be created (e.g. as the result of an in-advance fee credit). This can be useful for understanding charges on an upgrade or downgrade.
- Internal assertions and testing: When executing a backdated subscription action, understand the invoices that will be voided and/or re-issued
Usage
To use this functionality, pass the following header into your subscription mutation call:- Key:
Include-Changed-Resources
- Value:
true
changed_resources
with the following properties:
created_invoices
: These are the invoices that Orb will create as the result of this mutation. Note that Orb automatically creates a few lookahead invoices, which are invoices that are expected to exist in the future, so this might include more than the first invoice.voided_invoices
: These are the invoices that Orb will void as the result of this mutation.created_credit_notes
: These are the credit note objects that Orb will create as the result of this mutation.voided_credit_notes
: These are the credit note objects that Orb will void as the result of this mutation.
Currently, this list of changed resources is not exhaustive. Each individual entry is expected to be complete, but there may be other side effects (e.g. the removal of a draft invoice) that isn’t yet returned.