curl -X GET "https://api.chariow.com/v1/sales?status=completed&per_page=20&start_date=2025-01-01" \
-H "Authorization: Bearer sk_live_your_api_key"
const response = await fetch('https://api.chariow.com/v1/sales?status=completed&per_page=20&start_date=2025-01-01', {
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&start_date=2025-01-01');
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,
'start_date': '2025-01-01'
},
headers={'Authorization': 'Bearer sk_live_your_api_key'}
)
data = response.json()
sales = data['data']
{
"message": "success",
"data": [
{
"id": "sal_abc123xyz",
"status": "completed",
"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.0,
"formatted": "$1.00",
"short": "1",
"currency": "USD"
}
},
"shipping": {
"address": "123 Main Street",
"city": "New York",
"state": "NY",
"country": "US",
"zip": "10001"
},
"store": {
"id": "str_xyz789",
"name": "My Store",
"slug": "my-store"
},
"product": {
"id": "prd_def456",
"name": "Premium Course",
"type": "course"
},
"customer": {
"id": "cus_ghi789",
"email": "customer@example.com",
"name": "John Doe"
},
"discount": {
"id": "dis_jkl012",
"code": "SAVE20",
"type": "percentage"
},
"rate": null,
"post_purchase": {
"files": [
{
"id": "fil_mno345",
"name": "course-materials.zip",
"size": 15728640,
"download_url": "https://cdn.chariow.com/downloads/..."
}
],
"licences": [],
"instructions": "Thank you for your purchase!"
}
}
],
"pagination": {
"next_cursor": "eyJpZCI6NTB9",
"prev_cursor": null,
"has_more": true
},
"errors": []
}
Sales
List Sales
Retrieve all sales from your store
curl -X GET "https://api.chariow.com/v1/sales?status=completed&per_page=20&start_date=2025-01-01" \
-H "Authorization: Bearer sk_live_your_api_key"
const response = await fetch('https://api.chariow.com/v1/sales?status=completed&per_page=20&start_date=2025-01-01', {
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&start_date=2025-01-01');
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,
'start_date': '2025-01-01'
},
headers={'Authorization': 'Bearer sk_live_your_api_key'}
)
data = response.json()
sales = data['data']
{
"message": "success",
"data": [
{
"id": "sal_abc123xyz",
"status": "completed",
"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.0,
"formatted": "$1.00",
"short": "1",
"currency": "USD"
}
},
"shipping": {
"address": "123 Main Street",
"city": "New York",
"state": "NY",
"country": "US",
"zip": "10001"
},
"store": {
"id": "str_xyz789",
"name": "My Store",
"slug": "my-store"
},
"product": {
"id": "prd_def456",
"name": "Premium Course",
"type": "course"
},
"customer": {
"id": "cus_ghi789",
"email": "customer@example.com",
"name": "John Doe"
},
"discount": {
"id": "dis_jkl012",
"code": "SAVE20",
"type": "percentage"
},
"rate": null,
"post_purchase": {
"files": [
{
"id": "fil_mno345",
"name": "course-materials.zip",
"size": 15728640,
"download_url": "https://cdn.chariow.com/downloads/..."
}
],
"licences": [],
"instructions": "Thank you for your purchase!"
}
}
],
"pagination": {
"next_cursor": "eyJpZCI6NTB9",
"prev_cursor": null,
"has_more": true
},
"errors": []
}
Retrieves a cursor-paginated list of all sales in your store. Sales represent completed, pending, abandoned, failed, or settled transactions. The response includes customer, product, discount, and rating information.
Query Parameters
integer
default:"15"
Number of sales to return per page (max 100)
string
Cursor for pagination. Use the
next_cursor from the previous response.string
Filter by sale status:
awaiting_payment, completed, failed, abandoned, or settledstring
Filter by customer public ID (e.g.,
cus_abc123xyz)string
Search by sale reference or customer email
string
Filter sales from this date onwards (format:
Y-m-d, e.g., 2025-01-01)string
Filter sales until this date (format:
Y-m-d, e.g., 2025-01-31)Response
array
Array of sale objects
Show sale object
Show sale object
string
Unique sale identifier (e.g.,
sal_abc123xyz)string
Sale status (
awaiting_payment, completed, failed, abandoned, settled)object
object
Final amount charged after discount
object
Discount amount applied
object
object
object
Store information
object
Product information
object
Customer information
object
Applied discount (if any)
object
Customer rating (if provided)
object
Post-purchase access data (files, licences, instructions)
object
curl -X GET "https://api.chariow.com/v1/sales?status=completed&per_page=20&start_date=2025-01-01" \
-H "Authorization: Bearer sk_live_your_api_key"
const response = await fetch('https://api.chariow.com/v1/sales?status=completed&per_page=20&start_date=2025-01-01', {
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&start_date=2025-01-01');
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,
'start_date': '2025-01-01'
},
headers={'Authorization': 'Bearer sk_live_your_api_key'}
)
data = response.json()
sales = data['data']
{
"message": "success",
"data": [
{
"id": "sal_abc123xyz",
"status": "completed",
"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.0,
"formatted": "$1.00",
"short": "1",
"currency": "USD"
}
},
"shipping": {
"address": "123 Main Street",
"city": "New York",
"state": "NY",
"country": "US",
"zip": "10001"
},
"store": {
"id": "str_xyz789",
"name": "My Store",
"slug": "my-store"
},
"product": {
"id": "prd_def456",
"name": "Premium Course",
"type": "course"
},
"customer": {
"id": "cus_ghi789",
"email": "customer@example.com",
"name": "John Doe"
},
"discount": {
"id": "dis_jkl012",
"code": "SAVE20",
"type": "percentage"
},
"rate": null,
"post_purchase": {
"files": [
{
"id": "fil_mno345",
"name": "course-materials.zip",
"size": 15728640,
"download_url": "https://cdn.chariow.com/downloads/..."
}
],
"licences": [],
"instructions": "Thank you for your purchase!"
}
}
],
"pagination": {
"next_cursor": "eyJpZCI6NTB9",
"prev_cursor": null,
"has_more": true
},
"errors": []
}
Was this page helpful?
⌘I