Customers
In Lemon Squeezy, a customer is created when they purchase a product for the first time.
A customer belongs to a Store and can have many Orders, Subscriptions, and License Keys.
The customer object
Attributes
store_id
The ID of the store this customer belongs to.
name
The full name of the customer
The email address of the customer.
status
The email marketing status of the customer. One of
subscribed
- This customer is subscribed to marketing emails.unsubscribed
- This customer has unsubscribed from marketing emails.archived
- This customer has been archived and will no longer recieve marketing emails.requires_verification
- The customers email address need to be verified (happens automatically).invalid_email
- The customers email address has failed validation.bounced
- The customers email has hard bounced.
city
The city of the customer.
region
The region of the customer.
country
The country of the customer.
total_revenue_currency
A positive integer in cents representing the total revenue from the customer (USD).
mrr
A positive integer in cents representing the monthly recurring revenue from the customer (USD).
status_formatted
The formatted status of the customer.
country_formatted
The formatted country of the customer.
total_revenue_currency_formatted
A human-readable string representing the total revenue from the customer (e.g. $9.99).
mrr_formatted
A human-readable string representing the monthly recurring revenue from the customer (e.g. $9.99).
urls
An object of customer-facing URLs. It contains:
customer_portal
- A pre-signed URL to the Customer Portal, which allows customers to fully manage their subscriptions and billing information from within your application. The URL is valid for 24 hours from time of request. Will benull
if the customer has not bought a subscription in your store.
created_at
An ISO 8601 formatted date-time string indicating when the object was created.
updated_at
An ISO 8601 formatted date-time string indicating when the object was last updated.
test_mode
A boolean indicating if the object was created within test mode.
Customer object
Create a customer
Create a customer.
Attributes
name
The name of the customer.
The email of the customer.
city
The city of the customer. Optional.
region
The region of the customer. Optional.
country
The ISO 3166-1 two-letter country code for the customer (e.g. US
, GB
, etc). Optional.
Relationships
store
The store this customer belongs to.
POST /v1/customers
Returns
Returns a customer object.
Response
Retrieve a customer
Retrieves the customer with the given ID.
GET /v1/customers/:id
Returns
Returns a customer object.
Response
Update a customer
Update a customer.
name
The name of the customer.
The email of the customer.
city
The city of the customer.
region
The region of the customer.
country
The ISO 3166-1 two-letter country code for the customer (e.g. US
, GB
, etc). Optional.
status
The email marketing status of the customer. Optional. One of:
archived
- This customer has been archived and will no longer receive marketing emails.
PATCH /v1/customers/:id
Returns
Returns a customers object.
Customers object
List all customers
Returns a paginated list of customers.
Parameters
store_id
Only return customers belonging to the store with this ID.
Only return customers where the email
field is equal to this email address.
GET /v1/customers
Returns
Returns a paginated list of customer objects ordered by created_at
(descending).