Paying Invoices with Autopay
Automatically charge invoices when they're due using saved payment methods
Automatic payments provide a hands-free way to collect invoices by charging customers' saved payment methods on the due date. This payment method eliminates the need for customers to manually pay each invoice and reduces late payments. Configure autopay once, and invoices are automatically charged when due.
Automatic payments require two conditions: the invoice must have autopay_settings.allowed
set to true (which is the default), and the payer must have a default payment method
configured. When both are met, the invoice is automatically charged on its due date.
Prerequisites
Before using autopay for invoice payments, ensure you have:
Payment methods
Customers must have saved payment methods for automatic payment to work.
Autopay system
For comprehensive autopay configuration across invoices and schedules.
How Autopay Works for Invoices
Understand what happens when an invoice has autopay enabled.
The automatic payment process
Invoice Created
Invoice created with autopay enabled by default (autopay_settings.allowed: true)
Due Date Arrives
On the due date, Payload checks autopay eligibility
Payment Method Check
System verifies payer has a default payment method
Automatic Charge
Default payment method is charged for the balance
Status Update
Invoice status updates to paid on successful payment
If payment fails:
- Zero-amount allocation created on invoice for tracking
- Automatic retry for up to 5 days
Automatic Retry: Failed payments are automatically retried for up to 5 days after the due date. This increases successful collection rates without manual intervention.
Setting Up Default Payment Method
Configure a customer's default payment method for automatic invoice payments.
Set the payment method that will be charged for all automatic invoice payments.
Setting a default:
- Set
account_defaults.payingto"payments"or"all" - Only one payment method per account can be default
- Setting a new default removes previous default automatically
- Used for all autopay invoices unless overridden
Creating Invoice with Autopay
Create invoices that will be automatically charged on their due date.
Autopay is enabled by default when creating invoices. The invoice will be automatically charged on the due date if the payer has a default payment method.
Due Date Timing: Set the due date with enough advance notice for customers. Automatic payments process exactly on the due date, so ensure customers know when they'll be charged.
What Happens on the Due Date
On the invoice due date, Payload automatically processes the payment.
Eligibility check:
- Invoice has
autopay_settings.allowed: true - Payer has default payment method configured
- Invoice has balance due > 0
- Invoice status is
unpaidorpartially_paid
If eligible:
- Payment transaction created with
trigger: "automatic" - Default payment method charged for balance
- Payment allocation links transaction to invoice
- Invoice status updates to
paidorpartially_paid
If payment fails:
- Zero-amount allocation created for tracking
- Automatic retry scheduled
- Invoice remains
unpaid - Retries continue for up to 5 days
No Default Payment Method: If autopay is enabled but the payer has no default payment method, the automatic payment fails. Always ensure customers have a valid default payment method before enabling autopay.
Schema Reference
Fields relevant to automatic invoice payments:
Invoice Autopay Settings
autopay_settingsalloweddue_datepayeraccountAccountaccount_id ID of Account^acct_[A-Za-z0-9]+$payer[account]=nullmethodPaymentMethodmethod_id ID of PaymentMethod^pm_[A-Za-z0-9]+$Payment Method Defaults
account_defaultsfundingall, deposits, withdrawspayingall, payments, payoutsNext Steps
Explore automatic payments and configure invoice payment collection
Configure Comprehensive Autopay
Understand the complete autopay system with Autopay Overview for cross-platform automatic payment configuration, configure autopay for invoices and schedules with Enable Autopay, stop automatic payments when needed with Disable Autopay, and track and troubleshoot automatic payments with Monitor Autopay.
Alternative Payment Methods
Process invoice payments programmatically with Payment API for automated billing workflows, send payment links to customers with Payment Requests for self-service collection, and record offline payments with External Payments for check and wire transfers.
Automate Recurring Billing
Automate recurring invoice generation with Billing Schedules for subscription-based revenue, set up recurring billing with autopay using Create Billing Schedules, and track invoice progress through the complete lifecycle with Invoice Statuses.
Related articles
- Autopay Overview - Complete autopay system guide
- Enable Autopay - Configure automatic payments
- Payment API - Process payments programmatically
- Payment Requests - Send payment links
- Creating Invoices - Build invoices with autopay
- Billing Schedules - Automate recurring billing