Skip to content

OrderRefund ​

Type: schema

Description ​

Order refund model

TypeScript Definition ​

typescript
OrderRefund: {{
            request_number?: string;
            /** Format: double */
            refund_amount?: number;
            /** Format: date-time */
            refund_date?: string;
            /**
             * @description `pending`: created, not sent yet; a `manual` refund stays `pending` until the store marks it paid. `refund_initiated`: in progress: being sent to the payment gateway or bank, or a refund made on the payment gateway being recorded. `initiated`: the gateway or bank accepted it; its result is awaited. `manual_review`: the gateway holds it for review. `success`: the money is returned. `failed`: it was not. `forfeited`: an admin decided the store keeps money it owed back on a `manual` refund; the reason is in `refund_remarks`.
             * @enum {string}
             */
            status?: "pending" | "success" | "failed" | "refund_initiated" | "initiated" | "manual_review" | "forfeited";
            /**
             * @description `original-payment-mode`: back through the payment gateway. `bank-transfer`: paid to the customer's bank account. `manual`: handed back by the store in the way it was paid (cash, cheque and the like); owed (`pending`) until the store marks it paid, unless the store marks that method paid at once. `loyalty-point`: points credited back.
             * @enum {string}
             */
            payment_mode?: "original-payment-mode" | "loyalty-point" | "bank-transfer" | "manual";
            payment_method?: string | null;
            /** @description The payment gateway's or bank's reference for the refund, once it reports one. */
            payment_reference_number?: string | null;
            /** @description The account a bank-transfer refund is paid to; `null` for other refunds. */
            bank_account_number?: string | null;
            /** @description The bank of a bank-transfer refund's account; `null` for other refunds. */
            bank_name?: string | null;
            refund_remarks?: string | null;
            /** Format: date-time */
            created_at?: string;
            /** Format: date-time */
            modified_at?: string;
        };
        /**
         * OrderRefundEvent
         * @description A refund as the `payment.refund.*` events carry it: the order's refund (`OrderRefund`), with the payment it pays back and the provider it is paid through.
         */
}

OpenAPI Schema ​

json
{
  "title": "OrderRefund",
  "description": "Order refund model",
  "type": "object",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/OrderRefund",
    "description": "API reference for the OrderRefund schema"
  },
  "properties": {
    "request_number": {
      "type": "string"
    },
    "refund_amount": {
      "type": "number",
      "format": "double"
    },
    "refund_date": {
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "description": "`pending`: created, not sent yet; a `manual` refund stays `pending` until the store marks it paid. `refund_initiated`: in progress: being sent to the payment gateway or bank, or a refund made on the payment gateway being recorded. `initiated`: the gateway or bank accepted it; its result is awaited. `manual_review`: the gateway holds it for review. `success`: the money is returned. `failed`: it was not. `forfeited`: an admin decided the store keeps money it owed back on a `manual` refund; the reason is in `refund_remarks`.",
      "type": "string",
      "enum": [
        "pending",
        "success",
        "failed",
        "refund_initiated",
        "initiated",
        "manual_review",
        "forfeited"
      ]
    },
    "payment_mode": {
      "description": "`original-payment-mode`: back through the payment gateway. `bank-transfer`: paid to the customer's bank account. `manual`: handed back by the store in the way it was paid (cash, cheque and the like); owed (`pending`) until the store marks it paid, unless the store marks that method paid at once. `loyalty-point`: points credited back.",
      "type": "string",
      "enum": [
        "original-payment-mode",
        "loyalty-point",
        "bank-transfer",
        "manual"
      ]
    },
    "payment_method": {
      "type": [
        "string",
        "null"
      ]
    },
    "payment_reference_number": {
      "description": "The payment gateway's or bank's reference for the refund, once it reports one.",
      "type": [
        "string",
        "null"
      ]
    },
    "bank_account_number": {
      "description": "The account a bank-transfer refund is paid to; `null` for other refunds.",
      "type": [
        "string",
        "null"
      ]
    },
    "bank_name": {
      "description": "The bank of a bank-transfer refund's account; `null` for other refunds.",
      "type": [
        "string",
        "null"
      ]
    },
    "refund_remarks": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "modified_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: