Skip to main content
Nymble Commerce provides a complete commerce lifecycle — from shopping cart through order placement, invoice generation, payment collection, and refunds. Every step is API-driven and auditable, so you can build custom storefronts, assisted-ordering tools, and ERP integrations on top of a consistent, structured workflow.

Order model

An order captures the full context of a purchase: who bought it, what they bought, at what price, and under what terms.
FieldTypeDescription
IdstringNymble Commerce’s internal order ID.
OrderNumberstringHuman-readable order number, auto-generated on creation.
OrganizationIdstringThe owning organization (resolved from your JWT).
OrderTypestringClassification of the order — see Order types.
PONumberstringCustomer’s purchase order number for their records.
PriceTierstringThe price tier active at time of order (e.g. "Wholesale").
CurrencyCodestringISO currency code for the order (e.g. "USD").
CustomerobjectSnapshot of the customer at time of order: CustomerNumber, CompanyName, CompanyEmail, billing and shipping addresses.
ItemsarrayLine items — see below.
ShippingDetailsobjectShipping method, total, and formatted total.
PrimarySalesRepobjectThe rep primarily responsible for this order (RepNumber, FirstName, LastName, Email, PhoneNumber).
TakenBySalesRepobjectThe rep who physically entered the order, if different from the primary rep (e.g. at a trade show).
OrderStatusstringCurrent status of the order (e.g. "Pending", "Processing", "Shipped", "Completed").
ChannelstringWhere the order originated — e.g. "Web", "Phone", "TradeShow", "Import".
TermsstringPayment terms for this order (e.g. "Net30").
NotesstringInternal notes on the order.
TaxdecimalTax amount.
TaxFormattedstringFormatted tax string including currency symbol (e.g. "$3.50").
SubtotaldecimalPre-tax, pre-shipping subtotal.
SubtotalFormattedstringFormatted subtotal string.
OrderTotaldecimalGrand total including tax, shipping, and any discounts.
OrderTotalFormattedstringFormatted grand total string.
DiscountobjectOrder-level discount applied (Code, Type, Value, Description).
DiscountAmountdecimalComputed discount amount.
DiscountAmountFormattedstringFormatted discount amount string.
ExternalIdstringYour identifier for this order in an external system.
OriginationCartIdstringThe cart ID this order was created from, if applicable.
OrderDatedatetimeWhen the order was placed.
CreatedAtdatetimeRecord creation timestamp.
UpdatedAtdatetimeLast update timestamp.

Line item fields

Each object in the Items array represents one product on the order:
FieldTypeDescription
SkustringProduct SKU.
ProductNamestringProduct name at time of order.
ExternalIdstringProduct’s external ID at time of order.
QuantityintegerQuantity ordered.
MinimumOrderQuantityintegerMOQ enforced at time of order.
QuantityIncrementintegerQuantity step size enforced at time of order.
PricedecimalUnit price at time of order.
PriceFormattedstringFormatted unit price string.
SubTotaldecimalPrice × Quantity before line-level discounts.
SubTotalFormattedstringFormatted subtotal string.
DiscountobjectLine-item discount, if applied.
DiscountAmountdecimalComputed discount amount for this line.
DiscountAmountFormattedstringFormatted discount amount string.

Example: creating an order

POST https://api.achievemomentum.com/api/orders

{
  "Customer": {
    "CustomerNumber": "CUST-0042",
    "CompanyName": "Acme Wholesale Ltd.",
    "CompanyEmail": "[email protected]"
  },
  "OrderType": "Standard",
  "PONumber": "PO-2024-8821",
  "PriceTier": "Wholesale",
  "CurrencyCode": "USD",
  "PrimarySalesRep": {
    "RepNumber": "REP-007"
  },
  "Items": [
    {
      "Sku": "WDG-100-BLU",
      "Quantity": 24,
      "Price": 18.50
    }
  ],
  "Terms": "Net30",
  "Channel": "Web"
}

Order types

