# Pobieranie faktur prowizyjnych submerchanta

Endpoint: GET /flow/{flowServiceId}/submerchants/{submerchantId}/finances/invoices
Version: 1.0.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer scopes: flow.submerchants.finances, flow.submerchants.finances.invoices

## Path parameters:

  - `flowServiceId` (string, required)
    ID usługi Flow

  - `submerchantId` (string, required)
    ID submerchanta (`flsm_...`) lub jego `customId`

## Query parameters:

  - `page` (integer)
    Numer strony (15 rekordów na stronę)

## Response 200 fields (application/json):

  - `success` (boolean, required)
    Request status

  - `data` (array, required)

  - `data.period` (string)
    Okres rozliczeniowy (MM/RRRR)
    Example: 09/2026

  - `data.year` (integer)
    Example: 2026

  - `data.month` (integer)
    Example: 9

  - `data.totalTransactions` (number)
    Suma transakcji w okresie

  - `data.totalCommission` (number)
    Suma prowizji w okresie

  - `data.invoiceUrl` (string)
    Adres URL faktury

  - `data.currencyRate` (number)
    Kurs waluty

  - `data.createdAt` (string)
    Data utworzenia w formacie: ISO 8601

  - `data.wallet` (object)

  - `data.wallet.id` (string)

  - `data.wallet.type` (object)

  - `data.wallet.type.id` (string)
    Example: payment

  - `data.wallet.type.name` (string)

  - `data.wallet.currencyCode` (string)
    Example: PLN

  - `pagination` (object, required)

  - `pagination.total` (integer, required)
    Liczba wszystkich rekordów
    Example: 1

  - `pagination.count` (integer, required)
    Liczba rekordów na danej stronie
    Example: 1

  - `pagination.per_page` (integer, required)
    Maksymalna ilość rekordów na strone
    Example: 15

  - `pagination.current_page` (integer, required)
    Aktualna strona
    Example: 1

  - `pagination.total_pages` (integer, required)
    Ilość stron
    Example: 1

  - `pagination.links` (object, required)
    Adresy URL do stron

  - `pagination.links.next_page` (string, required)
    Adres URL do następnej strony
    Example: null

  - `pagination.links.prev_page` (string, required)
    Adres URL do poprzedniej strony
    Example: null

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `feedbackUrl` (string)
    Adres do zgłaszania problemów z API (`POST /feedback`). Zwracany dla uwierzytelnionych kluczy API.
    Example: https://api.simpay.pl/feedback

  - `success` (boolean, required)
    Request status

  - `errorCode` (string, required)
    Error status code
    Enum: "UNAUTHORIZED"

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `feedbackUrl` (string)
    Adres do zgłaszania problemów z API (`POST /feedback`). Zwracany dla uwierzytelnionych kluczy API.
    Example: https://api.simpay.pl/feedback

  - `success` (boolean, required)
    Request status

  - `errorCode` (string, required)
    Error status code
    Enum: "INVALID_ABILITY_PROVIDED", "IP_ADDRESS_NOT_WHITELISTED"

## Response 404:

  - `404` (unknown)
    Nie znaleziono submerchanta (`FLOW_SUBMERCHANT_NOT_FOUND`)

## Response 404 fields (application/json):

  - `success` (boolean, required)
    Request status

  - `message` (string)
    Opis błędu

  - `errorCode` (string, required)
    Kod błędu

