Foodtruck Order — TypeScript Reference - v0.1.0
    Preparing search index...

    Provider-neutral request for one commercial checkout operation.

    The contract deliberately carries only what a charge needs. Line items, VAT breakdowns, payment methods, provider customer references, and every protocol/authentication concern stay outside it until the discovery record proves that a provider supports them (MVP-TECH-002), so the application never guesses a provider capability.

    interface CheckoutRequest {
        currency: "SEK";
        grossAmountMinor: number;
        lines?: readonly CheckoutLine[];
        operationId: string;
    }
    Index
    currency: "SEK"
    grossAmountMinor: number

    Gross amount to charge, including VAT, in integer minor units.

    lines?: readonly CheckoutLine[]

    Optional per-line breakdown of the charged selection, in neutral facts.

    The selected payment provider requires priced line items with a mandatory per-line tax entry, so a real adapter cannot build a valid order from a bare gross total. These lines are therefore neutral catalog facts captured before the charge — never provider field names — and the sum of grossUnitMinor * quantity equals CheckoutRequest.grossAmountMinor. The deterministic fake ignores them, so local and automated acceptance are unchanged; only a provider adapter reads them. Absent lines mean "no breakdown was supplied", which a provider adapter must treat as a request that cannot be charged rather than inventing prices.

    operationId: string

    Stable identity of this checkout operation, owned by the application.

    Every attempt of the same operation reuses it, so a later retry policy can recognize a repeated initiation. It is never a provider identifier.