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

# Refund a transaction ( STABLE )

> Once a transaction has been completed, this API can be used to issue a refund, thereby clawing back funds from the payee and transferring them back to the payor. An optional amount can be specified to either issue a partial refund or add additional fees to the original amount. If the amount is not specified, the total transaction amount is refunded.



## OpenAPI

````yaml https://api.grailpay.com/docs?api-docs.json post /3p/api/v1/transactions/{uuid}/refund
openapi: 3.0.0
info:
  title: GrailPay ACH API
  description: API Documentation for moving funds via ACH using the GrailPay ACH API
  version: 2025.12.19.2
servers:
  - url: https://api.grailpay.com
    description: Production environment
  - url: https://api-sandbox.grailpay.com
    description: Sandbox environment
security: []
tags:
  - name: Users
    description: >-
      API Endpoints used for the onboarding and managing People, Businesses, and
      Merchants.
  - name: Transactions
    description: API Endpoints used for creating and managing transactions.
  - name: Payouts
    description: API Endpoints used for fetching payout information.
  - name: Refunds
    description: API Endpoints used for creating and retrieving refunds.
  - name: Bank Accounts
    description: API Endpoints used for adding and managing bank accounts.
  - name: Webhooks
    description: API Endpoints used for registering and de-registering webhooks.
  - name: Billing
    description: API Endpoints used for retrieving billing information.
  - name: Stable
    description: Stable, up-to-date APIs that are recommended for current integration.
  - name: Sunsetting
    description: Sunsetting APIs that are still supported but scheduled for deprecation.
  - name: Deprecated
    description: Deprecated APIs that are no longer supported and should be removed.
  - name: SUNSETTING
    description: SUNSETTING
paths:
  /3p/api/v1/transactions/{uuid}/refund:
    post:
      tags:
        - Refunds
        - Stable
      summary: Refund a transaction ( STABLE )
      description: >-
        Once a transaction has been completed, this API can be used to issue a
        refund, thereby clawing back funds from the payee and transferring them
        back to the payor. An optional amount can be specified to either issue a
        partial refund or add additional fees to the original amount. If the
        amount is not specified, the total transaction amount is refunded.
      operationId: d88ce5d80658c8999d1ca01633290d01
      parameters:
        - name: uuid
          in: path
          description: UUID of the transaction to refund
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1RefundTransactionRequest'
      responses:
        '201':
          description: Refund created
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: ''
                  data:
                    $ref: '#/components/schemas/V1RefundTransactionResponse'
                  errors:
                    type: string
                    example: null
                  error_code:
                    type: string
                    example: null
                type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Error401Unauthorized'
                  - $ref: '#/components/schemas/Error401InvalidTokenStructure'
                  - $ref: '#/components/schemas/Error401InvalidTokenData'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403ForbiddenResponse'
        '404':
          description: Transaction not found
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Transaction not found
                  data:
                    type: string
                    example: null
                  errors:
                    type: string
                    example: null
                  error_code:
                    type: string
                    example: null
                type: object
      security:
        - ApiToken: []
components:
  schemas:
    V1RefundTransactionRequest:
      required:
        - amount
      properties:
        amount:
          description: Amount to refund
          type: integer
          example: 100
        client_reference_id:
          description: Client reference id
          type: string
          example: '123456'
      type: object
    V1RefundTransactionResponse:
      properties:
        uuid:
          type: string
          example: d1b3b3b0-7b3b-4b3b-8b3b-3b3b3b3b3b3b
        transaction_uuid:
          type: string
          example: d1b3b3b0-7b3b-4b3b-8b3b-3b3b3b3b3b3b
        amount:
          type: number
          format: float
          example: 100
        status:
          type: string
          example: REFUND_PENDING
        client_reference_id:
          type: string
          example: '123456'
        created_at:
          type: string
          format: date-time
          example: '2021-09-01 12:00:00'
      type: object
    Error401Unauthorized:
      properties:
        status:
          type: boolean
          example: false
        message:
          type: string
          example: Invalid Token
        data:
          type: string
          example: null
        errors:
          type: string
          example: null
        error_code:
          type: string
          example: null
      type: object
    Error401InvalidTokenStructure:
      properties:
        status:
          type: boolean
          example: false
        message:
          type: string
          example: >-
            Invalid token format. The token should be in the following format:
            ID|TOKEN_VALUE. Example: 12345|abcdefg
        data:
          type: string
          example: null
        errors:
          type: string
          example: null
        error_code:
          type: string
          example: null
      type: object
    Error401InvalidTokenData:
      properties:
        status:
          type: boolean
          example: false
        message:
          type: string
          example: >-
            Invalid token format. The ID in the token must be an integer.
            Example: 12345|abcdefg
        data:
          type: string
          example: null
        errors:
          type: string
          example: null
        error_code:
          type: string
          example: null
      type: object
    Error403ForbiddenResponse:
      properties:
        status:
          type: boolean
          example: false
        message:
          type: string
          example: Access denied. Please use a secure (HTTPS) connection.
        data:
          type: string
          example: null
        errors:
          type: string
          example: null
        error_code:
          type: string
          example: null
      type: object
  securitySchemes:
    ApiToken:
      type: http
      description: >-
        Token-based authentication using Authorization: Bearer <YOUR_API_KEY>
        provided by the GrailPay Support Team.
      bearerFormat: Token
      scheme: bearer

````