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

# Export payments as CSV

> Returns every payment and refund that matches the payments list filters as one RFC 4180 CSV file with a header row, newest first unless `sort` says otherwise. Columns, in order: id, type, checkoutType, status, amount, currencyCode, checkoutSessionId, refundedPaymentId, refundId, orderId, merchantReference, payerBankName, isRefundable, initiatedAt, completedAt, createdAt. `amount` is a decimal string in the currency's major unit, timestamps are ISO 8601 UTC, and a `null` field is an empty cell. Exports at most 10000 rows: returns 422, and no file, when more records match, so narrow the date range and export again.



## OpenAPI

````yaml /autogenerated/openapi/roqqett.openapi.json get /roqqett/payments/export
openapi: 3.1.0
info:
  title: Roqqett API
  version: 2.0.0
  description: Version 2
  license:
    name: UNLICENSED
    url: https://docs.equalsmoney.com
servers:
  - url: https://api.equalsmoney.com/v2
    description: Production
security: []
paths:
  /roqqett/payments/export:
    get:
      tags:
        - Payments
      summary: Export payments as CSV
      description: >-
        Returns every payment and refund that matches the payments list filters
        as one RFC 4180 CSV file with a header row, newest first unless `sort`
        says otherwise. Columns, in order: id, type, checkoutType, status,
        amount, currencyCode, checkoutSessionId, refundedPaymentId, refundId,
        orderId, merchantReference, payerBankName, isRefundable, initiatedAt,
        completedAt, createdAt. `amount` is a decimal string in the currency's
        major unit, timestamps are ISO 8601 UTC, and a `null` field is an empty
        cell. Exports at most 10000 rows: returns 422, and no file, when more
        records match, so narrow the date range and export again.
      operationId: exportPayments
      parameters:
        - name: accountId
          in: query
          schema:
            description: The ID of the account to work with.
            type:
              - string
            example: F50091
          required: true
        - name: startDate
          in: query
          schema:
            description: Only records created on or after this date.
            type:
              - string
            example: '2026-09-01'
        - name: endDate
          in: query
          schema:
            description: Only records created on or before this date.
            type:
              - string
            example: '2026-09-30'
        - name: type
          in: query
          schema:
            description: PAYMENT moves money from the payer; REFUND moves it back.
            type:
              - string
            enum:
              - PAYMENT
              - REFUND
            example: PAYMENT
        - name: checkoutType
          in: query
          schema:
            description: >-
              SHOPPING pays for a basket into the merchant's settlement account.
              TOP_UP pays into a payee the merchant supplies.
            type:
              - string
            enum:
              - SHOPPING
              - TOP_UP
            example: SHOPPING
        - name: status
          in: query
          schema:
            description: PENDING from initiation until the bank confirms the outcome.
            type:
              - string
            enum:
              - PENDING
              - COMPLETED
              - FAILED
              - CANCELLED
            example: COMPLETED
        - name: checkoutSessionId
          in: query
          schema:
            type:
              - string
            format: uuid
            maxLength: 36
            description: 'The ID of a checkout session: one payment journey.'
            example: 0b8e5c3a-2f1d-4c6b-8a9e-7d4f2c1b0a93
        - name: merchantReference
          in: query
          schema:
            description: >-
              The merchant's own reference for this checkout session, such as
              its order or basket ID. Shown to the merchant, never to the
              payer's bank.
            type:
              - string
            minLength: 1
            maxLength: 128
            example: ORDER-10421
        - name: refundedPaymentId
          in: query
          schema:
            description: Only the refunds of this payment.
            type:
              - string
            format: uuid
            maxLength: 36
            example: 9c4e1a7b-3d2f-4b6a-8e5c-0f7d2a9b1c34
        - name: sort
          in: query
          schema:
            description: 'Order by `createdAt`: `desc` is newest first.'
            default: desc
            type:
              - string
            enum:
              - asc
              - desc
      responses:
        '200':
          description: OK
          content:
            text/csv:
              schema:
                type:
                  - string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  message:
                    type:
                      - string
                    maxLength: 1024
                    description: Human-readable error description.
                    example: Checkout session not found.
                  errors:
                    type:
                      - array
                    items:
                      type:
                        - object
                      properties:
                        path:
                          type:
                            - string
                          description: The location of the bad parameter.
                        message:
                          type:
                            - string
                          description: Description of why the validation failed.
                        errorCode:
                          type:
                            - string
                          description: Where the error occurred.
                      required:
                        - path
                        - message
                      description: An object containing details about one particular error.
                required:
                  - message
                  - errors
                example:
                  message: Checkout session not found.
                  errors:
                    - path: string
                      message: string
                      errorCode: string
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  message:
                    type:
                      - string
                    maxLength: 1024
                    description: Human-readable error description.
                    example: Checkout session not found.
                  errors:
                    type:
                      - array
                    items:
                      type:
                        - object
                      properties:
                        path:
                          type:
                            - string
                          description: The location of the bad parameter.
                        message:
                          type:
                            - string
                          description: Description of why the validation failed.
                        errorCode:
                          type:
                            - string
                          description: Where the error occurred.
                      required:
                        - path
                        - message
                      description: An object containing details about one particular error.
                required:
                  - message
                  - errors
                example:
                  message: Checkout session not found.
                  errors:
                    - path: string
                      message: string
                      errorCode: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  message:
                    type:
                      - string
                    maxLength: 1024
                    description: Human-readable error description.
                    example: Checkout session not found.
                  errors:
                    type:
                      - array
                    items:
                      type:
                        - object
                      properties:
                        path:
                          type:
                            - string
                          description: The location of the bad parameter.
                        message:
                          type:
                            - string
                          description: Description of why the validation failed.
                        errorCode:
                          type:
                            - string
                          description: Where the error occurred.
                      required:
                        - path
                        - message
                      description: An object containing details about one particular error.
                required:
                  - message
                  - errors
                example:
                  message: Checkout session not found.
                  errors:
                    - path: string
                      message: string
                      errorCode: string
        '422':
          description: Unable to process the request
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  message:
                    type:
                      - string
                    maxLength: 1024
                    description: Human-readable error description.
                    example: Checkout session not found.
                  errors:
                    type:
                      - array
                    items:
                      type:
                        - object
                      properties:
                        path:
                          type:
                            - string
                          description: The location of the bad parameter.
                        message:
                          type:
                            - string
                          description: Description of why the validation failed.
                        errorCode:
                          type:
                            - string
                          description: Where the error occurred.
                      required:
                        - path
                        - message
                      description: An object containing details about one particular error.
                required:
                  - message
                  - errors
                example:
                  message: Checkout session not found.
                  errors:
                    - path: string
                      message: string
                      errorCode: string
      security:
        - CommonAuth:
            - roqqett:transactions:read:any
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.equalsmoney.com/v2/roqqett/payments/export?accountId={{accountId}}' \
              --header 'Authorization: <api-key>'
components:
  securitySchemes:
    CommonAuth:
      type: apiKey
      in: header
      name: Authorization

````