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

# Request Refund

> Request a refund for an order.



## OpenAPI

````yaml POST /v1/orders/refund
openapi: 3.0.3
info:
  title: Chessa Accounts API
  description: API collection for Chessa Accounts services
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.chessa.ai
security: []
tags:
  - name: User Endpoints
    description: Endpoints related to user management
  - name: Configuration Endpoints
    description: Endpoints for fetching application configurations
  - name: Recipient Endpoints
    description: Endpoints for managing recipients
  - name: Order Endpoints
    description: Endpoints for managing orders
  - name: Rate Endpoints
    description: Endpoints for exchange rates and fees
  - name: Referral Endpoints
    description: Endpoints for managing referrals
paths:
  /v1/orders/refund:
    post:
      tags:
        - Order Endpoints
      summary: Request Refund
      description: Request a refund for an order.
      operationId: requestRefund
      parameters:
        - name: x-client-id
          in: header
          schema:
            type: string
            example: ''
        - name: x-client-secret
          in: header
          schema:
            type: string
            example: ''
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                address:
                  type: string
                  example: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
                orderId:
                  type: string
                  example: order123
                tag:
                  type: string
                  example: '12345'
            example:
              address: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
              orderId: order123
              tag: '12345'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  createdAt:
                    type: string
                    example: '2025-03-18T10:45:22.123Z'
                  cryptoAmount:
                    type: string
                    example: '0.05'
                  cryptoAsset:
                    type: string
                    example: BTC
                  estimatedCompletionTime:
                    type: string
                    example: '2025-03-18T12:45:22.123Z'
                  orderId:
                    type: string
                    example: ord_abcdef123456789
                  reason:
                    type: string
                    example: Customer requested cancellation
                  refundAddress:
                    type: string
                    example: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
                  refundId:
                    type: string
                    example: ref_123456789abcdef
                  status:
                    type: string
                    example: pending
                  updatedAt:
                    type: string
                    example: '2025-03-18T10:45:22.123Z'
              examples:
                Success Response:
                  value:
                    createdAt: '2025-03-18T10:45:22.123Z'
                    cryptoAmount: '0.05'
                    cryptoAsset: BTC
                    estimatedCompletionTime: '2025-03-18T12:45:22.123Z'
                    orderId: ord_abcdef123456789
                    reason: Customer requested cancellation
                    refundAddress: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
                    refundId: ref_123456789abcdef
                    status: pending
                    updatedAt: '2025-03-18T10:45:22.123Z'
        '400':
          description: Error Response - Invalid Refund Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: invalid_refund_request
                  message:
                    type: string
                    example: >-
                      Cannot refund an order that is already completed or
                      refunded
                  statusCode:
                    type: number
                    example: 400
              examples:
                Error Response - Invalid Refund Request:
                  value:
                    error: invalid_refund_request
                    message: >-
                      Cannot refund an order that is already completed or
                      refunded
                    statusCode: 400
        '404':
          description: Error Response - Order Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: not_found
                  message:
                    type: string
                    example: Order not found
                  statusCode:
                    type: number
                    example: 404
              examples:
                Error Response - Order Not Found:
                  value:
                    error: not_found
                    message: Order not found
                    statusCode: 404

````