Enable Automatic Payments
Configure automatic payment collection for invoices and billing schedules
Enable automatic payments to collect invoices hands-free when they reach their due date. Configure default payment methods at the account level, enable autopay on individual invoices, or set up billing schedules with autopay for all generated invoices. Automatic payments streamline recurring billing, improve collection rates, and reduce manual payment processing.
Automatic payments are enabled by default on invoices and billing schedules
(autopay_settings.allowed defaults to true). To process automatic payments, the payer
account must have a default payment method configured. Set up the default payment method, and
invoices will automatically charge on their due date.
Prerequisites
Before enabling automatic payments, ensure you have:
Autopay overview
Understand how automatic payments work and when to use them.
Payment methods
Customers must have saved payment methods before enabling autopay.
Setting Up Default Payment Methods
Configure a payment method as the default for automatic invoice payments.
Setting a payment method as default:
- Use
account_defaults.payingfield to specify default behavior - Set to
"payments"to use for all payment transactions (including invoices) - Set to
"payouts"to use only for receiving payouts - Set to
"all"to use for both payments and payouts
Default payment method behavior:
- Only one payment method per account can be default for
"payments" - Setting a new default automatically removes default status from previous method
- Default payment method is used for all automatic invoice payments
- Can be overridden on specific invoices using
payer.method_id
Check current default payment method
# Find the default payment method for an account
payment_methods = pl.PaymentMethod.filter_by(
account_id="acct_customer123"
).all()
default_method = next(
(m for m in payment_methods
if (m.account_defaults or {}).get("paying") in ("payments", "all")),
None
)
if default_method:
print("Default payment method:", default_method.id)
print("Type:", default_method.type)
card = getattr(default_method, "card", None)
bank = getattr(default_method, "bank_account", None)
if card:
print("Card ending in:", card.get("last_four"))
elif bank:
print("Bank account ending in:", bank.get("last_four"))
else:
print("No default payment method set")Multiple Payment Methods: Customers can have multiple payment methods saved, but only one can be the default for automatic payments. Make it easy for customers to switch their default payment method in your application.
Override Default Payment Method
Override the default payment method for specific invoices or billing schedules by specifying
payer.method_id.
Override the default payment method for a specific invoice.
When to specify payment method:
- Different payment methods for different invoice types (e.g., business card for business expenses)
- Customer requests using specific card for certain purchases
- Billing high-value invoices to a specific payment source
- Testing payment methods before making them default
- Maintaining separate payment methods for different services
Override the default payment method for all invoices generated from a billing schedule.
Use cases:
- Business subscriptions charged to a specific business card
- Department-specific billing schedules with dedicated payment methods
- Test schedules using test payment methods
- Premium services with dedicated payment sources
Fallback to Default: If you don't specify payer.method_id, the system automatically uses
the account's default payment method. If no default payment method is configured, the
automatic payment will fail.
Schema Reference
Fields relevant to enabling automatic payments:
Payment Method Defaults
account_defaultsfundingall, deposits, withdrawspayingall, payments, payoutsaccount_id ID of Account^acct_[A-Za-z0-9]+$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]+$Billing Schedule Autopay
autopay_settingsallowedpayeraccountAccountaccount_id ID of Account^acct_[A-Za-z0-9]+$payer[account]=nullmethodPaymentMethodmethod_id ID of PaymentMethod^pm_[A-Za-z0-9]+$Next Steps
Continue configuring automatic payments and billing workflows
Manage Automatic Payments
Stop automatic payments when needed with Disable Autopay for customer requests or policy changes, track payment success rates and troubleshoot issues with Monitor Autopay to optimize collection, and review Autopay Overview to understand how automatic payments work.
Configure Billing
Set up recurring billing with Create Billing Schedules for subscription and membership billing, build one-time charges with Creating Invoices for non-recurring billing needs, and manage schedule settings with Update Billing Schedules to modify frequencies and autopay settings.
Manage Payment Methods
Understand available options with Payment Methods to choose the right payment types for your customers, add customer payment methods with Create Payment Methods for card and bank account collection, and modify settings with Update Payment Methods to change default payment method configurations.
Related articles
- Disable Autopay - Stop automatic payments
- Monitor Autopay - Track automatic payment activity
- Autopay Overview - How automatic payments work
- Billing Schedules - Automate recurring invoice creation
- Creating Invoices - Build invoices with autopay
- Payment Methods - Configure payment methods