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

# List chargebacks

> Chargebacks and alerts in the window (by `requestedAt`).



## OpenAPI

````yaml /openapi.json get /api/v1/chargebacks
openapi: 3.1.0
info:
  title: PagAmerican Data API
  version: 1.0.0
  description: >-
    Sales analytics API for external consumers (creators), served from
    ClickHouse in near real time.


    **Authentication:** send your API key (`pag_...`) directly in the
    `Authorization: Bearer <your_key>` header. There is no token exchange — the
    opaque key is the Bearer token itself.


    **Dates:** `from`/`to` are `YYYY-MM-DD` at 00:00:00 UTC; `from` is
    inclusive, `to` is exclusive. Max window 90 days. `/purchases` and `/orders`
    filter by **checkout initialization** (`checkoutInitializedAt`);
    `/checkouts` by load time; `/abandoned-carts` by session start; `/refunds`
    by request time.


    **Tenant scope:** you only receive your own account's data — isolation is
    enforced automatically by the key.
servers:
  - url: https://external-api-service.pagamerican.app
    description: Production
  - url: https://external-api-service.pagamerican.net
    description: Staging
security:
  - apiKey: []
tags:
  - name: purchases
    description: Purchases
  - name: orders
    description: Orders (creator only)
  - name: products
    description: Product catalog (creator only)
  - name: offers
    description: Offer catalog (creator only)
  - name: checkouts
    description: Checkout sessions (creator only)
  - name: abandoned-carts
    description: Abandoned carts (creator only)
  - name: refunds
    description: Refunds — totally or partially refunded
  - name: chargebacks
    description: Chargebacks and alerts
  - name: health
    description: Service status
paths:
  /api/v1/chargebacks:
    get:
      tags:
        - chargebacks
      summary: List chargebacks
      description: Chargebacks and alerts in the window (by `requestedAt`).
      parameters:
        - name: from
          in: query
          required: true
          description: >-
            Inclusive start date (00:00 UTC), YYYY-MM-DD. Must be on or after
            2026-08-21 (the data window start); an earlier date returns 422.
          schema:
            type: string
            format: date
            example: '2026-08-21'
        - name: to
          in: query
          required: true
          description: >-
            Exclusive end date (00:00 UTC), YYYY-MM-DD. Pass the day after your
            intended last day. Max window 90 days.
          schema:
            type: string
            format: date
            example: '2026-08-28'
        - name: type
          in: query
          required: false
          description: Filter by chargeback type.
          schema:
            type: string
            enum:
              - chargeback
              - alert_chargeback
            example: chargeback
        - name: limit
          in: query
          required: false
          description: Maximum number of records (1 to 5000).
          schema:
            type: integer
            minimum: 1
            maximum: 5000
            default: 1000
            example: 1000
      responses:
        '200':
          description: List of chargebacks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRefundResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/WindowTooLarge'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - apiKey: []
components:
  schemas:
    ListRefundResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Refund'
        meta:
          $ref: '#/components/schemas/DateMeta'
    Refund:
      type: object
      properties:
        refundRequestId:
          type: string
          example: '19119'
        orderId:
          type: integer
          example: 129156
        checkoutId:
          type: string
          example: chk_01a04083-beb7-71fc-b5a6-1b0091157d02
        creatorId:
          type: string
          example: '987'
        affiliateId:
          type: string
          example: '135'
        cardBrand:
          type: string
          example: visa
        refundSource:
          type: string
          example: customer_request
        refundType:
          type: string
          description: >-
            totally_refunded | partially_refunded | chargeback |
            alert_chargeback
          example: chargeback
        refundReason:
          type: string
          example: item_not_received
        isFraud:
          type: boolean
          example: false
        amountRequested:
          type: number
          example: 522
        amountRefundedTotal:
          type: number
          example: 522
        transactionsCount:
          type: integer
          example: 1
        completedCount:
          type: integer
          example: 1
        failedCount:
          type: integer
          example: 0
        cancelReason:
          type: string
          example: ''
        requestedAt:
          type: string
          description: Column used for the from/to filter
          example: '2026-08-25 10:30:00'
        lastTransactionAt:
          type: string
          example: '2026-08-25 11:00:00'
        canceledAt:
          type: string
          example: ''
    DateMeta:
      type: object
      properties:
        count:
          type: integer
          example: 10
        limit:
          type: integer
          example: 1000
        from:
          type: string
          example: '2026-08-24'
        to:
          type: string
          example: '2026-08-25'
        truncated:
          type: boolean
          description: true = hit the limit, there may be more
          example: false
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
              example: from must be before to
            correlation_id:
              type: string
              example: a1b2c3d4-0000-0000-0000-000000000000
  responses:
    BadRequest:
      description: Invalid parameters (malformed dates, from > to)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing, invalid, or revoked key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Insufficient scope or persona not allowed for this resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    WindowTooLarge:
      description: >-
        Date window larger than 90 days, or `from` before the data window
        (2026-08-21).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Rate limit exceeded (see Retry-After header)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Your opaque API key (`pag_...`) sent directly as the Bearer token. There
        is no token/JWT exchange.

````