curl -X GET "https://api.chariow.com/v1/sales/sal_abc123xyz" \
-H "Authorization: Bearer sk_live_your_api_key"
const response = await fetch('https://api.chariow.com/v1/sales/sal_abc123xyz', {
headers: {
'Authorization': 'Bearer sk_live_your_api_key'
}
});
const { data } = await response.json();
console.log(data); // Sale object
$ch = curl_init('https://api.chariow.com/v1/sales/sal_abc123xyz');
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/sal_abc123xyz',
headers={'Authorization': 'Bearer sk_live_your_api_key'}
)
sale = response.json()['data']
{
"data": {
"id": "sal_abc123xyz",
"status": "completed",
"channel": {
"value": "api",
"label": "API",
"description": "Sale created programmatically through the public API"
},
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"original_amount": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
},
"discount_amount": {
"value": 19.80,
"formatted": "$19.80",
"short": "20",
"currency": "USD"
},
"settlement": {
"amount": {
"value": 75.24,
"formatted": "$75.24",
"short": "75",
"currency": "USD"
},
"due_at": "2025-02-01T00:00:00+00:00",
"done_at": null,
"service_fee": {
"value": 3.96,
"formatted": "$3.96",
"short": "4",
"currency": "USD"
}
},
"download": {
"total": 3,
"last_at": "2025-01-20T14:30:00+00:00"
},
"invoice_download_url": "https://api.chariow.com/...signed-invoice-url...",
"payment": {
"status": "success",
"transaction_id": "txn_xyz789",
"gateway": "orqex",
"method": {
"name": "Orange Money Senegal",
"icon_url": "https://assets.example.com/icons/orange_money.svg"
},
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"fee": {
"value": 2.37,
"formatted": "$2.37",
"short": "2",
"currency": "USD"
},
"fee_rate": "3%",
"interchange": {
"rate": null,
"fee": {
"value": 0,
"formatted": "$0.00",
"short": "0",
"currency": "USD"
}
},
"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": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "🇺🇸"
},
"zip": "10001"
},
"context": {
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"ip_address": "203.0.113.42",
"country": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "🇺🇸"
},
"device_type": "desktop",
"locale": "en_US"
},
"custom_fields_values": {
"company_name": "Acme Corp",
"vat_number": "GB123456789"
},
"campaign": {
"id": "cmp_def456",
"name": "Black Friday Campaign"
},
"rating": {
"id": "rat_ghi789",
"is_thumbs_up": true,
"comment": "Excellent product!",
"created_at": "2025-01-18T09:00:00+00:00"
},
"store": {
"id": "str_xyz789",
"name": "My Digital Store",
"logo_url": "https://cdn.chariow.com/stores/xyz789/logo.png",
"url": "https://mystore.mychariow.com"
},
"product": {
"id": "prd_jkl012",
"name": "Advanced Laravel 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_mno345",
"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_pqr678",
"name": "Save 20%",
"code": "SAVE20"
},
"is_access_revoked": false,
"is_reconciled": false,
"last_reconciled_at": null,
"failed_at": null,
"awaiting_payment_at": "2025-01-15T10:30:00+00:00",
"abandoned_at": null,
"completed_at": "2025-01-15T10:32:00+00:00",
"created_at": "2025-01-15T10:30:00+00:00",
"updated_at": "2025-01-15T10:32:00+00:00"
}
}
{
"message": "No query results for model [App\\Models\\Sale] sal_unknown",
"errors": []
}
Sales
Get Sale
Retrieve details of a specific sale
curl -X GET "https://api.chariow.com/v1/sales/sal_abc123xyz" \
-H "Authorization: Bearer sk_live_your_api_key"
const response = await fetch('https://api.chariow.com/v1/sales/sal_abc123xyz', {
headers: {
'Authorization': 'Bearer sk_live_your_api_key'
}
});
const { data } = await response.json();
console.log(data); // Sale object
$ch = curl_init('https://api.chariow.com/v1/sales/sal_abc123xyz');
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/sal_abc123xyz',
headers={'Authorization': 'Bearer sk_live_your_api_key'}
)
sale = response.json()['data']
{
"data": {
"id": "sal_abc123xyz",
"status": "completed",
"channel": {
"value": "api",
"label": "API",
"description": "Sale created programmatically through the public API"
},
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"original_amount": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
},
"discount_amount": {
"value": 19.80,
"formatted": "$19.80",
"short": "20",
"currency": "USD"
},
"settlement": {
"amount": {
"value": 75.24,
"formatted": "$75.24",
"short": "75",
"currency": "USD"
},
"due_at": "2025-02-01T00:00:00+00:00",
"done_at": null,
"service_fee": {
"value": 3.96,
"formatted": "$3.96",
"short": "4",
"currency": "USD"
}
},
"download": {
"total": 3,
"last_at": "2025-01-20T14:30:00+00:00"
},
"invoice_download_url": "https://api.chariow.com/...signed-invoice-url...",
"payment": {
"status": "success",
"transaction_id": "txn_xyz789",
"gateway": "orqex",
"method": {
"name": "Orange Money Senegal",
"icon_url": "https://assets.example.com/icons/orange_money.svg"
},
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"fee": {
"value": 2.37,
"formatted": "$2.37",
"short": "2",
"currency": "USD"
},
"fee_rate": "3%",
"interchange": {
"rate": null,
"fee": {
"value": 0,
"formatted": "$0.00",
"short": "0",
"currency": "USD"
}
},
"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": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "🇺🇸"
},
"zip": "10001"
},
"context": {
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"ip_address": "203.0.113.42",
"country": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "🇺🇸"
},
"device_type": "desktop",
"locale": "en_US"
},
"custom_fields_values": {
"company_name": "Acme Corp",
"vat_number": "GB123456789"
},
"campaign": {
"id": "cmp_def456",
"name": "Black Friday Campaign"
},
"rating": {
"id": "rat_ghi789",
"is_thumbs_up": true,
"comment": "Excellent product!",
"created_at": "2025-01-18T09:00:00+00:00"
},
"store": {
"id": "str_xyz789",
"name": "My Digital Store",
"logo_url": "https://cdn.chariow.com/stores/xyz789/logo.png",
"url": "https://mystore.mychariow.com"
},
"product": {
"id": "prd_jkl012",
"name": "Advanced Laravel 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_mno345",
"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_pqr678",
"name": "Save 20%",
"code": "SAVE20"
},
"is_access_revoked": false,
"is_reconciled": false,
"last_reconciled_at": null,
"failed_at": null,
"awaiting_payment_at": "2025-01-15T10:30:00+00:00",
"abandoned_at": null,
"completed_at": "2025-01-15T10:32:00+00:00",
"created_at": "2025-01-15T10:30:00+00:00",
"updated_at": "2025-01-15T10:32:00+00:00"
}
}
{
"message": "No query results for model [App\\Models\\Sale] sal_unknown",
"errors": []
}
Retrieves comprehensive information about a specific sale by its public ID, including customer details, product information, payment details, applied discounts, marketing campaign, shipping information, and customer rating.
Required scope:
sales.read. A key without it receives a 403 error. See Authentication.Path Parameters
string
required
The unique sale public identifier (e.g.,
sal_abc123xyz)Response
object
Show properties
Show properties
string
Unique sale identifier (e.g.,
sal_abc123xyz)string
Sale status (
initiated, awaiting_payment, completed, failed, abandoned, settled). See Sale Statuses.object
object
object
Original amount before discount
object
Discount amount applied
object
object
string | null
Temporary signed URL to download the invoice (valid for 60 minutes). Only set for completed and settled sales.
object
Payment details
Show payment object
Show payment object
string | null
Payment status (
initiated, pending, cancelled, failed, success), null when no payment was neededstring | null
Payment transaction ID
string | null
Identifier of the payment gateway that handled the payment (for example
orqex). Older sales can carry another identifier; treat the value as an opaque string.object | null
Payment method used by the buyer, with
name and icon_url. null when unknown.object
Amount paid, in the payment currency
object
Payment processing fee, in the product currency
string | null
Payment fee rate as a percentage
object
Currency conversion markup applied when the payment currency differs from the product currency:
rate (percentage, or null) and fee (amount object). The rate depends on the payment currency.object
Exchange rate between the product currency and the payment currency
object
object
Purchase context information
Show context object
Show context object
string
User agent of the request that created the sale
string
Buyer IP address. For API checkouts, the
customer_ip you forwarded, otherwise the IP of the calling server.object | null
Buyer country. For API checkouts it is resolved from
customer_ip, or from the phone country when no usable IP was forwarded.string
Device type (
desktop, mobile, tablet)string
Customer locale
object | null
Custom field values provided during checkout
object | null
Marketing campaign (
id, name), if trackedobject | null
Customer rating (
id, is_thumbs_up, comment, created_at), if providedobject
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). Unlike customer, it keeps the name used at purchase time.object | null
Applied discount (
id, name, code), if anyobject
Only present for gift purchases:
recipient (customer object) and messageboolean
Whether the customer’s access to the product has been revoked for this sale
boolean
Whether the sale has been reconciled with the payment gateway
string | null
ISO 8601 timestamp of last reconciliation
string | null
ISO 8601 timestamp when the sale failed
string | null
ISO 8601 timestamp when the sale entered awaiting payment status
string | null
ISO 8601 timestamp when the sale was abandoned. Cleared if a later payment confirmation reopens the sale.
string | null
ISO 8601 timestamp when the sale was completed
string
ISO 8601 timestamp when the sale was created
string
ISO 8601 timestamp when the sale was last updated
curl -X GET "https://api.chariow.com/v1/sales/sal_abc123xyz" \
-H "Authorization: Bearer sk_live_your_api_key"
const response = await fetch('https://api.chariow.com/v1/sales/sal_abc123xyz', {
headers: {
'Authorization': 'Bearer sk_live_your_api_key'
}
});
const { data } = await response.json();
console.log(data); // Sale object
$ch = curl_init('https://api.chariow.com/v1/sales/sal_abc123xyz');
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/sal_abc123xyz',
headers={'Authorization': 'Bearer sk_live_your_api_key'}
)
sale = response.json()['data']
{
"data": {
"id": "sal_abc123xyz",
"status": "completed",
"channel": {
"value": "api",
"label": "API",
"description": "Sale created programmatically through the public API"
},
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"original_amount": {
"value": 99,
"formatted": "$99.00",
"short": "99",
"currency": "USD"
},
"discount_amount": {
"value": 19.80,
"formatted": "$19.80",
"short": "20",
"currency": "USD"
},
"settlement": {
"amount": {
"value": 75.24,
"formatted": "$75.24",
"short": "75",
"currency": "USD"
},
"due_at": "2025-02-01T00:00:00+00:00",
"done_at": null,
"service_fee": {
"value": 3.96,
"formatted": "$3.96",
"short": "4",
"currency": "USD"
}
},
"download": {
"total": 3,
"last_at": "2025-01-20T14:30:00+00:00"
},
"invoice_download_url": "https://api.chariow.com/...signed-invoice-url...",
"payment": {
"status": "success",
"transaction_id": "txn_xyz789",
"gateway": "orqex",
"method": {
"name": "Orange Money Senegal",
"icon_url": "https://assets.example.com/icons/orange_money.svg"
},
"amount": {
"value": 79.20,
"formatted": "$79.20",
"short": "79",
"currency": "USD"
},
"fee": {
"value": 2.37,
"formatted": "$2.37",
"short": "2",
"currency": "USD"
},
"fee_rate": "3%",
"interchange": {
"rate": null,
"fee": {
"value": 0,
"formatted": "$0.00",
"short": "0",
"currency": "USD"
}
},
"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": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "🇺🇸"
},
"zip": "10001"
},
"context": {
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"ip_address": "203.0.113.42",
"country": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "🇺🇸"
},
"device_type": "desktop",
"locale": "en_US"
},
"custom_fields_values": {
"company_name": "Acme Corp",
"vat_number": "GB123456789"
},
"campaign": {
"id": "cmp_def456",
"name": "Black Friday Campaign"
},
"rating": {
"id": "rat_ghi789",
"is_thumbs_up": true,
"comment": "Excellent product!",
"created_at": "2025-01-18T09:00:00+00:00"
},
"store": {
"id": "str_xyz789",
"name": "My Digital Store",
"logo_url": "https://cdn.chariow.com/stores/xyz789/logo.png",
"url": "https://mystore.mychariow.com"
},
"product": {
"id": "prd_jkl012",
"name": "Advanced Laravel 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_mno345",
"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_pqr678",
"name": "Save 20%",
"code": "SAVE20"
},
"is_access_revoked": false,
"is_reconciled": false,
"last_reconciled_at": null,
"failed_at": null,
"awaiting_payment_at": "2025-01-15T10:30:00+00:00",
"abandoned_at": null,
"completed_at": "2025-01-15T10:32:00+00:00",
"created_at": "2025-01-15T10:30:00+00:00",
"updated_at": "2025-01-15T10:32:00+00:00"
}
}
{
"message": "No query results for model [App\\Models\\Sale] sal_unknown",
"errors": []
}
Was this page helpful?