Skip to main content
Customers are created automatically when they make a purchase in your store. Each customer is specific to your store and has their own profile with contact information, purchase history, and product access.

Customer Object

A customer object contains the following information:
{
  "id": "cus_abc123xyz",
  "name": "John Doe",
  "first_name": "John",
  "last_name": "Doe",
  "email": "[email protected]",
  "avatar_url": "https://cdn.chariow.com/avatars/abc123.jpg",
  "phone": {
    "number": "+1 234 567 890",
    "country": {
      "name": "United States",
      "code": "US",
      "alpha_3_code": "USA",
      "dial_code": "+1",
      "currency": "USD",
      "flag": "🇺🇸"
    }
  },
  "store": {
    "id": "str_xyz789",
    "name": "My Digital Store",
    "logo_url": "https://cdn.chariow.com/stores/xyz789/logo.png",
    "url": "https://mystore.chariow.link"
  },
  "created_at": "2025-01-15T10:30:00+00:00",
  "updated_at": "2025-01-20T14:45:00+00:00"
}

Customer Properties

PropertyTypeDescription
idstringUnique customer identifier with cus_ prefix
namestringFull name (combination of first and last name)
first_namestringCustomer’s first name
last_namestringCustomer’s last name
emailstringCustomer’s email address
avatar_urlstringURL to the customer’s avatar image
phoneobjectPhone number with country information
storeobjectStore the customer belongs to
created_atstringISO 8601 timestamp of when the customer was created
updated_atstringISO 8601 timestamp of when the customer was last updated

Listing Customers

Retrieve all customers for your store:
curl -X GET "https://api.chariow.com/v1/customers" \
  -H "Authorization: Bearer sk_live_your_api_key"

Query Parameters

ParameterTypeDescription
per_pageintegerNumber of customers per page (default: 15, max: 100)
cursorstringCursor for pagination (use next_cursor from previous response)
searchstringSearch by name, email, or phone number
start_datestringFilter customers created from this date (Y-m-d format)
end_datestringFilter customers created until this date (Y-m-d format)

Searching Customers

Search for customers by name, email, or phone number:
curl -X GET "https://api.chariow.com/v1/customers?search=john" \
  -H "Authorization: Bearer sk_live_your_api_key"

Filtering by Date Range

Retrieve customers created within a specific date range:
curl -X GET "https://api.chariow.com/v1/customers?start_date=2025-01-01&end_date=2025-01-31" \
  -H "Authorization: Bearer sk_live_your_api_key"

Example Response

{
  "data": [
    {
      "id": "cus_abc123xyz",
      "name": "John Doe",
      "first_name": "John",
      "last_name": "Doe",
      "email": "[email protected]",
      "avatar_url": "https://cdn.chariow.com/avatars/abc123.jpg",
      "phone": {
        "number": "+1 234 567 890",
        "country": {
          "name": "United States",
          "code": "US",
          "alpha_3_code": "USA",
          "dial_code": "+1",
          "currency": "USD",
          "flag": "🇺🇸"
        }
      },
      "store": {
        "id": "str_xyz789",
        "name": "My Digital Store",
        "logo_url": "https://cdn.chariow.com/stores/xyz789/logo.png",
        "url": "https://mystore.chariow.link"
      },
      "created_at": "2025-01-15T10:30:00+00:00",
      "updated_at": "2025-01-20T14:45:00+00:00"
    }
  ],
  "pagination": {
    "next_cursor": "eyJpZCI6NTB9",
    "prev_cursor": null,
    "has_more": true
  }
}

Getting a Single Customer

Retrieve a specific customer by their public ID:
curl -X GET "https://api.chariow.com/v1/customers/cus_abc123" \
  -H "Authorization: Bearer sk_live_your_api_key"

Customer Lifecycle

1

Customer Created

A new customer record is created when they make their first purchase.
2

Purchase Recorded

Each purchase is linked to the customer’s profile.
3

Access Granted

The customer receives access to their purchased products (downloads, courses, licenses).
4

Portal Access

Customers can access the customer portal to view their purchases and downloads.

Common Use Cases

Sync customers to your CRM by fetching new customers using date filters:
// Fetch customers created in the last 24 hours
const today = new Date().toISOString().split('T')[0];
const yesterday = new Date(Date.now() - 86400000).toISOString().split('T')[0];

const response = await fetch(
  `https://api.chariow.com/v1/customers?start_date=${yesterday}&end_date=${today}`,
  { headers: { 'Authorization': 'Bearer sk_live_your_api_key' }}
);

const result = await response.json();
// Sync result.data to your CRM
Add customers to your email lists based on their purchases:
// Get customer details for email list
const response = await fetch(
  'https://api.chariow.com/v1/customers/cus_abc123xyz',
  { headers: { 'Authorization': 'Bearer sk_live_your_api_key' }}
);

const result = await response.json();

await addToMailingList({
  email: result.data.email,
  firstName: result.data.first_name,
  lastName: result.data.last_name,
  tags: ['customer', 'purchased']
});
Look up a customer by email when they contact support:
curl -X GET "https://api.chariow.com/v1/[email protected]" \
  -H "Authorization: Bearer sk_live_your_api_key"
The search parameter matches against name, email, and phone number fields.
Generate monthly customer acquisition reports using date filters:
curl -X GET "https://api.chariow.com/v1/customers?start_date=2025-01-01&end_date=2025-01-31&per_page=100" \
  -H "Authorization: Bearer sk_live_your_api_key"
This retrieves all customers who made their first purchase in January 2025.