API Update: new mark_as_paid field added to apply subscription change API
We have introduced a new mark_as_paid
field on the apply subscription changes API. This new field marks all payable invoices as finalized and paid, and works in tandem with the is_payable_now
field that exists on changed resources (see: https://changelog.withorb.com/api-update-is_payable_now-field-added-to-changed_resources.created_invoices-3pIhZC).
The previously_collected_amount
field is optional. If not provided, we assume the amount was correctly collected and simply mark invoices as paid without touching the customer balance.
When both mark_as_paid
and previously_collected_amount
are provided, we mark all payable invoices as paid and decrement customer balance by (previously_collected_amount
- total amount due). This should only be used when the amount collected outside the system differs from the total amount due. Note that the total amount due includes tax calculations, while the amount shown for pending changes does not include taxes (see: https://docs.withorb.com/essentials/pending-changes for more info).
Any negative customer balance will be automatically reflected on the next invoice.