Wallet Billing

The billing system handles recurring subscriptions and invoices. It runs on a background scheduler and uses the Subscription account for automatic settlement.

Subscriptions

Subscriptions are recurring billing schedules linked to a merchant. Each subscription specifies a billing interval: daily, weekly, monthly, or annually. When a subscription is created, it starts generating invoices according to its schedule.

Invoice lifecycle

Status Meaning
draft Invoice created but not yet due.
scheduled Invoice is queued for settlement processing.
reminded A payment reminder email has been sent.
retrying Settlement is being retried after a failure.
paid Invoice settled successfully.
cancelled Invoice voided by the merchant.
failed All settlement attempts exhausted.

Automatic settlement

Every 5 minutes, a background task checks for invoices in scheduled status. It attempts to deduct the invoice amount from the payer's Subscription account. If the balance is sufficient, a transfer is executed and the invoice moves to paid. If the balance is insufficient, the invoice moves to failed or retrying depending on retry policy.

Daily billing jobs

A separate daily task runs at UTC midnight to:

  • Generate new invoices for active subscriptions.
  • Send payment reminder emails for overdue invoices.
  • Sync user and organization subscription plans.

Managing subscriptions

From the wallet Subscriptions page, you can view all active subscriptions, pause or resume billing, edit the billing interval, or cancel entirely. The system preserves a snapshot of the billing config when each invoice is created so changes do not affect in-progress invoices.

Email notifications

Invoice emails are sent via Postmark. Customers receive a notification when a new invoice is created and a reminder if payment has not been received. The merchant receives copies of all billing-related correspondence.