Accessing the Payment Page
Clients reach the payment page by:
- Navigating to Client → My Invoices
- Clicking on any unpaid or overdue invoice
- Clicking Pay Now
The payment page shows the invoice details, any account credit being applied, the remaining amount due, and the available payment methods.
Account Credit Auto-Apply
Before the payment form is shown, Commerce checks the client's account credit balance. If credit is available:
- It is applied automatically — reducing the amount due
- An "Account credit applied: $X.XX" line is shown on the payment page
- If credit covers the full invoice, the invoice is marked paid immediately — no payment method is needed
[!TIP] Clients cannot opt out of credit auto-apply. If a client has a $50 credit and a $100 invoice, they will always pay $50 via gateway. This prevents credit from sitting unused while clients pay full price.
Payment Flow by Gateway Type
Inline Gateways (Stripe, PayPal, Authorize.net)
The payment form is rendered directly on the page. No redirect occurs.
| Step | What happens |
|---|---|
| 1 | Client fills in card or PayPal details |
| 2 | Gateway JS tokenises the data in the browser |
| 3 | Commerce creates a PaymentIntent / Order / charge token server-side |
| 4 | Client confirms (card 3DS, PayPal overlay, etc.) |
| 5 | Gateway fires a webhook to Commerce |
| 6 | Commerce marks the invoice paid and sends the receipt email |
Redirect Gateways (Mollie, 2Checkout)
| Step | What happens |
|---|---|
| 1 | Client clicks Pay with Mollie (or 2Checkout) |
| 2 | Client is redirected to the gateway's hosted payment page |
| 3 | Client completes payment on the gateway site |
| 4 | Client is redirected back to Commerce (success or cancel URL) |
| 5 | Gateway fires a webhook to Commerce |
| 6 | Commerce marks the invoice paid and sends the receipt email |
Bank Transfer
| Step | What happens |
|---|---|
| 1 | Client selects Bank Transfer |
| 2 | Page shows full bank details + the invoice number as the payment reference |
| 3 | Client submits — a pending payment record is created, invoice stays unpaid |
| 4 | Client makes the bank transfer outside Commerce |
| 5 | Admin confirms payment manually (see Recording a Manual Payment) |
Available Payment Methods
The payment page shows all gateways that are enabled and configured in Admin → Settings → Payment Gateways. A gateway appears only if:
- Its enabled toggle is on
- All required credentials are filled in (
isConfigured()returns true)
If no gateways are active, the client sees a "Contact us to arrange payment" message.
After Payment
When the invoice is paid:
| Invoice type | What happens |
|---|---|
| New order invoice | Service provisioning is triggered — hosting account created, welcome email sent |
| Renewal invoice | Service next_due_date advances by one billing cycle |
| Manual invoice | No provisioning — admin handles the service manually |
A payment receipt email is sent to the client for all invoice types.
Saved Payment Methods (Stripe)
If Stripe is active and the client has saved a card in a previous transaction, the saved card appears as an option on the payment page. Clicking it charges the card without re-entering card details. Clients can manage (remove) saved cards from Client → Billing → Saved Cards.
When a renewal invoice is generated for a client with a saved Stripe card, Commerce can auto-charge the card — no client action needed. This is controlled by Settings → Billing → Auto-charge saved cards.
[!WARNING] Auto-charge only works for Stripe. Other gateways require client action to pay each renewal invoice.