Discarding or resolving a payment event acts on the whole charge
discard, restore and resolve on a payment event now also apply to the other events of the same charge: its failed attempts, its refunds, its dispute.
A single charge usually leaves several events: the sale, its failed attempts, its refunds. Discarding or resolving one of them used to leave the others in place, so the charge still showed up as needing attention, now represented by a sibling event.
The three actions now work on the charge as a whole. The response still carries the event you named.
What breaks
discardremoves more than the event you name. Every active, eligible event with the sameexternal_payment_idis discarded with it, in one go and with the samedeleted_at. Without a payment id, events are grouped by the samesource_object_id(a credit note, a dispute). After a discard, a list call returns fewer rows than it did before.restorebrings back exactly what that discard removed: the events with the samedeleted_at. Events discarded in another operation stay discarded.resolveresolves every event of the charge that needs action, the same criterion as theneeds_actionfilter. That includes a failed event still waiting for an automatic retry, so a charge you have handled elsewhere is not retried and invoiced twice. It answers400only if the event you name is not eligible.
Does this affect you?
- If you call
discardorresolveevent by event and then check that the others of the same charge are still there, they no longer will be.
What else changed
- Events not yet processed are left alone. A
RECEIVEDevent other than the one you name is not discarded or resolved, and neither is an event that needs no action.
Endpoints
- POST/v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/discardDiscards every eligible event of the same charge
- POST/v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/restoreRestores everything that discard removed
- POST/v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/resolveResolves every event of the charge that needs action
Where to go next
A recurring template cannot produce an invoice with a negative total
Negative line totals on a template, a generated invoice adding up below zero, and editing a draft to a negative total are now rejected.
Recurring templates: quarterly, yearly, and an invoice cap
Templates gain quarterly and yearly cadences, an end after `max_invoices`, a `completion` reason, `draft_in_advance`, and the amount of the next invoice on every row.