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

# Get transaction receipts for a specific merchant

> Requires the merchant.transaction.view permission.

Generates receipts for a specific merchant's transaction.
Only accessible by the organization that owns the merchant.
Returns a list of receipts including:
- The original payment receipt (if transaction was approved)
- Refund receipts (one per completed refund with provider identification)

Each receipt includes JSON with account information and a base64-encoded PDF.

**Requirements:**
- Transaction status must be APPROVED, REFUNDED, or PARTIALLY_REFUNDED
- Only PIX payment method transactions are currently supported
- Transaction must have payer information (pix_payer)
- Transaction must have an end-to-end ID for the payment receipt
- Refunds must have provider_refund_identification for refund receipts




## OpenAPI

````yaml /api-spec.yaml get /v1/merchants/{merchantId}/transactions/{transactionId}/receipt
openapi: 3.1.0
info:
  title: Rinne API
  version: 1.0.0
  description: >
    **Rinne API** is a robust payment platform that offers integration with
    multiple payment providers.


    ## Authentication


    The API uses API Key authentication via the `x-api-key` header. Each company
    has a unique key to access resources.


    ## Response Format


    All responses follow a consistent format:

    - **Success**: Returns the requested data directly

    - **Error**: Returns an `error` object with detailed information


    ## Pagination


    Endpoints that return lists support pagination through parameters:

    - `page`: Page number (default: 1)

    - `limit`: Items per page (default: 20, maximum: 100)


    ## Supported Providers


    The API supports multiple payment providers:

    - **Rinne**: Internal provider

    - **Celcoin**: PIX integration and other financial services


    ## Raw Card Data (PCI Endpoints)


    Card credential fields (`card_data.number`, `card_data.cvv`,
    `card_data.network_token`,

    `card_data.cryptogram`, and the 3DS `card.number`) must always be sent
    encrypted —

    values start with the `ev:` prefix. Plaintext values are rejected with

    `400 VALIDATION_ERROR` on every host.


    There are two ways to send encrypted values:

    - **rinne-js**: card forms and wallet buttons (Apple Pay / Google Pay)
    encrypt
      credentials client-side before they leave the browser.
    - **PCI API host**: server-to-server integrations that handle raw card data
    must call
      `https://pci.api.rinne.com.br/core` (sandbox: `https://pci.api-sandbox.rinne.com.br/core`)
      instead of the regular host. This endpoint encrypts `number` and `cvv` in transit
      before the request reaches the API; all other fields pass through unchanged.

    The PCI host serves only transaction creation and 3DS session creation (both
    the

    self and merchant variants); use the regular host for everything else.
  contact:
    name: Rinne API Support
    email: suporte@rinne.com.br
servers:
  - url: https://api-sandbox.rinne.com.br/core
    description: Sandbox
  - url: https://api.rinne.com.br/core
    description: Production
security: []
tags:
  - name: System
    description: System and API health endpoints
  - name: Authentication
    description: User authentication and authorization endpoints
  - name: Management
    description: >-
      Merchant management endpoints - create, list, get specific, overview,
      update
  - name: Transactions
    description: Transaction operations for merchants - create, list, overview, refunds
  - name: Affiliations
    description: Affiliation management for merchants
  - name: Banking
    description: Banking operations for merchants - balance, cashout, statements
  - name: Bank Accounts
    description: Bank account management for merchants
  - name: Pix Keys
    description: PIX key management for merchants
  - name: Company Transactions
    description: Direct transaction management and query endpoints for companies
  - name: Companies
    description: Company management
  - name: Company Affiliations
    description: Payment provider affiliation management
  - name: Company Banking
    description: Company banking endpoints (balance, etc.)
  - name: Company Pix
    description: Company PIX key management
  - name: Company Ledger
    description: Company ledger entry query endpoints
  - name: Ledger
    description: Ledger entry query endpoints (company and merchants)
  - name: Webhooks
    description: Endpoints for receiving webhooks from external providers
  - name: Pricing
    description: Fee and cost policy management for transaction pricing
  - name: Users
    description: User management endpoints
  - name: Roles
    description: Role management endpoints
  - name: Permissions
    description: Permission management endpoints
  - name: Admin
    description: Admin management endpoints
    x-scalar-ignore: true
