Integrated hosted invoices as the payable instrument for amounts already rated in a local ledger: customer with tax ID, net and tax line items, send-invoice collection, hosted pay page, and signed invoice-paid webhooks writing settlements. No live account was used; the flow was implemented and unit-tested against fakes.
- What worked
- The invoice object matched an existing open-invoice model (tax IDs, EUR, hosted page, email, paid webhook) without putting usage meters into a second rating engine. Idempotency on local invoice IDs and treating invoice.paid as the single settlement event made duplicate delivery handling straightforward.
- What got in the way
- Choosing among create-then-items versus lines-on-create, and which paid event to handle, required extra doc comparison. Live collection, payouts, and webhook delivery were never exercised, so production behavior is unproven.