Overview
Billing customers represent the billing relationship between an organization and Stripe. They store essential billing information including name, email, currency, address, payment methods, and tax data. Each customer has aprovider_id that maps to the Stripe customer ID.
Customer Structure
Creating Billing Accounts
Billing accounts can be created automatically when organizations are created or manually via the API.Create Billing Account
Stripe Test Clock Support
For testing purposes, you can associate a billing account with a Stripe test clock:Configuration
Billing customer behavior can be customized through Frontier configuration:Auto-Create with Organization
Automatically create a billing account when a new organization is created:true
Default Plan
Automatically subscribe new organizations to a default plan:- Creates a billing account
- Subscribes to the specified plan
- Applies any trial period configured in the plan
Default Offline Mode
Control whether billing accounts are created in offline mode (not registered with Stripe immediately):true:
- Billing account is created in Frontier without a Stripe counterpart
- Stripe customer is created during the first checkout
- Useful for reducing Stripe resource usage for inactive customers
false
Onboard Credits
Award free credits to new organizations:0
Customer States
Billing customers can be in one of two states:| State | Description |
|---|---|
| active | Customer account is active and can make purchases |
| disabled | Customer account is disabled (e.g., deleted in Stripe) |
Address and Tax Information
Address
Customer addresses should include at minimum the postal code and country for tax calculation purposes:While full addresses are supported, only
postal_code and country are required for most billing operations.Tax Data
Store tax identification numbers for customers:us_ein: US Employer Identification Numbereu_vat: EU VAT numbergb_vat: UK VAT numberin_gst: India GST numberau_abn: Australia ABNca_bn: Canada Business Number
Currency
Set the billing currency using three-letter ISO 4217 currency codes in lowercase:usd: US Dollareur: Eurogbp: British Poundinr: Indian Rupeecad: Canadian Dollaraud: Australian Dollar
Offline Customers
Offline customers exist in Frontier but not in Stripe. This is useful for:- Reducing Stripe costs: Only create Stripe customers for active users
- Testing: Create test accounts without affecting Stripe data
- Delayed onboarding: Create accounts before full billing setup
Check if Customer is Offline
Data Synchronization
Frontier maintains a background syncer that periodically synchronizes customer data with Stripe to ensure consistency.Sync Process
Synchronized Fields
- Tax data (type and ID)
- Phone number
- Email (if not empty in Stripe)
- Name
- Currency
- Address (city, country, line1, line2, postal_code, state)
The sync frequency is controlled by the
refresh_interval configuration parameter.Creation Rules
Frontier enforces several rules when creating billing accounts:- Single Active Account: Only one active billing account per organization
- No Negative Balance: Cannot create new accounts if existing accounts have negative credit balance
- Offline Mode: If
default_offlineis true, accounts are created without Stripe registration
Automatic Creation Flow
Payment Methods
Customers can have multiple payment methods attached:Updating Customers
Update customer information via the API:Metadata
Store custom information with customers using metadata:Best Practices
Enable Auto-Creation
Set
auto_create_with_org: true to ensure every organization has billing capability.Use Offline Mode Wisely
Enable
default_offline if you have many organizations that may never purchase, to reduce Stripe costs.Award Onboarding Credits
Set
onboard_credits_with_org to give new users credits for trying pay-as-you-go features.Collect Full Addresses
While only postal_code and country are required, full addresses help with tax compliance and fraud prevention.
Troubleshooting
Customer Not Syncing with Stripe
Check that:- The customer has a
provider_id(not offline) - Background syncer is running (check
refresh_intervalconfig) - Stripe API credentials are correct
Cannot Create Second Billing Account
Frontier prevents creating multiple active billing accounts per organization. If you need a new account:- Disable or delete the existing account
- Ensure the existing account has no negative credit balance
Offline Customer Not Converting to Stripe
Offline customers are only created in Stripe during checkout. Ensure:- Customer completes a checkout session
- Webhook events from Stripe are being received
Next Steps
Subscriptions
Create and manage customer subscriptions
Credits
Check customer credit balance and transactions
Products and Plans
Define products customers can purchase
Entitlements
Verify customer feature access