> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.bglobale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create order refund

> Issues a refund for the specified order, optionally including a product list and/or components (service gesture, shipping, Duties & Taxes).

<Note>
  Part of the [Refunds via API](/refunds-via-api) integration guide — see it for when and how to use this endpoint.
</Note>


## OpenAPI

````yaml api-reference/specs/createorderrefund.yaml POST /Order/CreateOrderRefund
openapi: 3.0.3
info:
  title: CreateOrderRefund
  version: 1.0.0
  description: >-
    The Refund API enables merchants to process customer refunds through
    Global-e, covering multiple use cases: full order refunds, full product
    refunds, partial product refunds, shipping refunds, Duties & Taxes refunds,
    service gestures and appeasements, return shipping deductions, or any
    combination of the above.
servers:
  - url: https://{globale_api_domain}
    variables:
      globale_api_domain:
        default: globale_api_domain
        description: Global-e API host, supplied to the merchant by Global-e.
security: []
tags:
  - name: CreateOrderRefund
    x-page-title: CreateOrderRefund
  - name: 'Direction: Merchant → Global-e'
  - name: 'Domain: Orders'
paths:
  /Order/CreateOrderRefund:
    post:
      tags:
        - CreateOrderRefund
      summary: Create a refund for an order
      description: >-
        Issues a refund for the specified order, optionally including product
        lists or components (service gesture, shipping, Duties & Taxes).
      operationId: createOrderRefund
      parameters:
        - name: orderRefund
          in: query
          required: true
          description: >-
            The order-level refund details, as a **URL-encoded, JSON-serialized
            `OrderRefundDetails` object** — passed in the query string, **not**
            in the request body. Only `OrderId` is required. See the integration
            guide for the object's fields.
          schema:
            type: string
            example: >-
              {"OrderId":"GE95135467GB","FullRefund":false,"TotalRefundAmount":"320","RefundReason":{"OrderRefundReasonCode":null,"Name":"Undefined"}}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/RefundProduct'
            example:
              - CartItemId: '1381109'
                RefundQuantity: null
                RefundAmount: '320'
      responses:
        '200':
          description: >-
            Refund processed. The same envelope carries both successful and
            processing-error outcomes — distinguished by `Success`. On a
            processing error, `Success` is false and `NotifyOrderRefund` is
            null.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderRefundInfo'
              examples:
                success:
                  summary: Refund generated
                  value:
                    Success: true
                    Reason: Refund generated with id 67961
                    NotifyOrderRefund:
                      MerchantOrderId: orderid123
                      RefundId: '67961'
                      MerchantGUID: 39a4ffdsfds-f6324b-41ce-afdsfa-c8ef18234132
                      Products:
                        - CartItemId: '2'
                          RefundQuantity: '1'
                          OriginalRefundAmount: '31.2707'
                          RefundAmount: '60.9500'
                          RefundReason:
                            OrderRefundReasonCode: null
                            Name: Undefined
                          RefundComments: Damaged shipment but the customer kept it
                      Components:
                        - Amount: '60.95'
                          OriginalAmount: '31.27'
                          IsChargedToMerchant: 'TRUE'
                          ComponentType: Products
                      OrderId: GE95135467GB
                      TotalRefundAmount: '60.95'
                      RefundReason:
                        OrderRefundReasonCode: null
                        Name: Undefined
                      RefundComments: Damaged shipment but the customer kept it
                      OriginalTotalRefundAmount: '31.27'
                      ServiceGestureAmount: '0'
                      WebStoreCode: null
                      WebStoreInstanceCode: GlobalEDefaultStoreInstance
                      FullRefund: false
                      TotalGiftCardsRefundAmount: '100.0000'
                      GiftCardsData:
                        CardId: '1234'
                        BalanceInGiftCardCurrency: 18.39
                        BalanceInCustomerCurrency: 290.21
                        GiftCardCurrencyCode: EUR
                        CustomerCurrencyMode: EUR
                        BalanceUsedInCardCurrency: 39
                        BalanceUsedInCustomerCurrency: 387.8
                        RedeemTransactionId: '1987489732938'
                        CardIdFields:
                          CardId: '498784937'
                          giftCardBalanceToUse: '100'
                processingError:
                  summary: Processing error
                  value:
                    Success: false
                    Reason: Processing error detail
                    NotifyOrderRefund: null
        '400':
          description: >-
            Validation error. Depending on merchant configuration the body is
            either an `ErrorInfo` object (`Code`/`Error`/`Description`) or a
            `ResponseInfo` object (`Success`/`Reason`). Clients should accept
            both — see review §2.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorInfo'
                  - $ref: '#/components/schemas/ResponseInfo'
              examples:
                nullParameter:
                  summary: Null parameter (ErrorInfo)
                  value:
                    Code: NullParameter
                    Error: Parameter {0} was null
                    Description: Please provide a valid value for the {0} parameter
                multiRefundDisallowed:
                  summary: Multiple refunds disallowed (ErrorInfo)
                  value:
                    Code: MULTI_REFUND_DISALLOWED
                    Error: >-
                      Multiple refund requests are disallowed for this order and
                      reason
                    Description: >-
                      This refund request is rejected because multiple refunds
                      are disallowed for the same order and the same reason code
                orderNotFound:
                  summary: Order not found (ResponseInfo)
                  value:
                    Success: false
                    Reason: Order {0} could not be found
                orderDoesNotBelong:
                  summary: Order doesn't belong to merchant (ResponseInfo)
                  value:
                    Success: false
                    Reason: Order {0} doesn't belong to this merchant
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --url 'https://{globale_api_domain}/Order/CreateOrderRefund?orderRefund={"OrderId":"GE95135467GB","FullRefund":false,"TotalRefundAmount":"320","RefundReason":{"OrderRefundReasonCode":null,"Name":"Undefined"}}' \
              --header 'Content-Type: application/json' \
              --data '[{"CartItemId":"1381109","RefundQuantity":null,"RefundAmount":"320"}]'
