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

# Create a refund request

> Ask Ignyt to review a refund for one merchant order of the authenticated app. The request starts as `submitted`; approval and execution happen separately, so follow its status, events or the `order.refund_request.updated` webhook. Retrying with the same creation key and body returns the original request. Requires a server API key with `orders:write` (browser and agent credentials are rejected with `403`). Returns `422` when the amount exceeds the captured refundable remainder on its own, checked first even when requests are waiting. Only if that amount fits, returns `409` when adding the order's waiting requests exceeds the remainder.



## OpenAPI

````yaml /api-reference.json post /v1/refund-requests
openapi: 3.1.0
info:
  description: >-
    Multi-merchant checkout infrastructure (808labs). UAE/AED first on Stripe;
    Saudi/SAR follows separate certification. OpenAPI is canonical; customers
    can integrate without an SDK. Customer dashboard authentication uses
    verified OIDC; workspace access requires an invitation or explicitly enabled
    Sandbox self-registration; machine integrations use scoped API keys. Plans
    and usage are defined in the developer guide. Internal operator and provider
    callback contracts are excluded.
  title: Ignyt Platform API
  version: 0.1.0
servers:
  - url: https://sandbox.ignite-checkout.ai
    description: 'Planned Sandbox host: use assigned deployment URL until activated'
  - url: https://api.ignite-checkout.ai
    description: 'Planned Production host: separate approval and Live credentials required'
security: []
tags:
  - name: Integration
    description: Identity, usage and the public schema for the calling integration.
  - name: Merchants
    description: Discover merchants, manage enrollments and invite stores.
  - name: Catalog
    description: Products, variants, categories and synchronization.
  - name: Carts and checkout
    description: >-
      Build carts, freeze quotes, submit purchases and manage optional Sandbox
      buyer sharing.
  - name: Webhooks and events
    description: Endpoints, deliveries, retries and the event feed.
  - name: Refunds
    description: Request and follow refunds on merchant orders.
  - name: Purchases and orders
    description: Purchases, merchant orders, cancellations and returns.
  - name: Payments and finance
    description: Payment breakdowns, statements and disputes.
  - name: Custom fields
    description: Approved custom field schemas and order extensions.
paths:
  /v1/refund-requests:
    post:
      tags:
        - Refunds
      summary: Create a refund request
      description: >-
        Ask Ignyt to review a refund for one merchant order of the authenticated
        app. The request starts as `submitted`; approval and execution happen
        separately, so follow its status, events or the
        `order.refund_request.updated` webhook. Retrying with the same creation
        key and body returns the original request. Requires a server API key
        with `orders:write` (browser and agent credentials are rejected with
        `403`). Returns `422` when the amount exceeds the captured refundable
        remainder on its own, checked first even when requests are waiting. Only
        if that amount fits, returns `409` when adding the order's waiting
        requests exceeds the remainder.
      operationId: machine_create_v1_refund_requests_post
      parameters:
        - description: >-
            Required. A client-generated key that identifies this operation so
            it can be retried safely. Repeating the request with the same key
            and the same body returns the original result instead of performing
            the action again; reusing a key with a different body is rejected
            with `409`. After a timeout or network error, retry with the same
            key, never a new one.
          in: header
          name: Idempotency-Key
          required: true
          schema:
            description: >-
              Required. A client-generated key that identifies this operation so
              it can be retried safely. Repeating the request with the same key
              and the same body returns the original result instead of
              performing the action again; reusing a key with a different body
              is rejected with `409`. After a timeout or network error, retry
              with the same key, never a new one.
            maxLength: 80
            minLength: 1
            pattern: ^[A-Za-z0-9_-]+$
            title: Idempotency-Key
            type: string
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ignite-app-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ignite-App-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequestIn'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundRequestView'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: Missing, expired or invalid credentials (`unauthorized`).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: Server key lacks authority for this operation.
        '404':
          description: Order is outside the tenant/app/environment scope or absent.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: >-
            Idempotency-Key was already used with different request details, or
            this amount fits the refundable remainder on its own but adding the
            order's waiting requests exceeds it. An amount exceeding the
            remainder on its own returns 422 before the waiting-request check.
        '422':
          content:
            application/json:
              schema:
                properties:
                  error:
                    properties:
                      code:
                        type: string
                      details:
                        anyOf:
                          - items:
                              properties:
                                loc:
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: integer
                                  type: array
                                msg:
                                  type: string
                                type:
                                  type: string
                              required:
                                - type
                                - loc
                                - msg
                              type: object
                            type: array
                          - type: object
                      message:
                        type: string
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - details
                      - request_id
                    type: object
                required:
                  - error
                type: object
          description: Validation Error
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: >-
            A plan allowance, rate limit or resource limit was reached. For
            `rate_limited` (a per-second ceiling) or the monthly API allowance
            (`plan_quota_exceeded`), wait for the `Retry-After` interval before
            retrying. A specific `*_rate_limited` code, such as
            `invitation_email_rate_limited`, is an hourly limit sent without
            `Retry-After`: retry later with bounded backoff. A resource limit
            described by the operation, such as active merchant requests or
            uploads, does not clear by waiting: complete or withdraw existing
            items first. Monthly allowance and cost limits never block servicing
            of accepted orders; per-second ceilings still apply to servicing
            routes.
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying, sent only when the monthly API
                allowance is exhausted (`plan_quota_exceeded`) or a per-second
                rate limit (`rate_limited`) is reached; specific
                `*_rate_limited` codes omit it.
              schema:
                type: integer
      security:
        - MachineKey: []