paths:
  /v1/merchants/{merchantId}/transactions/{transactionId}/receipt:
    get:
      tags:
        - Transactions
      summary: Get transaction receipts for a specific merchant
      description: >
        Requires the merchant.transaction.view permission.


        Generates receipts for a specific merchant's transaction.

        Only accessible by the organization that owns the merchant.

        Returns a list of receipts including:

        - The original payment receipt (if transaction was approved)

        - Refund receipts (one per completed refund with provider
        identification)


        Each receipt includes JSON with account information and a base64-encoded
        PDF.


        **Requirements:**

        - Transaction status must be APPROVED, REFUNDED, or PARTIALLY_REFUNDED

        - Only PIX payment method transactions are currently supported

        - Transaction must have payer information (pix_payer)

        - Transaction must have an end-to-end ID for the payment receipt

        - Refunds must have provider_refund_identification for refund receipts
      parameters:
        - in: path
          name: merchantId
          required: true
          schema:
            type: string
            format: uuid
          description: The merchant ID
        - in: path
          name: transactionId
          required: true
          schema:
            type: string
          description: The transaction ID
          example: tx_123456789
      responses:
        '200':
          description: Receipts generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionReceiptResponse'
        '400':
          description: >
            Receipt not available. Possible reasons:

            - Transaction status is not APPROVED, REFUNDED, or
            PARTIALLY_REFUNDED

            - Payment method is not PIX

            - Transaction is missing payer information

            - Transaction is missing receiver bank account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationErrorResponse'
        '403':
          description: Insufficient permissions to access this resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizationErrorResponse'
        '404':
          description: Merchant or transaction not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TransactionReceiptResponse:
      type: object
      description: Transaction receipts response with list of receipts (payment + refunds)
      required:
        - receipts
      properties:
        receipts:
          type: array
          description: List of receipts for the transaction
          items:
            $ref: '#/components/schemas/TransactionReceiptItem'
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Validation error
            status:
              type: integer
              example: 400
            details:
              type: object
              properties:
                issues:
                  type: array
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                        example: email
                      type:
                        type: string
                        example: REQUIRED
                      message:
                        type: string
                        example: Field 'email' is required
                      value:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                        example: invalid_value
                      constraints:
                        type: object
                        example:
                          min: 18
                          max: 120
            path:
              type: string
              example: /companies
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    AuthenticationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: AUTHENTICATION_ERROR
            message:
              type: string
              example: Authentication required to access this resource
            status:
              type: integer
              example: 401
            details:
              type: object
              properties:
                reason:
                  type: string
                  example: Invalid API key
            path:
              type: string
              example: /companies/me
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    AuthorizationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: AUTHORIZATION_ERROR
            message:
              type: string
              example: You need 'admin' permissions to access this resource
            status:
              type: integer
              example: 403
            path:
              type: string
              example: /companies
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    NotFoundErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: RESOURCE_NOT_FOUND
            message:
              type: string
              example: Company with ID '123' not found
            status:
              type: integer
              example: 404
            path:
              type: string
              example: /companies/me
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    InternalServerErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: INTERNAL_SERVER_ERROR
            message:
              type: string
              example: An unexpected error occurred
            status:
              type: integer
              example: 500
            path:
              type: string
              example: /companies
            timestamp:
              type: string
              format: date-time
              example: '2023-12-01T10:00:00.000Z'
            requestId:
              type: string
              example: req_123456789
    TransactionReceiptItem:
      type: object
      description: >
        Individual receipt item for a transaction (payment or refund).

        Discriminated by payment_method:

        - PIX: both payer and receiver are populated; card_data is null.

        - CARD PAYMENT: payer is null, receiver is the merchant settlement
        account; card_data is populated.

        - CARD REFUND: payer is the merchant settlement account, receiver is
        null; card_data is populated.
      required:
        - type
        - payment_method
        - transaction_id
        - refund_id
        - amount
        - currency
        - identification
        - created_at
        - payer
        - receiver
        - card_data
        - pdf_file_base64
      properties:
        type:
          type: string
          enum:
            - PAYMENT
            - REFUND
          description: |
            Type of receipt:
            - PAYMENT: Receipt for the original transaction payment
            - REFUND: Receipt for a refund operation
          example: PAYMENT
        payment_method:
          type: string
          enum:
            - PIX
            - CREDIT_CARD
            - DEBIT_CARD
          description: >-
            Payment method of the underlying transaction. BOLEPIX is not yet
            supported for receipts.
          example: PIX
        transaction_id:
          type: string
          description: Transaction ID
          example: 123e4567-e89b-12d3-a456-426614174000
        refund_id:
          type:
            - string
            - 'null'
          description: Refund ID (null for PAYMENT type)
          example: null
        amount:
          type: integer
          description: Amount in cents
          example: 5000
        currency:
          type: string
          enum:
            - BRL
          description: Currency code
          example: BRL
        identification:
          type: string
          description: >
            Acquirer-provided identifier for the receipt:

            - PIX receipts: end-to-end ID (PAYMENT) or provider refund
            identification (REFUND)

            - Card PAYMENT receipts: NSU

            - Card REFUND receipts: provider refund identification
          example: E13935893202601271529YV9B1m6o2Ih
        created_at:
          type: string
          format: date-time
          description: Receipt creation timestamp
          example: '2026-01-27T12:29:21.000Z'
        payer:
          anyOf:
            - allOf:
                - $ref: '#/components/schemas/ReceiptBankAccount'
            - type: 'null'
          description: >-
            Payer account information. Null for card PAYMENT receipts
            (cardholder is not a bank account).
        receiver:
          anyOf:
            - allOf:
                - $ref: '#/components/schemas/ReceiptAccount'
            - type: 'null'
          description: >-
            Receiver account information. Null for card REFUND receipts
            (cardholder is not a bank account).
        card_data:
          anyOf:
            - allOf:
                - $ref: '#/components/schemas/ReceiptCardData'
            - type: 'null'
          description: >-
            Card-specific data. Populated for card receipts, null for PIX
            receipts.
        pdf_file_base64:
          type: string
          description: Base64-encoded PDF receipt
          example: JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwo...
    ReceiptBankAccount:
      type: object
      description: Bank account information for receipts
      required:
        - name
        - document
        - bank_name
        - ispb
        - branch
        - account
      properties:
        name:
          type: string
          description: Account holder name
          example: WALTER NOBRE DA SILVA CONCEICAO
        document:
          type: string
          description: Account holder document (CPF may be masked, CNPJ shown in full)
          example: XXX.588.782-XX
        bank_name:
          type: string
          description: Bank name
          example: BCO SANTANDER (BRASIL) S.A.
        ispb:
          type: string
          description: Bank ISPB code
          example: '90400888'
        branch:
          type: string
          description: Branch number
          example: '2305'
        account:
          type: string
          description: Account number
          example: '010227424'
    ReceiptAccount:
      type: object
      description: >-
        Account information for receipts. At least one of bank_account or
        pix_data must be provided.
      properties:
        bank_account:
          $ref: '#/components/schemas/ReceiptBankAccount'
        pix_data:
          $ref: '#/components/schemas/ReceiptPixData'
    ReceiptCardData:
      type: object
      description: Card-specific fields exposed on card transaction receipts.
      required:
        - brand
        - last_digits
        - cardholder_name
        - installments
        - authorization_code
        - nsu
        - capture_method
        - wallet_type
      properties:
        brand:
          type:
            - string
            - 'null'
          description: Card brand (e.g., VISA, MASTERCARD)
          example: VISA
        last_digits:
          type: string
          description: Last 4 digits of the card
          example: '1234'
        cardholder_name:
          type:
            - string
            - 'null'
          description: Cardholder name when available
          example: JOAO DA SILVA
        installments:
          type: integer
          description: Number of installments (1 means no installments)
          example: 1
        authorization_code:
          type:
            - string
            - 'null'
          description: Acquirer authorization code
          example: '123456'
        nsu:
          type: string
          description: NSU assigned by the acquirer
          example: '000123456'
        capture_method:
          type: string
          enum:
            - EMV
            - MAGSTRIPE
            - ECOMMERCE
            - CONTACTLESS_ICC
          description: Capture method used for the transaction
          example: ECOMMERCE
        wallet_type:
          type:
            - string
            - 'null'
          enum:
            - APPLE_PAY
            - GOOGLE_PAY
          description: Wallet type when the card was tokenized via a wallet
          example: null
    ReceiptPixData:
      type: object
      description: PIX key information for receipts
      required:
        - key
        - type
      properties:
        key:
          type: string
          description: PIX key value
          example: '12345678901'
        type:
          type: string
          enum:
            - CPF
            - CNPJ
            - EMAIL
            - PHONE
            - EVP
          description: PIX key type
          example: CPF
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Company API key for authentication

````