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

# List refunds

> Your organization's refunds, newest first.



## OpenAPI

````yaml GET /developer/v1/refund
openapi: 3.1.0
info:
  title: Compago API
  version: 1.0.0
  description: >-
    Public and private API endpoints for Compago's payment infrastructure. This
    specification currently includes endpoints for one-time payments. More
    endpoints will be added as the platform evolves.
servers:
  - url: https://demo-api-harmony.compago.com/api
  - url: https://api-harmony.compago.com/api
security: []
tags:
  - name: OneTimePayment
    description: Endpoints for creating and processing one-time payment links
  - name: PaymentMethod
    description: >-
      Endpoints for saving cards, charging saved payment methods, holding and
      capturing funds, and processing refunds
  - name: PaymentIntent
    description: >-
      Endpoints for creating and managing card-present payment intents for POS
      terminal integrations
  - name: Payments
    description: Read the payments your organization has taken
  - name: Subscriptions
    description: Read and manage recurring billing agreements
  - name: PaymentLinks
    description: Create, edit and retire hosted checkout links
  - name: Products
    description: Manage the catalogue behind product-based payment links
  - name: Promotions
    description: Read the promotions your organization funds or benefits from
  - name: Salespeople
    description: Read the point-of-sale operators in your organization
  - name: Organization
    description: Read your organization profile and its members
  - name: SavedCards
    description: Read saved payment methods and their payments
  - name: Payouts
    description: >-
      Read the transfers Compago sent to your bank accounts and what each one
      paid
  - name: Events
    description: >-
      Read the webhook events of the last 30 days, to reconcile after your
      endpoint was down
  - name: ApiKeys
    description: Manage your organization's API keys with a key that holds `apiKey:write`.
paths:
  /developer/v1/refund:
    get:
      tags:
        - Refunds
      summary: List refunds
      description: Your organization's refunds, newest first.
      operationId: listPublicRefunds
      parameters:
        - name: paymentId
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: Only the refunds of this payment.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: '`pagination.nextCursor` from the previous page.'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1RefundPage'
        '400':
          description: Invalid request. A query parameter failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '401':
          description: Unauthorized. The `x-api-key` header is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '403':
          description: >-
            Forbidden. The key is not bound to an organization, or the
            organization is not a merchant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '429':
          description: Too many requests. See Rate limits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    V1RefundPage:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/V1Refund'
        pagination:
          $ref: '#/components/schemas/V1Pagination'
      required:
        - data
        - pagination
    PublicError:
      type: object
      properties:
        message:
          type: string
          description: Human-readable description.
        code:
          type: string
          description: Stable machine-readable code. Branch on this, not on `message`.
      required:
        - message
    V1Refund:
      type: object
      description: >-
        A refund of a sale. Today a refund always gives back the whole charge
        (the sale and its tip).
      required:
        - id
        - object
        - paymentId
        - amount
        - currency
        - status
        - failureReason
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
        object:
          type: string
          enum:
            - refund
        paymentId:
          type: string
          format: uuid
          description: The sale refunded, as `GET /developer/v1/payment/{id}` reads it.
        amount:
          type: number
          example: 1150
          description: What went back to the customer, in MXN.
        currency:
          type: string
          example: MXN
          enum:
            - MXN
        status:
          type: string
          enum:
            - PENDING
            - SUCCEEDED
            - FAILED
          description: >-
            `SUCCEEDED` once the bank accepted it. `PENDING` while a bank
            transfer refund (SPEI) is on its way, `FAILED` if the bank refused
            it.
        failureReason:
          type:
            - string
            - 'null'
          enum:
            - DECLINED
            - RETURN_FAILED
            - null
          description: >-
            Why the refund failed: `DECLINED` when the bank declined the card
            refund, `RETURN_FAILED` when a transfer could not be sent back to
            the account it came from. `null` otherwise.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    V1Pagination:
      type: object
      properties:
        limit:
          type: integer
          description: Rows requested for this page.
        hasMore:
          type: boolean
          description: Whether another page exists.
        nextCursor:
          type:
            - string
            - 'null'
          description: Pass as `?cursor=` to fetch the next page. Null on the last page.
      required:
        - limit
        - hasMore
        - nextCursor
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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