curl -X GET "https://api.chariow.com/v1/sales?status=completed&per_page=20&from=2025-01-01&to=2025-01-31" \
-H "Authorization: Bearer sk_live_your_api_key"
const response = await fetch('https://api.chariow.com/v1/sales?status=completed&per_page=20&from=2025-01-01&to=2025-01-31', {
headers: {
'Authorization': 'Bearer sk_live_your_api_key'
}
});
const result = await response.json();
console.log(result.data); // Array of sales
console.log(result.pagination); // Pagination info
$ch = curl_init('https://api.chariow.com/v1/sales?status=completed&per_page=20&from=2025-01-01&to=2025-01-31');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer sk_live_your_api_key'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
import requests
response = requests.get(
'https://api.chariow.com/v1/sales',
params={
'status': 'completed',
'per_page': 20,
'from': '2025-01-01',
'to': '2025-01-31'
},
headers={'Authorization': 'Bearer sk_live_your_api_key'}
)
data = response.json()
sales = data['data']
{
"data": [
{
"id": "sal_abc123xyz",
"status": "completed",
"tracking": {
"event_id": "sal_abc123xyz",
"currency": "USD",
"value": 79.2
},
"original_amount": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
},
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"discount_amount": {
"value": 19.80,
"formatted": "$19.80",
"short": "20",
"currency": "USD"
},
"payment": {
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"status": "success",
"exchange_rate": {
"value": 1,
"formatted": "$1.00",
"short": "1",
"currency": "USD"
},
"failure_error": null
},
"shipping": {
"address": "123 Main Street",
"city": "New York",
"state": "NY",
"country": "US",
"zip": "10001"
},
"invoice_download_url": "https://api.chariow.com/...signed-invoice-url...",
"created_at": "2025-01-15T10:30:00+00:00",
"completed_at": "2025-01-15T10:32:00+00:00",
"store": {
"id": "str_xyz789",
"name": "My Store",
"logo_url": "https://cdn.chariow.com/stores/xyz789/logo.png",
"url": "https://mystore.mychariow.com"
},
"product": {
"id": "prd_def456",
"name": "Premium Course",
"type": "course",
"pictures": {
"thumbnail": "https://cdn.chariow.com/products/thumb.jpg",
"cover": "https://cdn.chariow.com/products/cover.jpg"
},
"category": {
"value": "education_and_learning",
"label": "Education and Learning"
},
"pricing": {
"type": "one_time",
"price": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
},
"effective": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
}
},
"bundle": null,
"metadata": null
},
"customer": {
"id": "cus_ghi789",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"email": "customer@example.com",
"phone": {
"number": "+1 234 567 890",
"country": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "🇺🇸"
}
},
"avatar_url": null
},
"buyer": {
"first_name": "John",
"last_name": "Doe"
},
"discount": {
"id": "dis_jkl012",
"name": "Save 20%",
"code": "SAVE20"
},
"rate": null
}
],
"pagination": {
"per_page": 20,
"next_cursor": "eyJpZCI6NTB9",
"prev_cursor": null,
"has_more_pages": true
}
}
Sales
List Sales
Retrieve all sales from your store
curl -X GET "https://api.chariow.com/v1/sales?status=completed&per_page=20&from=2025-01-01&to=2025-01-31" \
-H "Authorization: Bearer sk_live_your_api_key"
const response = await fetch('https://api.chariow.com/v1/sales?status=completed&per_page=20&from=2025-01-01&to=2025-01-31', {
headers: {
'Authorization': 'Bearer sk_live_your_api_key'
}
});
const result = await response.json();
console.log(result.data); // Array of sales
console.log(result.pagination); // Pagination info
$ch = curl_init('https://api.chariow.com/v1/sales?status=completed&per_page=20&from=2025-01-01&to=2025-01-31');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer sk_live_your_api_key'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
import requests
response = requests.get(
'https://api.chariow.com/v1/sales',
params={
'status': 'completed',
'per_page': 20,
'from': '2025-01-01',
'to': '2025-01-31'
},
headers={'Authorization': 'Bearer sk_live_your_api_key'}
)
data = response.json()
sales = data['data']
{
"data": [
{
"id": "sal_abc123xyz",
"status": "completed",
"tracking": {
"event_id": "sal_abc123xyz",
"currency": "USD",
"value": 79.2
},
"original_amount": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
},
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"discount_amount": {
"value": 19.80,
"formatted": "$19.80",
"short": "20",
"currency": "USD"
},
"payment": {
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"status": "success",
"exchange_rate": {
"value": 1,
"formatted": "$1.00",
"short": "1",
"currency": "USD"
},
"failure_error": null
},
"shipping": {
"address": "123 Main Street",
"city": "New York",
"state": "NY",
"country": "US",
"zip": "10001"
},
"invoice_download_url": "https://api.chariow.com/...signed-invoice-url...",
"created_at": "2025-01-15T10:30:00+00:00",
"completed_at": "2025-01-15T10:32:00+00:00",
"store": {
"id": "str_xyz789",
"name": "My Store",
"logo_url": "https://cdn.chariow.com/stores/xyz789/logo.png",
"url": "https://mystore.mychariow.com"
},
"product": {
"id": "prd_def456",
"name": "Premium Course",
"type": "course",
"pictures": {
"thumbnail": "https://cdn.chariow.com/products/thumb.jpg",
"cover": "https://cdn.chariow.com/products/cover.jpg"
},
"category": {
"value": "education_and_learning",
"label": "Education and Learning"
},
"pricing": {
"type": "one_time",
"price": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
},
"effective": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
}
},
"bundle": null,
"metadata": null
},
"customer": {
"id": "cus_ghi789",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"email": "customer@example.com",
"phone": {
"number": "+1 234 567 890",
"country": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "🇺🇸"
}
},
"avatar_url": null
},
"buyer": {
"first_name": "John",
"last_name": "Doe"
},
"discount": {
"id": "dis_jkl012",
"name": "Save 20%",
"code": "SAVE20"
},
"rate": null
}
],
"pagination": {
"per_page": 20,
"next_cursor": "eyJpZCI6NTB9",
"prev_cursor": null,
"has_more_pages": true
}
}
Retrieves a cursor-paginated list of all sales in your store. The response includes customer, product, discount and rating information for each sale.
Required scope:
sales.read. A key without it receives a 403 error. See Authentication.Query Parameters
integer
default:"10"
Number of sales to return per page (1 to 100). A value above 100 returns a
422 validation error.string
Cursor for pagination. Use the
next_cursor from the previous response.string
Filter by sale status:
initiated, awaiting_payment, completed, failed, abandoned, or settledstring
Filter by customer public ID (e.g.,
cus_abc123xyz)string
Search by sale ID (e.g.,
sal_abc123xyz) or payment transaction IDstring
Only return sales created on or after this date (format:
Y-m-d, e.g., 2025-01-01)string
Only return sales created on or before this date (format:
Y-m-d, e.g., 2025-01-31). Must not be earlier than from.string
Shortcut for a date range, used instead of
from and to: today, yesterday, last7days, last30days, thisWeek, lastWeek, thisMonth, lastMonth, thisYear or lastYearSales are returned newest first.
start_date and end_date are not supported and are silently ignored: use from and to.Response
array
Array of sale objects
Show sale object
Show sale object
string
Unique sale identifier (e.g.,
sal_abc123xyz)string
Sale status (
initiated, awaiting_payment, completed, failed, abandoned, settled)object
Values for conversion tracking pixels:
event_id (the sale ID), currency and valueobject
object
Final amount after discount
object
Discount amount applied
object
Payment details
Show payment object
Show payment object
object
Amount paid in the payment currency. Omitted when nothing was to be paid.
string | null
Payment status (
initiated, pending, cancelled, failed, success)object
Exchange rate between the product currency and the payment currency
object | null
When the payment failed:
code and customer_message (a message you can show to the buyer). Otherwise null.object
string | null
Temporary signed URL to download the invoice (valid for 60 minutes), only for completed and settled sales
string
ISO 8601 timestamp when the sale was created
string | null
ISO 8601 timestamp when the sale was completed
object
Store information (
id, name, logo_url, url)object
Product information
object
Customer information (
id, name, first_name, last_name, email, phone, avatar_url)object
Name of the buyer as entered for this sale (
first_name, last_name)object | null
Applied discount (
id, name, code), if anyobject | null
Customer rating (
id, is_thumbs_up, comment, created_at), if providedobject
Only present for gift purchases:
recipient (customer object) and messageobject
curl -X GET "https://api.chariow.com/v1/sales?status=completed&per_page=20&from=2025-01-01&to=2025-01-31" \
-H "Authorization: Bearer sk_live_your_api_key"
const response = await fetch('https://api.chariow.com/v1/sales?status=completed&per_page=20&from=2025-01-01&to=2025-01-31', {
headers: {
'Authorization': 'Bearer sk_live_your_api_key'
}
});
const result = await response.json();
console.log(result.data); // Array of sales
console.log(result.pagination); // Pagination info
$ch = curl_init('https://api.chariow.com/v1/sales?status=completed&per_page=20&from=2025-01-01&to=2025-01-31');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer sk_live_your_api_key'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
import requests
response = requests.get(
'https://api.chariow.com/v1/sales',
params={
'status': 'completed',
'per_page': 20,
'from': '2025-01-01',
'to': '2025-01-31'
},
headers={'Authorization': 'Bearer sk_live_your_api_key'}
)
data = response.json()
sales = data['data']
{
"data": [
{
"id": "sal_abc123xyz",
"status": "completed",
"tracking": {
"event_id": "sal_abc123xyz",
"currency": "USD",
"value": 79.2
},
"original_amount": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
},
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"discount_amount": {
"value": 19.80,
"formatted": "$19.80",
"short": "20",
"currency": "USD"
},
"payment": {
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"status": "success",
"exchange_rate": {
"value": 1,
"formatted": "$1.00",
"short": "1",
"currency": "USD"
},
"failure_error": null
},
"shipping": {
"address": "123 Main Street",
"city": "New York",
"state": "NY",
"country": "US",
"zip": "10001"
},
"invoice_download_url": "https://api.chariow.com/...signed-invoice-url...",
"created_at": "2025-01-15T10:30:00+00:00",
"completed_at": "2025-01-15T10:32:00+00:00",
"store": {
"id": "str_xyz789",
"name": "My Store",
"logo_url": "https://cdn.chariow.com/stores/xyz789/logo.png",
"url": "https://mystore.mychariow.com"
},
"product": {
"id": "prd_def456",
"name": "Premium Course",
"type": "course",
"pictures": {
"thumbnail": "https://cdn.chariow.com/products/thumb.jpg",
"cover": "https://cdn.chariow.com/products/cover.jpg"
},
"category": {
"value": "education_and_learning",
"label": "Education and Learning"
},
"pricing": {
"type": "one_time",
"price": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
},
"effective": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
}
},
"bundle": null,
"metadata": null
},
"customer": {
"id": "cus_ghi789",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"email": "customer@example.com",
"phone": {
"number": "+1 234 567 890",
"country": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "🇺🇸"
}
},
"avatar_url": null
},
"buyer": {
"first_name": "John",
"last_name": "Doe"
},
"discount": {
"id": "dis_jkl012",
"name": "Save 20%",
"code": "SAVE20"
},
"rate": null
}
],
"pagination": {
"per_page": 20,
"next_cursor": "eyJpZCI6NTB9",
"prev_cursor": null,
"has_more_pages": true
}
}
Was this page helpful?