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

# Get refund availability

> What this payment can still be refunded for, before you submit an amount: the remaining balance, whether a refund is possible at all, and which refund types it allows.



## OpenAPI

````yaml /api-reference/openapi.json get /payment/intents/{paymentIntentId}/refunds/availability
openapi: 3.1.0
info:
  title: Orqex Orchestrate API
  version: 1.0.0
  description: >-
    The Orqex Orchestrate API for collecting payments and sending payouts.


    Authenticate with a secret key as a bearer token; the key also selects the
    environment. Amounts are in major units everywhere: `50` means 50.00. Writes
    accept an `X-Idempotency-Key` header. Lists are cursor-paginated.


    Which countries, currencies and payment methods are available depends on
    your project configuration: read them from the discovery endpoints at
    payment time, or look them up in your dashboard.
  contact:
    name: Orqex Orchestrate
    url: https://orqex.com
servers:
  - url: https://api.orqex.com/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Checkout
    description: Hosted checkout sessions.
  - name: Payment intents
    description: Payments, discovery and reconciliation.
  - name: Payment attempts
    description: Collecting a payment and confirming it.
  - name: Refunds
    description: Returning money to a payer.
  - name: Payouts
    description: Sending money out.
  - name: Utilities
    description: Exchange rates and method status.
paths:
  /payment/intents/{paymentIntentId}/refunds/availability:
    get:
      tags:
        - Refunds
      summary: Get refund availability
      description: >-
        What this payment can still be refunded for, before you submit an
        amount: the remaining balance, whether a refund is possible at all, and
        which refund types it allows.
      operationId: getRefundAvailability
      parameters:
        - name: paymentIntentId
          in: path
          required: true
          description: The payment intent id.
          schema:
            type: string
      responses:
        '200':
          description: The refund position of the payment.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/RefundAvailability'
        '401':
          description: Missing, invalid, inactive or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The request address is not on the API key's allowlist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (100 requests per minute per key).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    RefundAvailability:
      type: object
      description: >-
        What this payment can still be refunded for. `refundable_amount` is
        authoritative: it already reserves in-flight refunds, so a refund up to
        that amount is the one guaranteed not to be rejected on balance.
      properties:
        is_refundable:
          type: boolean
          description: >-
            Whether a refund can be created right now. When `false`,
            `unavailable_reason` says why.
        refundable_amount:
          $ref: '#/components/schemas/Amount'
        refunded_amount:
          $ref: '#/components/schemas/Amount'
        pending_amount:
          $ref: '#/components/schemas/Amount'
        has_pending_refund:
          type: boolean
          description: Whether at least one refund is currently in flight.
        available_types:
          type: array
          description: >-
            Refund types the remaining balance allows. `partial` is absent when
            no amount smaller than the balance can be expressed in the currency.
          items:
            type: string
            enum:
              - full
              - partial
          example:
            - full
            - partial
        execution_method:
          type: string
          nullable: true
          enum:
            - gateway
            - payout
          description: >-
            How the reversal would be executed. `payout` means it would be sent
            back to the original payer. `null` when no refund is available.
        unavailable_reason:
          type: string
          nullable: true
          description: Why no refund can be created, or `null` when one can.
    Error:
      type: object
      properties:
        message:
          type: string
    Amount:
      type: object
      properties:
        value:
          type:
            - number
            - 'null'
          example: 50
        formatted:
          type:
            - string
            - 'null'
          example: $50.00
        short:
          type:
            - string
            - 'null'
          example: $50
        currency:
          type:
            - string
            - 'null'
          example: USD
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your secret key, e.g. `sk_live_...` or `sk_sandbox_...`.

````