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

# Initiate Refund

> Initiates a full refund for a specified order.

Once the API call is successful, the refund process begins. The result of the refund, whether it succeeds or fails, is communicated asynchronously when the order status updates to `Refunded` or `Refund Failed`. You can track the order status in the **Orders** tab of the Publisher Dashboard.

If the refund is completed successfully, the total order amount is reimbursed, and the [Order Refunded](../../events/v2/order/order_refunded) event is triggered.

**Note:** This action is final and can't be undone.




## OpenAPI

````yaml openapi-initiate-refund.json POST /checkout/api/v1/order/{orderId}/refund
openapi: 3.0.3
info:
  title: Create Refund API
  version: 1.0.0
  description: API to issue full refunds for completed orders.
servers:
  - url: https://api.appcharge.com
security: []
paths:
  /checkout/api/v1/order/{orderId}/refund:
    post:
      summary: Initiate Refund
      description: "Initiates a full refund for a specified order. <br /> <br /> Once the API call is successful, the refund process begins. The result of the refund, whether it succeeds or fails, is communicated asynchronously when the order status updates to\_`Refunded`\_or\_`Refund Failed`. You can track the order status in the **Orders** tab of the Publisher Dashboard. <br /> <br /> If the refund is completed successfully, the total order amount is reimbursed, and the [Order Refunded](../../events/v2/order/order_refunded) event is triggered. <br /> <br /> **Note:** This action is final and can't be undone."
      operationId: createRefund
      parameters:
        - name: orderId
          in: path
          required: true
          schema:
            type: string
          description: Order ID to refund.
        - name: x-publisher-token
          in: header
          required: true
          schema:
            type: string
          description: The publisher token used for authentication.
        - name: x-user-id
          in: header
          required: true
          schema:
            type: string
          description: The user ID initiating the refund for the order.
      responses:
        '201':
          description: Refund initiated successfully.
          content:
            application/json:
              schema:
                type: object
                description: Returns an empty object.
              examples:
                success:
                  summary: Empty success response
                  value: {}
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: Refund result.
                  errCode:
                    type: string
                    description: Error code.
                  message:
                    type: string
                    description: Error message.
              examples:
                forbidden:
                  value:
                    result: null
                    errCode: -1
                    message: Forbidden resource
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message.
              examples:
                forbidden:
                  value:
                    message: Order does not exist or cannot be found.
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message.
              examples:
                refundFailure:
                  summary: Refund failure response
                  value:
                    message: Failed to initiate a refund request

````