Everything you need to integrate with the SellStein platform
https://api.sellstein.comv1Learn how to authenticate and make your first API call.
Create Your Account
Create your account and set up your first business
Configure Your Store
Add products, configure payments, and customize your store
Launch & Sell
Launch your store and start accepting orders
# Test your API key
curl -X GET "https://api.sellstein.com/business/:bizId/products" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json"All API requests require a Bearer token sent via the Authorization header.
Include your API key in the Authorization header of every request.
Authorization: Bearer sk_live_aBcDeFgHiJkLmNoPqRsT...Security Warning
Never expose your API keys in client-side code. Always make API calls from your server.
| Prefix | Environment | Description |
|---|---|---|
| sk_live_ | Production | For production use. Real transactions. |
| sk_test_ | Sandbox | For development and testing. No real charges. |
Create, read, update, and delete products in your store.
/business/:bizId/productsRetrieve a paginated list of all products in your store. Supports filtering by status, category, and search query.
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | Optional | Page number for pagination. Defaults to 1. |
| limit | integer | Optional | Number of results per page (max 100). Defaults to 25. |
| status | string | Optional | Filter by status: active, draft, archived. |
| search | string | Optional | Search products by name or SKU. |
| category | string | Optional | Filter by category slug. |
curl -X GET "https://api.sellstein.com/business/biz_abc123/products?page=1&limit=25&status=active" \
-H "Authorization: Bearer sk_live_your_api_key"const response = await fetch(
'https://api.sellstein.com/business/biz_abc123/products?page=1&limit=25',
{
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
'Content-Type': 'application/json',
},
}
);
const data = await response.json();
console.log(data.products);{
"products": [
{
"id": "prod_xK9mZq2",
"name": "Premium License Key",
"slug": "premium-license-key",
"price": 29.99,
"currency": "USD",
"status": "active",
"type": "digital",
"stock": 142,
"category": "software",
"images": ["https://cdn.sellstein.com/img/prod_xK9mZq2/cover.webp"],
"created_at": "2025-11-15T08:30:00Z",
"updated_at": "2026-01-22T14:12:00Z"
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 87,
"total_pages": 4
}
}/business/:bizId/productsCreate a new product in your store. Supports digital products, physical goods, subscriptions, and service listings.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Product name (max 200 characters). |
| price | number | Required | Price in the store's default currency. |
| type | string | Required | Product type: digital, physical, subscription, service. |
| description | string | Optional | Product description (supports Markdown). |
| status | string | Optional | Product status: active, draft. Defaults to draft. |
| stock | integer | Optional | Available stock quantity. -1 for unlimited. |
| category | string | Optional | Category slug to assign the product to. |
| variants | array | Optional | Array of variant objects with name, price, and stock. |
curl -X POST "https://api.sellstein.com/business/biz_abc123/products" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Toolkit License",
"price": 49.99,
"type": "digital",
"description": "Lifetime access to all pro tools",
"status": "active",
"stock": -1
}'const response = await fetch(
'https://api.sellstein.com/business/biz_abc123/products',
{
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Pro Toolkit License',
price: 49.99,
type: 'digital',
description: 'Lifetime access to all pro tools',
status: 'active',
stock: -1,
}),
}
);
const product = await response.json();{
"id": "prod_nW3pRt8",
"name": "Pro Toolkit License",
"slug": "pro-toolkit-license",
"price": 49.99,
"currency": "USD",
"type": "digital",
"status": "active",
"stock": -1,
"description": "Lifetime access to all pro tools",
"created_at": "2026-03-03T10:15:00Z",
"updated_at": "2026-03-03T10:15:00Z"
}/business/:bizId/products/:productIdUpdate an existing product. Only include the fields you want to change -- unspecified fields retain their current values.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | Updated product name. |
| price | number | Optional | Updated price. |
| status | string | Optional | Updated status: active, draft, archived. |
| stock | integer | Optional | Updated stock quantity. |
| description | string | Optional | Updated description. |
curl -X PUT "https://api.sellstein.com/business/biz_abc123/products/prod_nW3pRt8" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"price": 39.99, "status": "active"}'const response = await fetch(
'https://api.sellstein.com/business/biz_abc123/products/prod_nW3pRt8',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
price: 39.99,
status: 'active',
}),
}
);
const updated = await response.json();{
"id": "prod_nW3pRt8",
"name": "Pro Toolkit License",
"slug": "pro-toolkit-license",
"price": 39.99,
"currency": "USD",
"type": "digital",
"status": "active",
"stock": -1,
"updated_at": "2026-03-03T11:45:00Z"
}/business/:bizId/products/:productIdPermanently delete a product from your store. This action cannot be undone. Associated orders are preserved but the product reference is removed.
curl -X DELETE "https://api.sellstein.com/business/biz_abc123/products/prod_nW3pRt8" \
-H "Authorization: Bearer sk_live_your_api_key"const response = await fetch(
'https://api.sellstein.com/business/biz_abc123/products/prod_nW3pRt8',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
},
}
);
// 204 No Content on success{
"success": true,
"message": "Product deleted successfully"
}Retrieve and manage customer orders.
/business/:bizId/ordersRetrieve a paginated list of orders. Supports filtering by status, date range, customer email, and payment provider.
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | Optional | Page number. Defaults to 1. |
| limit | integer | Optional | Results per page (max 100). Defaults to 25. |
| status | string | Optional | Filter: pending, completed, refunded, cancelled, disputed. |
| from | string | Optional | Start date (ISO 8601). e.g. 2026-01-01T00:00:00Z. |
| to | string | Optional | End date (ISO 8601). |
| string | Optional | Filter by customer email address. |
curl -X GET "https://api.sellstein.com/business/biz_abc123/orders?status=completed&limit=10" \
-H "Authorization: Bearer sk_live_your_api_key"const response = await fetch(
'https://api.sellstein.com/business/biz_abc123/orders?status=completed&limit=10',
{
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
},
}
);
const data = await response.json();{
"orders": [
{
"id": "ord_Qw7mNp3",
"order_number": 1042,
"status": "completed",
"customer_email": "jane@example.com",
"customer_name": "Jane Doe",
"total": 49.99,
"currency": "USD",
"payment_provider": "stripe",
"items": [
{
"product_id": "prod_xK9mZq2",
"product_name": "Premium License Key",
"quantity": 1,
"unit_price": 49.99
}
],
"created_at": "2026-02-28T16:30:00Z",
"completed_at": "2026-02-28T16:30:05Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 356,
"total_pages": 36
}
}/business/:bizId/orders/:orderIdUpdate an order's status or add internal notes. Commonly used to mark orders as shipped, add tracking numbers, or process refunds.
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | Optional | New status: completed, shipped, refunded, cancelled. |
| tracking_number | string | Optional | Shipping tracking number. |
| tracking_url | string | Optional | URL for shipment tracking. |
| internal_note | string | Optional | Private note visible only to staff. |
curl -X PATCH "https://api.sellstein.com/business/biz_abc123/orders/ord_Qw7mNp3" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"status": "shipped",
"tracking_number": "1Z999AA10123456784",
"tracking_url": "https://track.ups.com/1Z999AA10123456784"
}'const response = await fetch(
'https://api.sellstein.com/business/biz_abc123/orders/ord_Qw7mNp3',
{
method: 'PATCH',
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
status: 'shipped',
tracking_number: '1Z999AA10123456784',
tracking_url: 'https://track.ups.com/1Z999AA10123456784',
}),
}
);{
"id": "ord_Qw7mNp3",
"order_number": 1042,
"status": "shipped",
"tracking_number": "1Z999AA10123456784",
"tracking_url": "https://track.ups.com/1Z999AA10123456784",
"updated_at": "2026-03-01T09:15:00Z"
}Manage your customer database.
/business/:bizId/customersRetrieve a paginated list of customers. Includes purchase history summary, lifetime value, and segmentation data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | Optional | Page number. Defaults to 1. |
| limit | integer | Optional | Results per page (max 100). Defaults to 25. |
| search | string | Optional | Search by name or email. |
| sort | string | Optional | Sort by: created_at, total_spent, order_count. Defaults to created_at. |
curl -X GET "https://api.sellstein.com/business/biz_abc123/customers?limit=10&sort=total_spent" \
-H "Authorization: Bearer sk_live_your_api_key"const response = await fetch(
'https://api.sellstein.com/business/biz_abc123/customers?limit=10&sort=total_spent',
{
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
},
}
);
const data = await response.json();{
"customers": [
{
"id": "cust_Rt5mWq9",
"email": "jane@example.com",
"name": "Jane Doe",
"country": "US",
"total_spent": 349.94,
"order_count": 7,
"first_order_at": "2025-06-12T10:00:00Z",
"last_order_at": "2026-02-28T16:30:00Z",
"created_at": "2025-06-12T09:55:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 1243,
"total_pages": 125
}
}/business/:bizId/customersManually add a customer to your store. Useful for importing customers from other platforms or adding offline customers.
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Required | Customer email address. Must be unique per store. | |
| name | string | Optional | Full name of the customer. |
| country | string | Optional | ISO 3166-1 alpha-2 country code (e.g. US, DE, JP). |
| notes | string | Optional | Internal notes about the customer. |
curl -X POST "https://api.sellstein.com/business/biz_abc123/customers" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"email": "alex@example.com",
"name": "Alex Rivera",
"country": "DE"
}'const response = await fetch(
'https://api.sellstein.com/business/biz_abc123/customers',
{
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'alex@example.com',
name: 'Alex Rivera',
country: 'DE',
}),
}
);{
"id": "cust_Zp4nLm7",
"email": "alex@example.com",
"name": "Alex Rivera",
"country": "DE",
"total_spent": 0,
"order_count": 0,
"created_at": "2026-03-03T12:00:00Z"
}/business/:bizId/customers/:customerIdUpdate a customer's information. Only the provided fields will be changed.
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | Updated name. |
| country | string | Optional | Updated country code. |
| notes | string | Optional | Updated internal notes. |
curl -X PUT "https://api.sellstein.com/business/biz_abc123/customers/cust_Zp4nLm7" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "Alexander Rivera", "notes": "VIP customer"}'const response = await fetch(
'https://api.sellstein.com/business/biz_abc123/customers/cust_Zp4nLm7',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Alexander Rivera',
notes: 'VIP customer',
}),
}
);{
"id": "cust_Zp4nLm7",
"email": "alex@example.com",
"name": "Alexander Rivera",
"country": "DE",
"notes": "VIP customer",
"updated_at": "2026-03-03T12:30:00Z"
}Receive real-time notifications when events happen in your store.
Configure webhook endpoints from your dashboard under Settings > Webhooks.
POST https://your-server.com/webhooks/sellstein
Content-Type: application/json
X-SellStein-Signature: sha256=5d7861...
{
"event": "order.created",
"data": { ... },
"timestamp": "2026-03-03T10:15:00Z",
"webhook_id": "whk_Mn4pQr8"
}| Event | Description |
|---|---|
| order.created | Fired when a new order is placed. |
| order.updated | Fired when an order status changes (shipped, refunded, etc.). |
| order.completed | Fired when an order is marked as completed. |
| order.refunded | Fired when an order is fully or partially refunded. |
| product.created | Fired when a new product is created. |
| product.updated | Fired when a product is updated. |
| product.deleted | Fired when a product is deleted. |
| customer.created | Fired when a new customer is added. |
| subscription.created | Fired when a new subscription begins. |
| subscription.renewed | Fired when a subscription payment succeeds. |
| subscription.cancelled | Fired when a subscription is cancelled. |
| dispute.created | Fired when a chargeback/dispute is opened. |
Verify webhook signatures to ensure requests are from SellStein.
import crypto from 'crypto';
function verifyWebhookSignature(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload, 'utf8')
.digest('hex');
const sig = signature.replace('sha256=', '');
return crypto.timingSafeEqual(
Buffer.from(sig, 'hex'),
Buffer.from(expected, 'hex')
);
}
// Express example
app.post('/webhooks/sellstein', (req, res) => {
const signature = req.headers['x-sellstein-signature'];
const isValid = verifyWebhookSignature(
JSON.stringify(req.body),
signature,
process.env.WEBHOOK_SECRET
);
if (!isValid) return res.status(401).send('Invalid signature');
const { event, data } = req.body;
switch (event) {
case 'order.created':
handleNewOrder(data);
break;
case 'order.refunded':
handleRefund(data);
break;
}
res.status(200).send('OK');
});Understand API rate limiting and how to handle it.
| Header | Description |
|---|---|
| X-RateLimit-Limit | Maximum number of requests allowed per window (120). |
| X-RateLimit-Remaining | Number of requests remaining in the current window. |
| X-RateLimit-Reset | Unix timestamp (seconds) when the rate limit window resets. |
async function fetchWithRetry(url, options, retries = 3) {
for (let i = 0; i < retries; i++) {
const response = await fetch(url, options);
if (response.status === 429) {
const resetAt = response.headers.get('X-RateLimit-Reset');
const waitMs = resetAt
? (parseInt(resetAt) * 1000) - Date.now()
: 1000 * Math.pow(2, i); // Exponential backoff
console.log(`Rate limited. Retrying in ${waitMs}ms...`);
await new Promise(r => setTimeout(r, Math.max(waitMs, 100)));
continue;
}
return response;
}
throw new Error('Max retries exceeded');
}Standard error codes and response format.
All errors follow a consistent JSON format.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The 'price' field must be a positive number.",
"status": 400,
"details": [
{
"field": "price",
"issue": "Must be greater than 0"
}
]
}
}| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | The request body is malformed or missing required fields. Check the details array for specifics. |
| 401 | UNAUTHORIZED | No valid API key provided. Ensure your Authorization header is set correctly. |
| 403 | FORBIDDEN | The API key does not have permission for this action. Check your key scopes and business access. |
| 404 | NOT_FOUND | The requested resource does not exist. Verify the ID and business context. |
| 429 | RATE_LIMITED | Too many requests. Back off and retry after the X-RateLimit-Reset timestamp. |
| 500 | INTERNAL_ERROR | An unexpected server error occurred. If this persists, contact support. |
Official and community SDKs for popular languages.
npm install @sellstein/sdkpip install sellsteincomposer require sellstein/sdkgo get github.com/sellstein/go-sdkgem install sellsteinNo installation neededimport { SellStein } from '@sellstein/sdk';
const client = new SellStein({
apiKey: 'sk_live_your_api_key',
businessId: 'biz_abc123',
});
// List products
const products = await client.products.list({
status: 'active',
limit: 25,
});
// Create an order
const order = await client.orders.create({
customer_email: 'buyer@example.com',
items: [
{ product_id: 'prod_xK9mZq2', quantity: 1 },
],
});
// Listen to webhooks
client.webhooks.on('order.created', (event) => {
console.log('New order:', event.data.id);
});