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

# Download Account Statement

> Returns a PDF statement of one distribution account for a period: the payments the account sent and received on the Stellar ledger, per asset, with opening and closing balances. The statement is built from the account's most recent 10,000 ledger payments (any asset, counting back from now), so a period that reaches further back is refused.




## OpenAPI

````yaml openapi/stellar-disbursement-platform/bundled.yaml GET /reports/statement
openapi: 3.1.0
info:
  title: Stellar Disbursement Platform API
  version: 7.1.0
  summary: >-
    The Stellar Disbursement Platform (SDP) is a tool built for organizations to
    make bulk payments to a group of recipients over the Stellar network.
  description: >
    The Stellar Disbursement Platform (SDP) is a tool built for organizations to
    make bulk payments to a group of recipients over the Stellar network.


    This is an open-source project that is built on top of the Stellar network,
    and the code can be found on the following repositories:


    -
    [stellar/stellar-disbursement-platform-backend](https://github.com/stellar/stellar-disbursement-platform-backend):
    This repository contains the backend and infrastructure code for the Stellar
    Disbursement Platform.

    -
    [stellar/stellar-disbursement-platform-frontend](https://github.com/stellar/stellar-disbursement-platform-frontend):
    This repository contains the web frontend code for the Stellar Disbursement
    Platform.

    -
    [stellar/helm-charts](https://github.com/stellar/helm-charts/tree/main/charts/stellar-disbursement-platform):
    This repository contains the Helm chart for deploying the Stellar
    Disbursement Platform using Kubernetes.
  termsOfService: https://stellar.org/terms-of-service
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: ''
security: []
tags:
  - name: Admin
    x-displayName: Admin (Tenant Management)
    description: >-
      The Admin API oversees the management of tenants within the system,
      facilitating tasks such as provisioning new tenants, updating their
      information, and retrieving tenant data.
  - name: Authentication
    description: >-
      Authentication controls the log in/log out process for all SDP users, as
      well as the token refresh process. Authentication uses a JWT approach
      signed with an ES256 private key.
  - name: API Keys
    description: >-
      API Keys functionality allows to create access key with granular
      permissions and resource management.
  - name: Balances
    description: >-
      Endpoints related to balances. A balance is an amount of a particular
      asset held by an organization, tenant, or account.
  - name: Bridge Integration
    description: >
      Bridge integration endpoints for connecting organizations with Bridge
      services.


      **Integration Flow:**

      1. Organization opts into Bridge (OPTED_IN status)

      2. Complete KYC verification process via Bridge

      3. Create virtual account for USD deposits (READY_FOR_DEPOSIT status)

      4. Receive USD deposits that are automatically converted to USDC on
      Stellar


      **Status Description:**

      - NOT_ENABLED → Bridge service not configured

      - NOT_OPTED_IN → Organization hasn't opted in

      - OPTED_IN → Organization opted in, KYC link created

      - READY_FOR_DEPOSIT → Virtual account created, ready for deposits

      - ERROR → Integration error occurred
  - name: Disbursements
    description: >-
      Endpoints related to disbursements. A disbursement is a group of payments
      sent to multiple individuals at once. An SDP user with the appropriate
      role triggers a new disbursement through the SDP dashboard by uploading a
      list of receivers and amounts. When the receiver has linked their wallet
      to the SDP, the payment automatically begins. SDP users can track their
      disbursements in real-time through the SDP dashboard. Each disbursement
      must have a unique name defined by the organization.
  - name: Distribution Wallets
    description: >
      Endpoints related to distribution accounts (the Stellar accounts a tenant
      sends funds from). A tenant starts with a single account, created when the
      tenant is provisioned, which is marked as the default. Tenants using the
      `DISTRIBUTION_ACCOUNT.STELLAR.DB_VAULT` account type can hold up to 20,
      and Owners can add more at any time.


      Access to an account is granted per user and is separate from the user's
      role: both are required to act on an account. API keys need the
      `read:distribution_wallets` or `write:distribution_wallets` permission,
      and the Owner-only operations additionally require that the key was
      created by an Owner, so permissions alone are not sufficient. Accounts are
      archived rather than deleted, so past disbursements and payments keep
      pointing at the account that sent them.
  - name: Organization
    description: >-
      Organization endpoints manage the process of getting and updating
      organizational profile information. The organization's profile has basic
      information set at the time of SDP deployment. It can be modified by the
      Owner. Organizations can also manage their preferences, like which assets
      to use, through these endpoints.
  - name: Payments
    description: >-
      Endpoints related to payments. An SDP payment is an individual payment
      from an organization to a receiver. Each payment is part of a disbursement
      and occurs on the Stellar network. Granular payment status is stored in
      the SDP database and can be viewed in real-time on the SDP dashboard.
  - name: Profile
    description: >-
      Profiles endpoints manage the process of getting and updating individual
      profile information. Profile information is set when the account is
      created and can be updated by the user on the SDP dashboard Profile page.
      Note: profiles never refer to receivers of funds.
  - name: Receivers
    description: >
      Endpoints related to receivers. A receiver is an individual receiving a
      payment in a disbursement. The receiver is tracked by phone number to
      reduce the need for personally identifiable information. Each receiver
      must be unique within the disbursement.


      Each receiver will have at least one wallet associated with them. The
      wallet public key will remain null until the receiver registers with a
      wallet provider and links the wallet to the SDP through SEP-24. Receivers
      must verify their identity through that process, which requires the SDP to
      store verification information on receivers like date of birth, national
      ID number, or personal PIN. This information can be updated by the
      organization through the receiver endpoints.
  - name: Registration
    description: >
      The registration endpoints guide the process for a receiver to verify
      their identity and link their wallet address to an SDP. The registration
      process only needs to happen once per receiver to link their wallet. Only
      SDP-compatible wallet providers can facilitate the registration process.
      These endpoints must be supported and hit by the wallet providers after
      the receiver gets the initial invite. After the wallet address is
      successfully linked, the payment automatically begins.


      There are two parts to the registration flow. First, the wallet must
      authenticate and initiate a registration flow using the Anchor Platform
      Endpoints defined below. Note that these endpoints are hosted on a
      different host than the Stellar Disursement Platform.


      The second part of the registration flow is handled by the webview that is
      opened within the wallet application. This webview uses the endpoints
      defined in the Stellar Disbursement Platfrom Endpoints section to complete
      the registration process. The wallet application can chose not to use the
      webview and intstead integrate directly with the API.
  - name: Reports
    description: >-
      Reports endpoints return PDF reports: a per-distribution account statement
      and a per-payment transaction notice. Available only while reporting is
      enabled in the organization settings.
  - name: Statistics
    description: >-
      Statistics endpoints return general aggregated data per organization, as
      well as disbursement-specific metrics. SDP users can use this data to
      monitor their disbursements over time.
  - name: Users
    description: >-
      The users endpoints facilitate the creation of new SDP users - including
      setting the appropriate role, sending an email invitation, and activating
      a user - and managing roles.
paths:
  /reports/statement:
    get:
      tags:
        - Reports
      summary: Download Account Statement
      description: >
        Returns a PDF statement of one distribution account for a period: the
        payments the account sent and received on the Stellar ledger, per asset,
        with opening and closing balances. The statement is built from the
        account's most recent 10,000 ledger payments (any asset, counting back
        from now), so a period that reaches further back is refused.
      operationId: GetAccountStatement
      parameters:
        - $ref: '#/components/parameters/XWalletIdStatementAccount'
        - name: from_date
          in: query
          required: true
          description: First day of the period, `YYYY-MM-DD`, UTC.
          schema:
            type: string
            format: date
        - name: to_date
          in: query
          required: true
          description: >-
            Last day of the period, inclusive (to 23:59:59 UTC). Must not be
            before `from_date`.
          schema:
            type: string
            format: date
        - name: asset_code
          in: query
          required: false
          description: >-
            Asset to report on, matched case-sensitively against the tenant's
            active assets; `XLM` or `NATIVE` selects the native asset. Omit it
            to cover every asset the account currently holds.
          schema:
            type: string
      responses:
        '200':
          description: The statement PDF.
          headers:
            Content-Disposition:
              description: >-
                `attachment;
                filename=statement_<account>_<YYYYMMDD>-<YYYYMMDD>.pdf`.
                `<account>` is the account name in lower case, with each run of
                characters other than a-z and 0-9 replaced by `-`, e.g.
                `statement_main_20261001-20261031.pdf`.
              schema:
                type: string
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          description: >-
            Bad Request: the query is invalid, no account was selected, the
            account can't have a statement, or the period reaches past the
            account's most recent 10,000 ledger payments.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Why the request was refused.
                  extras:
                    type: object
                    description: >-
                      Only with `invalid query parameters`. One entry per
                      invalid parameter.
                    properties:
                      from_date:
                        type: string
                        description: Missing, not `YYYY-MM-DD`, or after `to_date`.
                      to_date:
                        type: string
                        description: Missing, or not `YYYY-MM-DD`.
              examples:
                InvalidQuery:
                  summary: Invalid query parameters
                  value:
                    error: invalid query parameters
                    extras:
                      from_date: from_date must be before or equal to to_date
                NoAccountSelected:
                  summary: X-Wallet-Id needed
                  value:
                    error: select a distribution account with the X-Wallet-Id header
                NotStellarAccount:
                  summary: Circle account
                  value:
                    error: >-
                      Statement is only supported for Stellar distribution
                      accounts
                SharedHostAccount:
                  summary: Tenant on the shared host account
                  value:
                    error: >-
                      Statements are not available for tenants on the shared
                      host distribution account
                AccountNotProvisioned:
                  summary: Account not provisioned yet
                  value:
                    error: The distribution account has not been provisioned yet
                PeriodTooLong:
                  summary: Period holds too many payments
                  value:
                    error: >-
                      This period has too many ledger payments for one
                      statement; choose a shorter period
                PeriodTooOld:
                  summary: Too many payments since the period
                  value:
                    error: >-
                      The account has made too many ledger payments since this
                      period for a statement this far back
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          description: >-
            Forbidden: reporting is disabled for the organization, the user's
            role is not allowed, the API key lacks `read:reports`, or the key is
            used from an IP address it doesn't allow.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                ReportsDisabled:
                  summary: Reporting is disabled
                  value:
                    error: reports are not enabled for this organization
                RoleNotAllowed:
                  $ref: '#/components/examples/RoleNotAllowed'
                InsufficientAPIKeyPermissions:
                  $ref: '#/components/examples/InsufficientAPIKeyPermissions'
                IPNotAllowed:
                  $ref: '#/components/examples/IPNotAllowed'
        '404':
          description: >-
            Not Found: the `X-Wallet-Id` account is unknown or outside the
            caller's access, or `asset_code` is unknown, retired, or not held by
            the account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                WalletNotFound:
                  summary: Account unknown or out of reach
                  value:
                    error: distribution wallet not found
                AssetNotFound:
                  summary: Asset not held
                  value:
                    error: asset not found for account
      security:
        - BearerAuth: []
components:
  parameters:
    XWalletIdStatementAccount:
      name: X-Wallet-Id
      in: header
      required: false
      description: >
        Names the distribution account the statement covers. Archived accounts
        can be named. Can be omitted only when the caller can reach exactly one
        account (archived ones count).
      schema:
        type: string
  responses:
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              extras:
                type: object
                properties:
                  status:
                    type: number
                  message:
                    type: string
          example:
            error: Not authorized
            extras:
              status: 401
              message: Not authorized
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Why the request failed.
  examples:
    RoleNotAllowed:
      summary: Role not allowed
      value:
        error: You don't have permission to perform this action.
    InsufficientAPIKeyPermissions:
      summary: API key without the required permission
      value:
        error: Insufficient API key permissions
    IPNotAllowed:
      summary: API key used from an IP it doesn't allow
      value:
        error: IP not allowed
  securitySchemes:
    BearerAuth:
      type: apiKey
      description: Authorization header containing an SDP JWT (ES256) or an SDP_ API key.
      name: Authorization
      in: header

````