@bates-solutions/squareup API Reference - v3.2.0
    Preparing search index...

    Interface CreateOrderOptions

    Create order options

    interface CreateOrderOptions {
        customerId?: string;
        discounts?: OrderDiscountInput[];
        idempotencyKey?: string;
        lineItems: LineItemInput[];
        locationId?: string;
        pricingOptions?: OrderPricingOptions;
        referenceId?: string;
        state?: "DRAFT" | "OPEN";
        taxes?: OrderTaxInput[];
    }
    Index
    customerId?: string
    discounts?: OrderDiscountInput[]

    Order-level and line-level discounts. Reference CatalogDiscount ids to keep pricing authoritative (the number tracks the catalog rather than being copied into the order). For a subscription order template, carry discounts (or explicit basePriceMoney) here rather than relying on pricingOptions.autoApplyDiscounts — see OrderPricingOptions.

    idempotencyKey?: string
    lineItems: LineItemInput[]
    locationId?: string

    Override the client's default location for this order.

    pricingOptions?: OrderPricingOptions
    referenceId?: string
    state?: "DRAFT" | "OPEN"

    Order state. Use 'DRAFT' when creating an order template that will back a subscription phase (subscriptions.create({ phases: [...] })).

    taxes?: OrderTaxInput[]

    Order-level and line-level taxes, ad hoc (name + percentage) or referencing a CatalogTax. Set pricingOptions.autoApplyTaxes: false to charge only these. The returned order's taxes[].appliedMoney gives the amount Square computed for each.