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

# Refund an order

> This endpoint issues a refund for a specific order identified by `id`. The `x-store-id` header must be provided for authentication. Optionally, a `reason` and `amount` (for partial refunds) can be specified in the request body. On success, the refund ID and details are returned. An order must have an associated payment intent and must not already be refunded.



## OpenAPI

````yaml /api-reference/blink-api.json post /v1/orders/{id}/refund
openapi: 3.0.0
info:
  title: Blink API
  description: Comprehensive API documentation for Blink.
  version: 1.0.0
servers:
  - url: https://api.blink.store/v1
security:
  - storeIdHeader: []
tags:
  - name: Invoices
    description: Unified merchant of record invoices for products and subscriptions.
  - name: Geo Pricing
    description: Resolve Purchasing Power Parity (PPP) localized pricing.
paths:
  /v1/orders/{id}/refund:
    post:
      tags:
        - Orders
      summary: Refund an order
      description: >-
        This endpoint issues a refund for a specific order identified by `id`.
        The `x-store-id` header must be provided for authentication. Optionally,
        a `reason` and `amount` (for partial refunds) can be specified in the
        request body. On success, the refund ID and details are returned. An
        order must have an associated payment intent and must not already be
        refunded.
      parameters:
        - name: id
          in: path
          required: true
          description: ID of the order to refund.
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundOrderRequest'
      responses:
        '201':
          description: Order refunded successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundResponse'
        '400':
          description: Bad Request - Refund conditions not met.
        '401':
          description: Unauthorized - Store ID header missing.
        '404':
          description: Order not found.
        '500':
          description: Internal Server Error.
      security:
        - storeIdHeader: []
components:
  schemas:
    RefundOrderRequest:
      type: object
      properties:
        amount:
          type: integer
          description: Amount to refund in cents if partial refund is desired.
        reason:
          type: string
          description: Reason for the refund. Defaults to 'requested_by_customer'.
    RefundResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            order_id:
              type: string
            refund_id:
              type: string
            amount:
              type: integer
            status:
              type: string
            reason:
              type: string
            created_at:
              type: string
              format: date-time
  securitySchemes:
    storeIdHeader:
      type: apiKey
      in: header
      name: x-store-id

````