Overview
Customers are the people who access your content and purchase subscriptions. Each customer has a profile with contact information, marketing preferences, and custom metadata. Customers can have multiple addresses, payment methods, and subscriptions.
Customers are scoped to your site - the same person with accounts on two different sites is treated as two separate customers.
How It Works
- Create a customer - Add a new customer with their email, name, and any custom metadata
- Enrich the profile - Add addresses, payment methods, and organization associations
- Subscribe - Create subscriptions and process payments for the customer
Example: A visitor registers on your site. You create a customer with their email and name. They add a credit card and subscribe to your premium plan. You store their company name in metadata for personalized communications.
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /customers | List customers |
POST | /customers | Create customer |
GET | /customers/{id} | Get customer |
PUT | /customers/{id} | Update customer |
DELETE | /customers/{id} | Delete customer |
POST | /customers/credit_from_payment_method | Credit from payment method |
DELETE | /customers/{id}/metadata/{key} | Delete customer metadata |
Important Behaviors
- Soft delete: Customers are soft-deleted. Deleting a customer cancels all active subscriptions and removes related addresses, payment methods, and memberships.
- Email DNS validation: Email DNS validation can be skipped per request via the
skip_email_dns_validationsflag. - Expandable relationships: Multiple relationships can be expanded including
subscriptionsandaddresses. - Stripe import: When
import_payment_methodsis true, a Stripe payment gateway ID is required on the account.
Customer Fields
| Field | Description |
|---|---|
email | Primary email address (unique per site) |
first_name, last_name | Customer's name |
display_name | Public display name |
username | Unique username for login |
phone | Phone number |
metadata | Custom key-value data you define |
organization | Company or organization name |
language | Preferred language (en, fr, it, ko, es) |
timezone | Customer's timezone |
Marketing Consent
Track customer consent for communications:
| Field | Description |
|---|---|
mail_marketing | Email marketing opt-in (true/false) |
tele_marketing | Phone marketing opt-in (true/false) |
Expandable Relationships
When retrieving customers, you can include related data:
| Relationship | Description |
|---|---|
addresses | Shipping and billing addresses |
defaultSource | Default payment method |
organization | Associated organization details |
subscriptions | Active and past subscriptions |
Use the expand parameter: ?expand=addresses,subscriptions
