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

    Provider-neutral request for one full refund of a confirmed commercial order.

    The order identity doubles as the idempotency key: every attempt of the same refund reuses it, so a retried refund is recognized as a repetition rather than a second money movement. Lines must reconcile exactly with the gross amount so no provider is ever asked to refund a total the application did not capture.

    interface RefundRequest {
        currency: "SEK";
        grossAmountMinor: number;
        lines: readonly RefundLine[];
        orderId: string;
        otherReason: string | null;
        paymentMethod: "card";
        purchaseOrderId: string;
        purchasePaymentReference: string;
        reason:
            | "customer-return"
            | "suspected-malfunction"
            | "suspected-fraud"
            | "duplicate-transaction"
            | "other";
    }
    Index
    currency: "SEK"
    grossAmountMinor: number

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

    lines: readonly RefundLine[]

    Priced lines of the original selection being refunded.

    orderId: string

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

    otherReason: string | null

    Required, bounded explanation only when reason is other.

    paymentMethod: "card"

    Neutral method used for the original confirmed charge.

    purchaseOrderId: string

    Reference of the original purchase being refunded.

    purchasePaymentReference: string

    Payment-level reference of the original confirmed charge.

    reason:
        | "customer-return"
        | "suspected-malfunction"
        | "suspected-fraud"
        | "duplicate-transaction"
        | "other"

    Operator-selected neutral reason; the adapter maps it to provider vocabulary.