Get or Create Customer
Creates a customer if they do not exist, or returns the existing customer by your external customer ID.
Use this as the primary entrypoint before billing operations so the customer record is always present and up to date.
Currency
Passcurrency to bill this customer in a currency other than your organization’s default. Their plans must offer a price in that currency via additional_currencies. If omitted, the customer’s currency is set by their first paid attach.
Body Parameters
Response
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
Your unique identifier for the customer
Customer's name
Customer's email address
Unique identifier (eg, serial number) to detect duplicate customers and prevent free trial abuse
Additional metadata for the customer
Stripe customer ID if you already have one
Whether to create the customer in Stripe
The ID of the free plan to auto-enable for the customer
Whether to send email receipts to this customer
Currency to bill this customer in (e.g. usd, eur). Defaults to the organization's default currency.
Billing controls for the customer (auto top-ups, etc.)
Miscellaneous configurations for the customer.
Fields to expand in the returned customer response, such as subscriptions.plan, purchases.plan, balances.feature, or flags.feature.
invoices, trials_used, rewards, entities, referrals, payment_method, subscriptions.plan, purchases.plan, balances.feature, flags.feature, billing_controls.auto_topups.purchase_limit Response
OK
Your unique identifier for the customer.
The name of the customer.
The email address of the customer.
Timestamp of customer creation in milliseconds since epoch.
A unique identifier (eg. serial number) to de-duplicate customers across devices or browsers. For example: apple device ID.
Stripe customer ID.
The environment this customer was created in.
sandbox, live The metadata for the customer.
Whether to send email receipts to the customer.
Billing controls for the customer (auto top-ups, etc.)
Active and scheduled recurring plans that this customer has attached.
One-time purchases made by the customer.
License seat pools granted by the customer's plans, with seat counts.
Feature balances keyed by feature ID, showing usage limits and remaining amounts.
Boolean feature flags keyed by feature ID, showing enabled access for on/off features.
Configuration for the customer.
Payment processors this customer is connected to (Stripe, Vercel, RevenueCat). Omitted entirely when the customer has not been created in any processor.
Invoices for this customer.
Entities associated with this customer.
Trial usage history for this customer.
Rewards earned or applied for this customer.
Referral records for this customer.
The customer's default payment method.