Skip to main content
Once an invoice is issued, the remaining job is collection: getting it in front of the customer and getting it paid. This page covers that half of the invoice lifecycle — email delivery, the hosted invoice page, automatic charging (AutoPay), saving payment methods, the self-service portal, recording payments made outside Alguna, and reading payments back through the API. Use it when you are deciding how a customer will pay, or wiring your own systems to payment outcomes. Creating invoices is covered in Recurring Invoices and One-Off Invoices. What happens when payment fails or is late is in Dunning and Collections. Alguna is not a payment processor: it decides what is owed and when, and a connected processor such as Stripe moves the money. See How Alguna Works.

What the customer sees

1

Invoice email

When an invoice is issued, the customer’s contacts receive an email with the amount, due date, and a link to the hosted invoice. If AutoPay is on, the email says so and no action is needed. Delivery can be turned off for subscriptions created from a plan with the plan’s invoice_settings.send_invoices_to_customer.
Invoice email with the merchant logo, amount due, invoice number, billed-to, issue and due dates, and a totals summary
2

Hosted invoice page

Review Invoice opens the hosted page: itemised charges, tax breakdown, terms and due date, and the PDF.
Hosted invoice page with from and to addresses, issue and due dates, itemised line items with periods, tax and totals
3

Payment

AutoPay customers are charged automatically. Everyone else pays from the hosted page with a method your processor supports, or offline by bank transfer.
Enter Payment Information form with card number, expiry, CVC, cardholder name, a save-for-future-use option and the Pay button
4

Receipt

On success the customer receives a receipt email and PDF. Turn this off with the plan’s invoice_settings.send_receipts_to_customer.
Payment receipt email confirming the amount received, with the invoice number and paid totals

Who receives invoices

Invoices go to the customer’s contacts. Set them on the customer record; contacts replaces all existing contacts when provided.
PATCH /customers/{id} also accepts name, currency, aliases, and billing_address. See Update a customer and Customer Contacts.

AutoPay

AutoPay charges the customer’s default saved payment method when an invoice is issued, instead of waiting for them to pay. It is the subscription’s billing.auto_pay_invoices flag, with a plan-level default in invoice_settings.auto_pay_invoices; the dashboard also exposes it on the customer’s billing settings. Set it through the API on the subscription:
In the dashboard: Customers → [Customer] → Billing Settings, toggle AutoPay and pick the default payment method; or override per subscription in its Invoicing Settings. Customers can manage it themselves in the customer portal when you allow allow_autopay_edit. AutoPay needs a saved payment method. GET /invoices?autopay=true lists the invoices that will be collected this way.

Payment methods

A customer’s saved payment methods are held by your payment processor and referenced by Alguna. The kinds Alguna recognises are:

Save a payment method without charging

Create a checkout session with checkout_intent: "vault" and no plan_id, line_items, or amount. The customer enters their details on the hosted page (or embedded in your product); the method is vaulted against the customer and becomes available for AutoPay.
See Create a checkout session.

Customer portal

The hosted portal lets customers see their invoices, download PDFs, pay outstanding balances, and update billing details and payment methods. Mint a session and redirect the customer to its url. Sessions expire — check expires_at and create a fresh one rather than storing the URL.
Pass customer_alias instead of customer_id to address the customer by your own ID. Each section — plan overview, invoice list, billing details — can be shown or hidden per session. See Customer Portal and Create a customer portal session.

Record an external payment

When a customer pays outside Alguna, mark the invoice paid so the balance, status, and revenue reporting stay right. external_payment_source is required; amount_paid defaults to the full total and paid_date to today. The invoice becomes paid when the balance reaches zero.
external_payment_source accepts bank_transfer, cheque, payment_card, cash, or other. See Mark an invoice as paid.

Reading payments

Payments are read-only in the public API. Each payment carries amount, amount_received, amount_refunded, status, processor references (external_id, external_url), and allocations — the per-invoice split of the money, with reversed set when an invoice was reopened. Filter by customer_id or invoice_id.
Payment status values are pending_client_action, pending_authorization, processing, completed, failed, and voided. See List payments and Get a payment. Money going the other way is a refund. On the invoice itself, amount_paid and amount_remaining track collection against total, and GET /invoices filters on paid_date_gte / paid_date_lte.

Webhooks

Payloads are camelCase. See Webhooks for shapes and the webhooks quick start for a handler.

When payment fails or is late

  • A failed charge emits a payment_failed automation trigger. The built-in Failed Payment Notification automation emails the customer a link to update their payment method; you can add retries and reminders. See Dunning.
  • An issued invoice past its due date becomes overdue and the Overdue Invoice Reminder automation sends reminders. See Collections.
  • Reminders before the due date come from the Invoices Due Reminders automation, and one-off reminders from the send_invoice_reminder action. See Automations.
None of this is configurable through the public API; it is set up on the Automations page.

Next steps

Dunning

Recover failed payments automatically.

Refunds

Return money against a payment.

Wallets

Let customers prepay and settle invoices from a balance.

Customer Portal

Configure the self-service portal.