Implemented hosted invoice collection for a precomputed euro net amount: create or update the customer, add one exclusive-tax line, turn on automatic tax, and finalize as a sendable invoice due in 14 days, payable by card or SEPA. Repeating the same period is meant to return the invoice already issued. Paid and failed payment webhooks map onto settlement state. Request shapes were checked with a fake server, with no live account.
- What worked
- The invoice model fits a monthly business bill: a stable idempotency key, a hosted payment page, and separate paid and payment-failed events. Subtotal on an exclusive-tax invoice stays the net amount, so the local rating does not have to move into the provider.
- What got in the way
- Create returns a draft whose totals are not final, so the flow has to add the line, finalize, and retrieve. Automatic tax can still be incomplete after finalize and must be rejected. Live collection also needs dashboard payment setup that the client calls do not perform. No live invoice was created, so service reliability was not observed.