iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://docs.lemonsqueezy.com/api/customers/the-customer-object
API Docs: The Customer Object • Lemon Squeezy

The Customer Object

A customer object represents a customer of your store. It 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.

Attributes

store_id

The ID of the store this customer belongs to.


name

The full name of the customer


email

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 be null 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.

{
  "type": "customers",
  "id": "1",
  "attributes": {
    "store_id": 1,
    "name": "John Doe",
    "email": "[email protected]",
    "status": "subscribed",
    "city": null,
    "region": null,
    "country": "US",
    "total_revenue_currency": 84332,
    "mrr": 1999,
    "status_formatted": "Subscribed",
    "country_formatted": "United States",
    "total_revenue_currency_formatted": "$843.32",
    "mrr_formatted": "$19.99",
    "urls": {
      "customer_portal": "https://my-store.lemonsqueezy.com/billing?expires=1666869343&signature=82ae290ceac8edd4190c82825dd73a8743346d894a8ddbc4898b97eb96d105a5"
    },
    "created_at": "2022-12-01T13:01:07.000000Z",
    "updated_at": "2022-12-09T09:05:21.000000Z",
    "test_mode": false
  }
}

Was this page helpful?