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

# Zahlungsnachweis für Rückerstattungen herunterladen

Laden Sie ein Zahlungsnachweis-Dokument (Proof of Payment, POP) für eine oder mehrere abgeschlossene Rückerstattungstransaktionen herunter.

Senden Sie ein Array mit `internalId`- oder `externalId`-Werten für Rückerstattungstransaktionen mit dem Status `Completed`. Die Antwort ist ein base64-codiertes ZIP-Archiv, das pro angeforderter Transaktion einen Zahlungsnachweis im PDF-Format enthält.

> [!NOTE]
>
> Sie können `internalId`- und `externalId`-Werte im selben Array der Anfrage kombinieren.


## OpenAPI

````yaml openapi/de/localpayment.json POST /api/v1/refunds/proof-of-payment
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/v1/refunds/proof-of-payment:
    post:
      summary: Zahlungsnachweis einer Rückerstattung herunterladen
      operationId: download-refund-proof-of-payment
      parameters:
        - name: Authorization
          in: header
          description: >-
            Bearer-Zugriffstoken zur Authentifizierung. Dieses Token erhalten
            Sie über die Endpunkte [Zugriffstoken
            abrufen](/de/reference/get-token) oder [Zugriffstoken
            aktualisieren](/de/reference/refresh-token).
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: >-
                Liste der Transaktionskennungen, für die Zahlungsnachweise
                erstellt werden sollen. Akzeptiert `internalId`- oder
                `externalId`-Werte, auch gemischt in derselben Anfrage. Jede
                Transaktion muss den Status `Completed` haben.
              items:
                type: string
              example:
                - 550e8400-e29b-41d4-a716-446655440000
                - f47ac10b-58cc-4372-a567-0e02b2c3d479
              x-examples:
                Example 1:
                  - 550e8400-e29b-41d4-a716-446655440000
                  - f47ac10b-58cc-4372-a567-0e02b2c3d479
            examples:
              Example 1 - Two internalId/externalId values:
                value:
                  - 550e8400-e29b-41d4-a716-446655440000
                  - f47ac10b-58cc-4372-a567-0e02b2c3d479
        required: true
      responses:
        '200':
          description: >-
            OK. Der Antworttext ist das ZIP-Archiv selbst, Base64-codiert als
            Klartext (nicht in ein JSON-Feld eingebettet), mit einem
            PDF-Zahlungsnachweis pro angeforderter Transaktion. Anhand eines
            echten Mitschnitts bestätigt: Die decodierten Bytes beginnen mit der
            ZIP-Dateisignatur (`PK\x03\x04`).
          content:
            application/json:
              schema:
                type: string
                format: byte
                description: >-
                  Base64-codiertes ZIP-Archiv mit den angeforderten PDF-Dateien
                  der Zahlungsnachweise. Decodieren Sie diese Zeichenfolge
                  direkt, um die ZIP-Datei zu erhalten; es gibt kein umgebendes
                  JSON-Objekt.
              examples:
                Example 1 - Base64-encoded ZIP (truncated):
                  value: UEsFBgAAAAAAAAAAAAAAAAAAAAAAAA==
        '401':
          description: >-
            Nicht autorisiert. Das Zugriffstoken fehlt, ist ungültig oder
            abgelaufen.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Zusätzliche Informationen zur Antwort.
                  code:
                    type: string
                    description: Statuscode.
                  messages:
                    type: array
                    description: Liste der Meldungen.
                    items:
                      type: object
                      properties:
                        token_class:
                          type: string
                          description: Token-Klasse.
                        token_type:
                          type: string
                          description: Token-Typ.
                        message:
                          type: string
                          description: Meldung mit zusätzlichen Informationen.
                x-examples:
                  Example 1:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
              examples:
                token_not_valid - Token invalid or expired:
                  value:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
        '403':
          description: >-
            Verboten. Zahlungsnachweise sind nur für Transaktionen im Status
            `Completed` verfügbar.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Fehlercode.
                  message:
                    type: string
                    description: Verständliche Fehlermeldung.
                  invalid_transactions:
                    type: array
                    description: >-
                      Transaktionen, die sich nicht in einem gültigen Status für
                      Zahlungsnachweise befinden.
                    items:
                      type: object
                      properties:
                        transaction_id:
                          type: string
                          description: >-
                            internalId oder externalId der ungültigen
                            Transaktion.
                        current_status:
                          type: string
                          description: Aktueller Status der Transaktion.
                x-examples:
                  Example 1:
                    error: INVALID_STATUS
                    message: >-
                      Proof of Payment is only available for Completed
                      transactions
                    invalid_transactions:
                      - transaction_id: 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                        current_status: Cancelled
              examples:
                INVALID_STATUS - Transaction not Completed:
                  value:
                    error: INVALID_STATUS
                    message: >-
                      Proof of Payment is only available for Completed
                      transactions
                    invalid_transactions:
                      - transaction_id: 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                        current_status: Cancelled
        '404':
          description: >-
            Nicht gefunden. Keine der angeforderten Transaktionskennungen
            befindet sich in einem Status, für den
            Zahlungsnachweis-Informationen verfügbar sind.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: integer
                    description: HTTP-Statuscode.
                  Code:
                    type: string
                    nullable: true
                    description: Interner Fehlercode, falls vorhanden.
                  Message:
                    type: string
                    description: Verständliche Fehlermeldung.
                  TraceId:
                    type: string
                    description: Trace-Kennung für Supportzwecke.
                x-examples:
                  Example 1:
                    Status: 404
                    Code: null
                    Message: There is no payments information to generate the file
                    TraceId: 6a907fb4000000001f723f645b1fdee3
              examples:
                404 - No payment information:
                  value:
                    Status: 404
                    Code: null
                    Message: There is no payments information to generate the file
                    TraceId: 6a907fb4000000001f723f645b1fdee3
      security:
        - token: []
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.