Understanding Sales
The Chariow Sales API provides programmatic access to all transaction data in your store. You can:- Retrieve a list of all sales with filtering options
- Get detailed information about specific sales
- Track payment status and settlement details
- Access customer purchase history
- Monitor download statistics
- View applied discounts and marketing campaigns
Sale Object
A sale contains comprehensive purchase information with the following structure:Sale Statuses
Sales can have the following statuses throughout their lifecycle:| Status | Description |
|---|---|
awaiting_payment | Checkout initiated, waiting for payment confirmation |
completed | Payment successful, product access granted to customer |
failed | Payment failed or was declined |
abandoned | Customer abandoned the checkout process |
settled | Funds have been settled to the merchant account |
Payment Statuses
The payment status tracks the payment gateway transaction separately from the sale status:| Payment Status | Description |
|---|---|
initiated | Payment process has started |
pending | Payment is being processed by the gateway |
success | Payment was successfully processed |
failed | Payment failed or was declined |
cancelled | Payment was cancelled by customer or system |
Sales Channels
Sales can originate from different channels:| Channel | Description |
|---|---|
store | Direct sale through your store checkout |
affiliate | Sale made through an affiliate link |
discover | Sale from Chariow Discover marketplace |
widget | Sale through an embedded checkout widget |
api | Sale created via the Public API |
Listing Sales
Retrieve all sales for your store:Query Parameters
You can filter and paginate sales using the following parameters:| Parameter | Type | Description |
|---|---|---|
per_page | integer | Number of sales per page (max 100, default 15) |
cursor | string | Cursor for pagination (from next_cursor or prev_cursor) |
status | string | Filter by sale status (awaiting_payment, completed, failed, abandoned, settled) |
customer_id | string | Filter by customer public ID (e.g., cus_abc123xyz) |
search | string | Search by sale reference or customer email |
start_date | string | Filter sales from this date (format: Y-m-d, e.g., 2025-01-01) |
end_date | string | Filter sales until this date (format: Y-m-d, e.g., 2025-01-31) |
Filtering by Status
Filtering by Customer
Filtering by Date Range
Searching Sales
Pagination
The API uses cursor-based pagination. Use thenext_cursor from the response to fetch the next page:
Example Response
Getting a Single Sale
Retrieve a specific sale by its public ID:Post-Purchase Access
Completed sales include post-purchase access data containing deliverables based on the product type:File Downloads
For products with downloadable files, thefiles array contains:
id- Unique file identifiername- Original filenamesize- File size in bytestype- MIME typedownload_url- Temporary signed download URLexpires_at- When the download link expires
Licences
For products with licence keys, thelicences array contains:
id- Unique licence identifierlicence_key- The licence key stringstatus- Licence status (active,inactive,expired)activations- Current number of activationsmax_activations- Maximum allowed activationsexpires_at- Expiry date (null for lifetime licences)
Custom Instructions
Theinstructions field contains custom post-purchase instructions configured for the product.
Common Use Cases
Revenue Reporting
Revenue Reporting
Calculate total revenue for a specific period:
Order Fulfilment
Order Fulfilment
Process orders that require physical shipping:
Customer Purchase History
Customer Purchase History
View a customer’s complete purchase history:This returns all sales for the specified customer, including:
- Purchase dates and amounts
- Products purchased
- Applied discounts
- Current access status
Failed Payment Recovery
Failed Payment Recovery
Identify and process failed payments:
Discount Performance Analysis
Discount Performance Analysis
Analyse discount code usage and effectiveness:
Settlement Information
For completed sales, thesettlement object provides details about merchant payouts:
amount- Net amount to be paid to merchant (after fees)due_at- When settlement is scheduleddone_at- When settlement was completed (null if pending)service_fee- Chariow platform service fee
Download Tracking
Monitor customer download activity:- Track product engagement
- Identify customers who haven’t accessed their purchase
- Monitor for unusual download patterns