Skip to content

Billing 0.17.0: Guest payers and EveryPay payments that record

Billing 0.17.0 fixes EveryPay payments, which charged the customer but left the invoice unpaid, lets an invoice be paid by someone without an account, and gives other modules a reliable signal when an invoice is paid, refunded or voided.

EveryPay payments are recorded

Every EveryPay payment failed to save: the customer was charged and the invoice stayed unpaid. EveryPay payments now record, and the payment method shows as “EveryPay”. A payment confirmed by any provider that settles an invoice now also announces the invoice as paid, as the admin’s mark-paid action already did, so pages that listen for it refresh.

Guest payers

An invoice’s payer can now be either a user or just a billing email, so another module can take money from someone who never registered, such as a guest paying for a booking. The invoice, receipt, credit note and payment confirmation emails then go to that billing email, and the admin list, the invoice page and the print views show it.

Invoice events for other modules

Other PhoenixKit modules, or the site itself, can register handlers that are told when an invoice is paid, refunded (partly or fully) or voided. Each event is queued as a background job in the same step as the invoice change and delivered at least once.

Upgrading

Run mix phoenix_kit.update to apply migration V5, which lets invoices and transactions exist without a user. Rolling back below V5 is refused while guest invoices exist. The events run on the billing Oban queue, so make sure your app’s Oban configuration lists it.

Full release notes: Billing 0.17.0

0.17.0 · 21 September 2026

Guest payers, a durable invoice-event hook for other modules, and EveryPay payments that record (PR #43).

Added

  • PhoenixKitBilling.InvoiceEvents — a durable way for other modules to learn that an invoice was paid, refunded or voided. A PhoenixKit module exports billing_invoice_event_handlers/0 (or a host sets config :phoenix_kit_billing, invoice_event_handlers: [...]); each handler implements handle_invoice_event/2. Events are enqueued as one InvoiceEventWorker Oban job per handler (queue :billing) in the same transaction as the invoice change, delivered at least once with the invoice as it is at delivery. :refunded fires for partial and full refunds alike.
  • Guest payers (migration V5). An invoice’s payer is either a user or a billing email: phoenix_kit_invoices.user_uuid and phoenix_kit_transactions.user_uuid become nullable, guarded by the phoenix_kit_invoices_payer_check CHECK and the changeset. Invoice, receipt, credit-note and payment-confirmation emails go to the billing email; the admin list, detail and print views show it. Rolling back below V5 refuses while guest rows exist. Run mix phoenix_kit.update to apply.
  • Invoice.payer_email/1 and Invoice.payer_name/1.

Fixed

  • EveryPay payments failed to record ("everypay" was missing from the transaction payment-method whitelist): the customer was charged and the invoice stayed unpaid. EveryPay now also displays as “EveryPay”.
  • A provider-confirmed payment that settles an invoice now broadcasts {:invoice_paid, _} (only the admin Mark paid action did), and record_payment/3 broadcasts after commit instead of inside the transaction.

Billing 0.17.0. Install or update: {:phoenix_kit_billing, "~> 0.17"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.