components:
  schemas:
    RefundProduct:
      type: object
      title: RefundProduct
      description: A product line to refund. One of CartItemId or ProductCode is required.
      properties:
        CartItemId:
          type: string
          description: >-
            The unique product line identifier at the order level, as provided
            in GetCheckoutCartInfo and returned in SendOrderToMerchant (Global-e
            to Merchant).
        ProductCode:
          type: string
          description: >-
            The code of the product from the GetOrderDetails endpoint. This can
            be either the SKU or the ProductCodeSecondary. Mandatory if
            CartItemId is not specified.
        RefundQuantity:
          type: string
          nullable: true
          description: >-
            The product line quantity to refund. If the amount attributes are
            not specified, a full refund is initiated for (product unit *
            quantity). For returnable products, use "null" for the refund
            attribute. Mandatory if appeasements are not enabled.
        OriginalRefundAmount:
          type: string
          description: >-
            Preferred if not full product amount - The total product line refund
            amount in Merchant currency, if partial will be backward pro-rated
            for reconciliation.
        RefundAmountPercent:
          type: string
          description: The total product line refund amount, in %.
        RefundAmount:
          type: string
          description: >-
            If partial, the total product line refund amount in Customer
            currency will be pro-rated for customer values from transaction
            amounts. The amount must include domestic VAT, if applicable.
        RefundReason:
          $ref: '#/components/schemas/OrderRefundReasonObject'
          description: >-
            Provide the product line refund reason for logging on the Global-e
            side.
        RefundComments:
          type: string
          description: Add comments about the refund for logging on the Global-e side.
    OrderRefundInfo:
      type: object
      title: OrderRefundInfo
      description: Refund response envelope.
      properties:
        Success:
          type: boolean
          description: Indicates if the respective API method was successful
        Reason:
          type: string
          description: Text that optionally describes the reason for the Success status
        NotifyOrderRefund:
          allOf:
            - $ref: '#/components/schemas/MerchantOrderRefund'
          nullable: true
          description: >-
            Notifies the merchant about Global-E initiated refund issued to the
            end customer.
    ErrorInfo:
      type: object
      title: ErrorInfo
      description: Error response (Code / Error / Description form).
      properties:
        Code:
          type: string
          description: Error code to be returned when an error occurs
        Error:
          type: string
          description: In case of an error, this property indicates the error message text
        Description:
          type: string
          description: >-
            In case of an error, this property indicates the error message
            description
        Success:
          type: boolean
          description: >-
            Indicates if the call has succeeded. FALSE denotes an error or
            failure
    ResponseInfo:
      type: object
      title: ResponseInfo
      description: Error response (Success / Reason form).
      properties:
        Success:
          type: boolean
          description: FALSE on error.
        Reason:
          type: string
          description: Text describing the failure.
    OrderRefundReasonObject:
      type: object
      title: OrderRefundReasonObject
      properties:
        OrderRefundReasonCode:
          type: string
          nullable: true
          description: >-
            Code denoting the order refund reason on the Merchant site (for
            mapping on the Global-e side)
        Name:
          type: string
          description: The name of the order refund reason.
    MerchantOrderRefund:
      type: object
      title: Merchant.OrderRefund
      properties:
        Components:
          type: array
          description: List of RefundComponent objects for this order refund
          items:
            $ref: '#/components/schemas/RefundComponent'
        FullRefund:
          type: boolean
          description: >-
            The flag indicating that the full refund of the order should be
            performed (product,shipping,taxes)
        MerchantGUID:
          type: string
          description: Unique identifier of the Merchant on Global-e
        MerchantOrderId:
          type: string
          description: Unique order identifier on the Merchant's site
        OrderId:
          type: string
          description: Global-e order unique identifier
        OriginalTotalRefundAmount:
          type: string
          description: >-
            The refund amount in the original Merchant's currency including the
            local Merchant's VAT
        Products:
          type: array
          description: List of Refund Product objects for this order refund
          items:
            $ref: '#/components/schemas/MerchantRefundProduct'
        RefundAsGiftCard:
          type: boolean
          description: Identifies whether or not the refund was provided as a gift card
        RefundComments:
          type: string
          description: Comments for the order refund
        RefundId:
          type: string
          description: Recorded refund id on the Global-e side
        RefundReason:
          $ref: '#/components/schemas/MerchantOrderRefundReason'
          description: Reason for the order refund
        ServiceGestureAmount:
          type: string
          description: >-
            "Service gesture" amount in the customer's currency is included in
            TotalRefundAmount.
        TotalGiftCardsRefundAmountinMerchantCurrency:
          type: string
          description: The total refund amount to the gift card, in the merchant's currency
        TotalRefundAmount:
          type: string
          description: >-
            The total refund amount in the end customer's currency used for this
            order's payment
        WebStoreCode:
          type: string
          nullable: true
          description: Code used on the merchant's side to identify the web store
        WebStoreInstanceCode:
          type: string
          description: >-
            Code used on the merchant's side to identify the web store instance
            where the current cart is originating from
        TotalGiftCardsRefundAmount:
          type: string
          description: Total refund to gift card (from the documented example).
        GiftCardsData:
          $ref: '#/components/schemas/GiftCardsData'
          description: >-
            Gift card refund details (from the documented example). NOTE: the
            running source returns this as an array; see review §2.
    RefundComponent:
      type: object
      title: Merchant.RefundComponent
      properties:
        Amount:
          type: string
          description: The refund amount in customer currency
        ComponentType:
          type: string
          description: Products, Shipping, Duties, PrepaidReturn or ServiceGesture.
        IsChargedToMerchant:
          type: string
          description: >-
            If this component is charged to the merchant, the flag is TRUE
            (default). If this component is charged to Global-E, the flag is
            FALSE. If the same component is split between charged to the
            merchant and charged to Global-E, it should appear twice, each time
            with a different value in IsChargedToMerchant. Exception is a
            component PrepaidReturn – it should always be IsChargedToMerchant =
            TRUE
        OriginalAmount:
          type: string
          description: The refund amount in merchant currency
        RefundAmount:
          type: string
          description: >-
            The refund amount for this product line item in the end customer's
            currency used for this order's payment
    MerchantRefundProduct:
      type: object
      title: Merchant.RefundProduct
      properties:
        CartItemId:
          type: string
          description: Identifier of the line item on the Merchant's site
        OriginalRefundAmount:
          type: string
          description: >-
            Refund the amount in the original Merchant's currency including the
            local Merchant's VAT for this product line item, before applying any
            price modifications
        RefundAmount:
          type: string
          description: >-
            The refund amount for this product line item in the end customer's
            currency used for this order's payment
        RefundComments:
          type: string
          description: Comments for this product's refund
        RefundQuantity:
          type: string
          description: Product quantity
        RefundReason:
          $ref: '#/components/schemas/MerchantOrderRefundReason'
          description: Reason for this product's refund
        sku:
          type: string
          description: >-
            SKU code used to identify the product on the Merchant's side (to be
            mapped on the Global-e side)
    MerchantOrderRefundReason:
      type: object
      title: Merchant.OrderRefundReason
      properties:
        Name:
          type: string
          description: The name of the order refund reason.
        OrderRefundReasonCode:
          type: string
          nullable: true
          description: >-
            Code denoting the order refund reason on the Merchant site (for
            mapping on the Global-e side)
    GiftCardsData:
      type: object
      title: GiftCardsData
      properties:
        BalanceInCustomerCurrency:
          type: number
          description: The gift card balance in the customer's currency.
        BalanceInGiftCardCurrency:
          type: number
          description: The gift card balance in the gift card's currency.
        BalanceUsedInCardCurrency:
          type: number
          description: The balance used from the gift card in the gift card currency
        BalanceUsedInCustomerCurrency:
          type: number
          description: The balance used from the gift card in the customer's currency
        CardFields:
          type: object
          description: >-
            An object containing the following card details: CardId
            giftCardBalanceToUse
        CardId:
          type: number
          description: Gift card's unique identifier
        CustomerCurrencyMode:
          type: string
          description: The code for the customer's currency
        ErrorCode:
          type: string
          description: The error code
        ErrorText:
          type: string
          description: Text describing the error.
        GiftCardCurrencyCode:
          type: string
          description: The code for the gift card's currency
        IsRefundSuccess:
          type: boolean
          description: Indicates if the refund was successful or not.
        GiftCardType:
          type: number
          description: Number indicating the type of gift card
        OriginalTotalRefundAmount:
          type: string
          description: >-
            The refund amount in the original Merchant's currency including the
            local Merchant's VAT
        RedeemTransactionId:
          type: string
          description: The gift card redemption's transaction identifier.
        RefundedBalanceInCustomerCurrency:
          type: number
          description: The refunded balance in the customer's selected currency
        RefundeBalanceInGiftCardCurrency:
          type: number
          description: The refunded balance in the currency of the gift card

````