Order model
An order captures the full context of a purchase: who bought it, what they bought, at what price, and under what terms.Line item fields
Each object in theItems array represents one product on the order:
Example: creating an order
Order types
TheOrderType field classifies how an order was initiated. You can define values that suit your workflow — common examples include:
Use the
Channel field alongside OrderType to capture additional context about where and how an order was received (e.g. Channel: "TradeShow" with OrderType: "Assisted").
Order lifecycle
Orders flow through a predictable sequence from cart to fulfilled invoice:OrderInvoiceSummaryDto tracks fulfillment status across all invoices.
Invoice model
An invoice is the financial record of what a customer owes for an order (or part of an order).Invoice status states
Payment recording
Nymble Commerce distinguishes between two payment flows:- Online payment — the customer completes payment through a connected payment provider (e.g. credit card at checkout). Nymble Commerce updates the invoice status automatically when the provider webhook fires.
- Offline / manual payment — you record a payment against an invoice manually (e.g. EFT, cheque, cash). Use the
POST /api/invoices/{id}/paymentsendpoint to record the payment amount, method, date, and reference number.
Payment object on an invoice includes:
For full payment provider integration and hosted checkout details, see the Payments and Checkout guide.
Discounts
Discounts in Nymble Commerce can be applied at the invoice level or at the line item level. An invoice-level discount has:Code— a discount code string, if applicable.Type— either"Fixed"(a flat amount off) or"Percentage"(a percentage off the subtotal).Value— the discount amount or percentage.Description— a human-readable label shown on the invoice.
DiscountAmount and DiscountAmountFormatted fields reflect the actual dollar amount deducted, regardless of discount type.