Orders
One-time purchases with fulfillment tracking
Orders represent one-time purchases in RevKeen. When a customer buys a product with a one-time price (not recurring), an Order is created to track the purchase and its fulfillment status.
What is an Order?
An Order is created when a customer completes a checkout for one-time products. Orders differ from subscriptions in that they represent a single transaction rather than ongoing billing.
Orders are created from:
- • Checkout link completions (one-time prices)
- • Direct API calls
- • Manual creation in the dashboard
Order vs Subscription
| Aspect | Order | Subscription |
|---|---|---|
| Billing | One-time payment | Recurring payments |
| Invoice | Single invoice | Invoice per billing period |
| Fulfillment | Tracked per order | Not applicable |
| Use case | Products, digital downloads, services | Memberships, SaaS, ongoing services |
Order Statuses
| Status | Description |
|---|---|
pending | Order created, awaiting payment |
paid | Payment received, ready for fulfillment |
partially_fulfilled | Some items shipped/delivered |
fulfilled | All items shipped/delivered |
canceled | Order cancelled |
refunded | Payment refunded |
Order Line Items
Each order contains one or more line items representing products purchased:
| Field | Description |
|---|---|
product_id | Reference to the product |
price_id | Reference to the price used |
quantity | Number of units ordered |
amount_minor | Total price for this line item |
fulfillment_status | pending, shipped, delivered |
Fulfillment Tracking
Fulfillment tracking depends on the product's fulfillment_type:
Physical Products
Track shipping status, carrier, and tracking numbers.
Flow: pending → shipped → delivered
Digital Products
Typically fulfilled immediately with download links or access granted.
Flow: pending → delivered (automatic)
Services (None)
No fulfillment tracking needed - order is complete upon payment.
Flow: pending → fulfilled (automatic)
Creating Orders via API
const order = await client.orders.create({
customerId: 'cus_xxxxxxxx',
currency: 'USD',
lineItems: [
{
priceId: 'price_xxxxxxxx',
quantity: 2,
},
{
priceId: 'price_yyyyyyyy',
quantity: 1,
},
],
// Optional: Apply a discount
discountId: 'disc_xxxxxxxx',
// Optional: Shipping address (for physical products)
shippingAddress: {
line1: '123 Main St',
city: 'San Francisco',
state: 'CA',
postalCode: '94102',
country: 'US',
},
});
console.log(order.data.id); // ord_xxxxxxxxManaging Orders in Dashboard
Navigate to Sales → Orders to:
- View all orders with filtering by status, date, customer
- Click an order to view details and line items
- Update fulfillment status for physical products
- Add tracking information for shipments
- Process refunds for paid orders
- Cancel pending orders
Order Events
Orders trigger events throughout their lifecycle that you can listen for via webhooks:
| Event | When Triggered |
|---|---|
order.created | Order is created |
order.paid | Payment is received |
order.fulfilled | Order is fully fulfilled |
order.partially_fulfilled | Some items are fulfilled |
order.canceled | Order is cancelled |