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

# Download Statement PDF

> Download a statement as raw PDF stream or base64-encoded JSON. Use ?format=base64 for JSON delivery.



## OpenAPI

````yaml GET /api/partner/merchants/{merchant_id}/statements/{statement_id}/pdf
openapi: 3.0.3
info:
  title: Partner API
  description: External API for ISO partners to access merchant data, pricing, and reports
  version: 0.1.0
servers: []
security: []
paths:
  /api/partner/merchants/{merchant_id}/statements/{statement_id}/pdf:
    get:
      tags:
        - Statements
        - Statements
      summary: Download statement PDF
      description: >-
        Download a statement as raw PDF stream or base64-encoded JSON. Use
        ?format=base64 for JSON delivery.
      operationId: >-
        get_statement_pdf_api_partner_merchants__merchant_id__statements__statement_id__pdf_get
      parameters:
        - name: merchant_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 50
            description: Merchant ID
            title: Merchant Id
          description: Merchant ID
          example: '1234567890'
        - name: statement_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
            description: Statement ID
            title: Statement Id
          description: Statement ID
        - name: format
          in: query
          required: false
          schema:
            type: string
            pattern: ^(stream|base64)$
            description: 'Delivery format: stream (raw PDF) or base64 (JSON envelope)'
            default: stream
            title: Format
            nullable: true
          description: 'Delivery format: stream (raw PDF) or base64 (JSON envelope)'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '401':
          description: Missing or invalid API key
        '403':
          description: Merchant not in portfolio or insufficient scope
        '404':
          description: Statement PDF not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
        '503':
          description: Statement PDF source unavailable
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````