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

AspectOrderSubscription
BillingOne-time paymentRecurring payments
InvoiceSingle invoiceInvoice per billing period
FulfillmentTracked per orderNot applicable
Use caseProducts, digital downloads, servicesMemberships, SaaS, ongoing services

Order Statuses

StatusDescription
pendingOrder created, awaiting payment
paidPayment received, ready for fulfillment
partially_fulfilledSome items shipped/delivered
fulfilledAll items shipped/delivered
canceledOrder cancelled
refundedPayment refunded

Order Line Items

Each order contains one or more line items representing products purchased:

FieldDescription
product_idReference to the product
price_idReference to the price used
quantityNumber of units ordered
amount_minorTotal price for this line item
fulfillment_statuspending, 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_xxxxxxxx

Managing 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:

EventWhen Triggered
order.createdOrder is created
order.paidPayment is received
order.fulfilledOrder is fully fulfilled
order.partially_fulfilledSome items are fulfilled
order.canceledOrder is cancelled

Related