components:
  schemas:
    RefundRequestIn:
      additionalProperties: false
      properties:
        amount_minor:
          description: >-
            Requested refund in integer minor units of the merchant order's
            currency (2500 = AED 25.00). It cannot exceed the captured amount
            still refundable after refunds already in flight (`422`). Together
            with this order's requests still waiting (`submitted`,
            `needs_information` or `approved`), it cannot exceed that amount
            either (`409`).
          examples:
            - 2500
          maximum: 2147483647
          minimum: 1
          title: Amount Minor
          type: integer
        child_order_id:
          description: >-
            Merchant order to refund; it must belong to the authenticated app
            and environment.
          examples:
            - mo_123
          maxLength: 40
          minLength: 1
          title: Child Order Id
          type: string
        items:
          description: >-
            Optional unique variants and quantities; when given, `amount_minor`
            cannot exceed their value.
          items:
            $ref: '#/components/schemas/RefundRequestItem'
          maxItems: 100
          title: Items
          type: array
        reason:
          description: Why the refund is requested; shown to the reviewer.
          examples:
            - Item arrived damaged and the shopper declined a replacement.
          maxLength: 500
          minLength: 10
          title: Reason
          type: string
      required:
        - child_order_id
        - amount_minor
        - reason
      title: RefundRequestIn
      type: object
    RefundRequestView:
      properties:
        amount_minor:
          description: >-
            Requested refund in integer minor units of `currency` (2500 = AED
            25.00).
          examples:
            - 2500
          title: Amount Minor
          type: integer
        app_id:
          title: App Id
          type: string
        bank_credit_status:
          const: not_confirmed
          description: >-
            Always `not_confirmed`: a successful refund does not prove the
            shopper's bank posted it.
          readOnly: true
          title: Bank Credit Status
          type: string
        child_order_id:
          title: Child Order Id
          type: string
        created_at:
          title: Created At
          type: string
        created_by:
          title: Created By
          type: string
        currency:
          description: ISO 4217 currency of the merchant order.
          examples:
            - AED
          title: Currency
          type: string
        environment:
          description: '`sandbox` or `live`.'
          examples:
            - sandbox
          title: Environment
          type: string
        executed_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Executed By
        execution_status:
          description: >-
            Refund execution: `not_started`, `executing`, `reserved`, `pending`,
            `unknown`, `succeeded` or `failed`. `unknown` is being confirmed
            with the payment provider; do not request again.
          readOnly: true
          title: Execution Status
          type: string
        id:
          description: Refund request ID.
          examples:
            - rrq_123
          title: Id
          type: string
        items:
          items:
            $ref: '#/components/schemas/RefundRequestItem'
          title: Items
          type: array
        purchase_id:
          title: Purchase Id
          type: string
        reason:
          title: Reason
          type: string
        refund_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Refund created once execution starts, otherwise `null`.
          title: Refund Id
        request_status:
          description: >-
            Review outcome: `submitted`, `needs_information`, `approved`,
            `rejected` or `blocked`.
          readOnly: true
          title: Request Status
          type: string
        reviewed_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Reviewed By
        revision:
          description: >-
            Increments on every change; send it as `expected_revision` when
            replying.
          examples:
            - 1
          title: Revision
          type: integer
        status:
          description: >-
            Lifecycle state: `submitted`, `needs_information`, `approved`,
            `rejected`, `executing`, `reserved`, `pending`, `unknown`,
            `succeeded`, `failed` or `blocked`.
          examples:
            - submitted
          title: Status
          type: string
        tenant_id:
          title: Tenant Id
          type: string
        updated_at:
          title: Updated At
          type: string
      required:
        - id
        - child_order_id
        - purchase_id
        - tenant_id
        - app_id
        - environment
        - amount_minor
        - currency
        - items
        - reason
        - status
        - revision
        - refund_id
        - created_by
        - reviewed_by
        - executed_by
        - created_at
        - updated_at
        - request_status
        - execution_status
        - bank_credit_status
      title: RefundRequestView
      type: object
    IgniteErrorEnvelope:
      description: Document the existing error handler without changing its serialization.
      properties:
        error:
          $ref: '#/components/schemas/IgniteErrorDetail'
      required:
        - error
      title: IgniteErrorEnvelope
      type: object
    RefundRequestItem:
      additionalProperties: false
      properties:
        qty:
          description: Units of this variant covered by the refund.
          examples:
            - 1
          maximum: 1000
          minimum: 1
          title: Qty
          type: integer
        variant_id:
          description: Purchased variant being refunded.
          examples:
            - var_123
          maxLength: 40
          minLength: 1
          title: Variant Id
          type: string
      required:
        - variant_id
        - qty
      title: RefundRequestItem
      type: object
    IgniteErrorDetail:
      description: Stable error fields; details remain open to each domain's JSON evidence.
      properties:
        code:
          title: Code
          type: string
        details:
          title: Details
        message:
          title: Message
          type: string
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
      required:
        - code
        - message
        - details
        - request_id
      title: IgniteErrorDetail
      type: object
  securitySchemes:
    MachineKey:
      description: Server-side scoped Ignyt API key.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.