The OrderType field classifies how an order was initiated. You can define values that suit your workflow — common examples include:
TypeDescription
StandardA regular customer-initiated order through your storefront or customer portal.
AssistedAn order entered by a sales rep on behalf of a customer (phone, trade show, etc.).
ImportA bulk order imported from an ERP or external system.
SampleA sample or trial order with special handling.
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:
 Shopping Cart


 Order Created  ──── OrderStatus: "Pending"


 Invoice Generated ── Status: "Draft" or "Issued"

      ├──── Payment Received ──── Status: "PartiallyPaid" → "Paid"

      └──── Void / Cancel ──────── Status: "Voided" or "Cancelled"
Once an order is created, Nymble Commerce can generate one or more invoices against it. A single order can have multiple invoices (e.g. for split shipments), and the 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).
FieldTypeDescription
IdstringInternal invoice ID.
InvoiceNumberstringHuman-readable invoice number.
OrderIdstringThe order this invoice was generated from.
OrderNumberstringThe associated order number.
ExternalIdstringYour identifier for this invoice in an external system.
CustomerobjectCustomer snapshot at time of invoicing.
PrimarySalesRepobjectSales rep associated with this invoice.
PONumberstringCustomer’s purchase order number.
InvoiceDatedatetimeDate the invoice was issued.
DueDatedatetimePayment due date.
TermsstringPayment terms (e.g. "Net30").
CurrencyCodestringISO currency code.
StatusstringCurrent invoice state — see below.
ItemsarrayLine items invoiced (Sku, ProductName, Quantity, Price, SubTotal).
PaymentsarrayList of payments recorded against this invoice.
TaxdecimalTax amount.
SubtotaldecimalPre-tax subtotal.
DiscountobjectInvoice-level discount (Code, Type, Value, Description).
DiscountAmountdecimalComputed discount amount.
InvoiceTotaldecimalGrand total of the invoice.
AmountPaiddecimalTotal payments collected so far.
BalancedecimalRemaining amount due (InvoiceTotal − AmountPaid).
NotesstringInternal notes.

Invoice status states

StatusDescription
DraftInvoice created but not yet sent to the customer.
IssuedInvoice has been issued; payment is expected.
PartiallyPaidOne or more payments recorded, but Balance > 0.
PaidInvoice is fully paid. Balance = 0.
VoidedInvoice was voided before payment. Removed from accounts receivable.
CancelledInvoice was cancelled. The record is preserved but the invoice is no longer active.

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}/payments endpoint to record the payment amount, method, date, and reference number.
Each Payment object on an invoice includes:
FieldDescription
AmountThe payment amount.
AmountFormattedFormatted payment amount string including currency symbol.
CurrencyCodeISO currency code for this payment.
MethodHow payment was made (e.g. "CreditCard", "EFT", "Cheque").
StatusPayment status (e.g. "Completed", "Pending").
PaymentDateWhen the payment was made or received.
ReferenceCheque number, bank reference, or transaction ID.
NotesOptional free-text notes on this payment.
CardType / Last4DigitsFor card payments, the card brand and last 4 digits.
RefundedAmountTotal amount refunded against this payment.
NetAmountNet amount after refunds (Amount − RefundedAmount).
RefundsList of refund records applied against this payment.
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.
The computed DiscountAmount and DiscountAmountFormatted fields reflect the actual dollar amount deducted, regardless of discount type.

Refunds and voids

Nymble Commerce supports two distinct reversal operations:
OperationWhen to useEffect
VoidInvoice is unpaid and needs to be cancelled before payment.Removes the invoice from accounts receivable. The record is marked Voided.
CancelInvoice needs to be marked inactive but preserved in records.Marks the invoice Cancelled. The record is retained for audit purposes.
RefundInvoice is fully or partially paid and payment needs to be reversed.Creates a refund record against the original payment. The invoice Balance is adjusted.
Void vs Cancel — voiding an invoice removes it from your accounts receivable totals, as if the obligation never existed. Cancelling marks the invoice inactive but leaves it visible in reporting. Choose void when the sale is being fully reversed; choose cancel when you need to preserve the paper trail. Both operations are permanent and cannot be undone.