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

# Show Card Purchase Document by End to End ID

> Show card purchase document by end to end id



## OpenAPI

````yaml v2/api-reference/openapi.json GET /v2/cards/purchases/e2e/{id}
openapi: 3.0.0
info:
  title: Trio API v2
  version: 2026-10-19.v2
servers:
  - url: https://api.sandbox.trio.com.br
    variables: {}
  - url: https://api.qa.trio.com.br
    variables: {}
  - url: https://api.trio.com.br
    variables: {}
security: []
tags: []
paths:
  /v2/cards/purchases/e2e/{id}:
    parameters:
      - description: >-
          Version of the v2 contract the client is written against. Each
          breaking change publishes a new version.
        example: 2026-10-19.v2
        in: header
        name: Trio-Version
        required: true
        schema:
          enum:
            - 2026-10-19.v2
          type: string
          x-struct: null
          x-validate: null
      - description: >-
          ID of another org to act on instead of the API key's own org. The
          key's org must have been granted access to it, and the request is
          refused with 403 FORBIDDEN otherwise. When that access or the API key
          is read-only, only GET and HEAD requests may carry it. When the target
          org requires mTLS, so does the request. Leave it out to act on the
          key's own org.
        in: header
        name: Trio-Target-Org-Id
        required: false
        schema:
          format: uuid
          type: string
          x-struct: null
          x-validate: null
    get:
      tags:
        - Cards
      summary: Show card purchase document by end to end id
      description: 'Show card purchase document by end to end id '
      operationId: TrioFoundationWeb.V2.Card.PurchaseController.show_by_end_to_end_id
      parameters:
        - description: End to End ID
          in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/V2_card_purchase_end_to_end_id'
        - description: When the purchase was made, its `purchased_at`
          in: query
          name: timestamp
          required: true
          schema:
            $ref: '#/components/schemas/DATETIME'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_card_purchase_response'
          description: Document
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            Malformed request: a body that is not valid JSON
            (MALFORMED_REQUEST), or a Trio-Version header that is missing or not
            the current one (INVALID_TRIO_VERSION).
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: Missing or invalid API key credentials (INVALID_CREDENTIALS).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            The API key may not do this (FORBIDDEN): for instance
            Trio-Target-Org-Id names an org it has no access to, or writes
            through a read-only access.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: No resource with this ID (NOT_FOUND_RESOURCE).
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            Invalid input (INVALID_PARAMETER, REQUIRED_PARAMETER, or the code of
            the rule the request breaks). A request outside the operation's
            schema lists the offending fields in `errors`.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2_error'
          description: >-
            A service needed to answer is unavailable
            (TRIO_SERVICE_UNAVAILABLE).
      callbacks: {}
      security:
        - authorization: []
components:
  schemas:
    V2_card_purchase_end_to_end_id:
      description: End to end ID of the card purchase
      example: EE202506111406IVIN5pXVoyp
      title: V2 card purchase end to end id
      type: string
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Card.Purchase.EndToEndId
      x-validate: null
    DATETIME:
      description: Datetime schema
      format: date-time
      title: DATETIME
      type: string
      x-struct: null
      x-validate: null
    V2_card_purchase_response:
      description: A card purchase with its stages
      example:
        data:
          amount:
            amount: 10000
            currency: BRL
          card_id: 01978eea-1d48-9176-e7f6-2ff0992c1b58
          category_code: foodAndBeverage
          category_type: restaurants
          description: Lunch
          end_to_end_id: EE202506111406IVIN5pXVoyp
          entity_id: 01978eea-14d9-0d41-ce30-a9e2cbf743c5
          error_code: null
          error_message: null
          id: 0192f790-170e-e630-609a-18a0447ee30b
          inserted_at: '2025-06-11T14:06:12.196500Z'
          is_partially_allowed: false
          issuer_amount:
            amount: 10000
            currency: BRL
          merchant:
            amount:
              amount: 10000
              currency: BRL
            country_code: BR
            currency_symbol: R$
            name: John Doe Store
          method_code: contactless
          purchased_at: '2025-06-11T14:06:10.430838Z'
          purpose: purchase
          receipt_url: >-
            https://receipt.example.com/purchase/0192f790-170e-e630-609a-18a0447ee30b
          stages:
            - amount:
                amount: 10000
                currency: BRL
              callback_amount:
                amount: 10000
                currency: BRL
              callback_type: confirmed
              card_id: 01978eea-1d48-9176-e7f6-2ff0992c1b58
              category_code: foodAndBeverage
              category_type: restaurants
              description: Lunch
              end_to_end_id: EE202506111406IVIN5pXVoyp
              entity_id: 01978eea-14d9-0d41-ce30-a9e2cbf743c5
              error_code: null
              error_message: null
              id: 0192f790-170e-1639-9f94-b0296ef109c2
              inserted_at: '2025-06-11T14:06:12.196500Z'
              is_partially_allowed: false
              issuer_amount:
                amount: 10000
                currency: BRL
              merchant:
                amount:
                  amount: 10000
                  currency: BRL
                country_code: BR
                currency_symbol: R$
                name: John Doe Store
              method_code: contactless
              purchase_document_id: 0192f790-170e-e630-609a-18a0447ee30b
              purpose: purchase
              status: confirmed
              tax:
                amount: 0
                currency: BRL
              updated_at: '2025-06-11T14:06:12.196500Z'
              zip_code: null
          status: confirmed
          tax:
            amount: 0
            currency: BRL
          updated_at: '2025-06-11T14:06:12.196500Z'
          zip_code: null
      properties:
        data:
          $ref: '#/components/schemas/V2_card_purchase_with_stages'
      required:
        - data
      title: V2 card purchase response
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Card.Purchase.Response
      x-validate: null
    V2_error:
      example:
        error:
          error_code: INVALID_PARAMETER
          error_message: 'Invalid parameters: /amount: Invalid integer. Got: string'
          errors:
            - field: /amount
              message: 'Invalid integer. Got: string'
      properties:
        error:
          properties:
            error_code:
              description: >-
                Stable UPPER_SNAKE identifier of the error, for programs and
                logs. Branch on this, not on the message.
              type: string
              x-struct: null
              x-validate: null
            error_message:
              description: Human readable explanation of the error.
              type: string
              x-struct: null
              x-validate: null
            errors:
              description: >-
                Only on INVALID_PARAMETER for a request outside the operation's
                schema: one entry per offending field.
              items:
                properties:
                  field:
                    description: JSON pointer to the field, e.g. /amount.
                    type: string
                    x-struct: null
                    x-validate: null
                  message:
                    description: What is wrong with it.
                    type: string
                    x-struct: null
                    x-validate: null
                required:
                  - field
                  - message
                type: object
                x-struct: null
                x-validate: null
              type: array
              x-struct: null
              x-validate: null
          required:
            - error_code
            - error_message
          type: object
          x-struct: null
          x-validate: null
      required:
        - error
      title: V2 error
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.HTTP.V2Error
      x-validate: null
    V2_card_purchase_with_stages:
      description: A purchase made with a card, with the callbacks recorded for it
      example:
        amount:
          amount: 10000
          currency: BRL
        card_id: 01978eea-1d48-9176-e7f6-2ff0992c1b58
        category_code: foodAndBeverage
        category_type: restaurants
        description: Lunch
        end_to_end_id: EE202506111406IVIN5pXVoyp
        entity_id: 01978eea-14d9-0d41-ce30-a9e2cbf743c5
        error_code: null
        error_message: null
        id: 0192f790-170e-e630-609a-18a0447ee30b
        inserted_at: '2025-06-11T14:06:12.196500Z'
        is_partially_allowed: false
        issuer_amount:
          amount: 10000
          currency: BRL
        merchant:
          amount:
            amount: 10000
            currency: BRL
          country_code: BR
          currency_symbol: R$
          name: John Doe Store
        method_code: contactless
        purchased_at: '2025-06-11T14:06:10.430838Z'
        purpose: purchase
        receipt_url: >-
          https://receipt.example.com/purchase/0192f790-170e-e630-609a-18a0447ee30b
        stages:
          - amount:
              amount: 10000
              currency: BRL
            callback_amount:
              amount: 10000
              currency: BRL
            callback_type: confirmed
            card_id: 01978eea-1d48-9176-e7f6-2ff0992c1b58
            category_code: foodAndBeverage
            category_type: restaurants
            description: Lunch
            end_to_end_id: EE202506111406IVIN5pXVoyp
            entity_id: 01978eea-14d9-0d41-ce30-a9e2cbf743c5
            error_code: null
            error_message: null
            id: 0192f790-170e-1639-9f94-b0296ef109c2
            inserted_at: '2025-06-11T14:06:12.196500Z'
            is_partially_allowed: false
            issuer_amount:
              amount: 10000
              currency: BRL
            merchant:
              amount:
                amount: 10000
                currency: BRL
              country_code: BR
              currency_symbol: R$
              name: John Doe Store
            method_code: contactless
            purchase_document_id: 0192f790-170e-e630-609a-18a0447ee30b
            purpose: purchase
            status: confirmed
            tax:
              amount: 0
              currency: BRL
            updated_at: '2025-06-11T14:06:12.196500Z'
            zip_code: null
        status: confirmed
        tax:
          amount: 0
          currency: BRL
        updated_at: '2025-06-11T14:06:12.196500Z'
        zip_code: null
      properties:
        amount:
          $ref: '#/components/schemas/V2_card_money'
        card_id:
          description: Card ID
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        category_code:
          description: Category code
          type: string
          x-struct: null
          x-validate: null
        category_type:
          description: Category type
          type: string
          x-struct: null
          x-validate: null
        description:
          description: Description
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        end_to_end_id:
          $ref: '#/components/schemas/V2_card_purchase_end_to_end_id'
        entity_id:
          description: Entity ID
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        error_code:
          description: Why the purchase was declined, as a code
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        error_message:
          description: Why the purchase was declined
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        id:
          description: Purchase ID
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        inserted_at:
          description: When the purchase was recorded
          format: date-time
          type: string
          x-struct: null
          x-validate: null
        is_partially_allowed:
          description: Is partially allowed
          type: boolean
          x-struct: null
          x-validate: null
        issuer_amount:
          $ref: '#/components/schemas/V2_card_nullable_money'
        merchant:
          $ref: '#/components/schemas/V2_card_purchase_merchant'
        method_code:
          $ref: '#/components/schemas/V2_card_purchase_method_code'
        purchased_at:
          description: >-
            When the card network authorized the purchase. `GET
            /v2/cards/purchases/e2e/{id}` takes it as `timestamp`.
          format: date-time
          type: string
          x-struct: null
          x-validate: null
        purpose:
          description: Purpose
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        receipt_url:
          description: Receipt URL
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        stages:
          description: Callbacks recorded for the purchase, newest first
          items:
            $ref: '#/components/schemas/V2_card_purchase_stage'
          type: array
          x-struct: null
          x-validate: null
        status:
          $ref: '#/components/schemas/V2_card_purchase_status'
        tax:
          $ref: '#/components/schemas/V2_card_nullable_money'
        updated_at:
          description: When the purchase was last updated
          format: date-time
          type: string
          x-struct: null
          x-validate: null
        zip_code:
          description: Zip code
          nullable: true
          type: string
          x-struct: null
          x-validate: null
      title: V2 card purchase with stages
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Card.Purchase.DataWithStages
      x-validate: null
    V2_card_money:
      description: An amount of money in cents. It can be zero or negative.
      example:
        amount: 10000
        currency: BRL
      properties:
        amount:
          description: Amount in cents
          type: integer
          x-struct: null
          x-validate: null
        currency:
          description: Currency
          enum:
            - BRL
          type: string
          x-struct: null
          x-validate: null
      required:
        - amount
        - currency
      title: V2 card money
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Card.Money
      x-validate: null
    V2_card_nullable_money:
      description: An amount of money in cents, or null when it was not recorded
      example:
        amount: 10000
        currency: BRL
      nullable: true
      properties:
        amount:
          description: Amount in cents
          type: integer
          x-struct: null
          x-validate: null
        currency:
          description: Currency
          enum:
            - BRL
          type: string
          x-struct: null
          x-validate: null
      required:
        - amount
        - currency
      title: V2 card nullable money
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Card.NullableMoney
      x-validate: null
    V2_card_purchase_merchant:
      description: Merchant where the card was used
      example:
        amount:
          amount: 10000
          currency: BRL
        country_code: BR
        currency_symbol: R$
        name: John Doe Store
      properties:
        amount:
          description: Amount charged by the merchant, in cents of the merchant's currency
          nullable: true
          properties:
            amount:
              description: Amount in cents
              type: integer
              x-struct: null
              x-validate: null
            currency:
              description: ISO 4217 currency code
              type: string
              x-struct: null
              x-validate: null
          required:
            - amount
            - currency
          type: object
          x-struct: null
          x-validate: null
        country_code:
          description: Country code
          type: string
          x-struct: null
          x-validate: null
        currency_symbol:
          description: Currency symbol
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        name:
          description: Name
          type: string
          x-struct: null
          x-validate: null
      required:
        - name
        - country_code
        - currency_symbol
        - amount
      title: V2 card purchase merchant
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Card.Purchase.Merchant
      x-validate: null
    V2_card_purchase_method_code:
      description: How the card was read
      enum:
        - unknown
        - manual
        - magstripe
        - barcode
        - ocr
        - chip
        - contactless
        - token
        - server
      nullable: true
      title: V2 card purchase method code
      type: string
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Card.Purchase.MethodCode
      x-validate: null
    V2_card_purchase_stage:
      description: One card network callback recorded for the purchase
      example:
        amount:
          amount: 10000
          currency: BRL
        callback_amount:
          amount: 10000
          currency: BRL
        callback_type: confirmed
        card_id: 01978eea-1d48-9176-e7f6-2ff0992c1b58
        category_code: foodAndBeverage
        category_type: restaurants
        description: Lunch
        end_to_end_id: EE202506111406IVIN5pXVoyp
        entity_id: 01978eea-14d9-0d41-ce30-a9e2cbf743c5
        error_code: null
        error_message: null
        id: 0192f790-170e-1639-9f94-b0296ef109c2
        inserted_at: '2025-06-11T14:06:12.196500Z'
        is_partially_allowed: false
        issuer_amount:
          amount: 10000
          currency: BRL
        merchant:
          amount:
            amount: 10000
            currency: BRL
          country_code: BR
          currency_symbol: R$
          name: John Doe Store
        method_code: contactless
        purchase_document_id: 0192f790-170e-e630-609a-18a0447ee30b
        purpose: purchase
        status: confirmed
        tax:
          amount: 0
          currency: BRL
        updated_at: '2025-06-11T14:06:12.196500Z'
        zip_code: null
      properties:
        amount:
          $ref: '#/components/schemas/V2_card_money'
        callback_amount:
          $ref: '#/components/schemas/V2_card_nullable_money'
        callback_type:
          description: Callback type
          enum:
            - authorization
            - approved
            - denied
            - canceled
            - reversed
            - voided
            - confirmed
          type: string
          x-struct: null
          x-validate: null
        card_id:
          description: Card ID
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        category_code:
          description: Category code
          type: string
          x-struct: null
          x-validate: null
        category_type:
          description: Category type
          type: string
          x-struct: null
          x-validate: null
        description:
          description: Description
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        end_to_end_id:
          $ref: '#/components/schemas/V2_card_purchase_end_to_end_id'
        entity_id:
          description: Entity ID
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        error_code:
          description: Why the purchase was declined, as a code
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        error_message:
          description: Why the purchase was declined
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        id:
          description: Stage ID
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        inserted_at:
          description: When the stage was recorded
          format: date-time
          type: string
          x-struct: null
          x-validate: null
        is_partially_allowed:
          description: Is partially allowed
          type: boolean
          x-struct: null
          x-validate: null
        issuer_amount:
          $ref: '#/components/schemas/V2_card_nullable_money'
        merchant:
          $ref: '#/components/schemas/V2_card_purchase_merchant'
        method_code:
          $ref: '#/components/schemas/V2_card_purchase_method_code'
        purchase_document_id:
          description: Purchase ID
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        purpose:
          description: Purpose
          nullable: true
          type: string
          x-struct: null
          x-validate: null
        status:
          $ref: '#/components/schemas/V2_card_purchase_status'
        tax:
          $ref: '#/components/schemas/V2_card_nullable_money'
        updated_at:
          description: When the stage was last updated
          format: date-time
          type: string
          x-struct: null
          x-validate: null
        zip_code:
          description: Zip code
          nullable: true
          type: string
          x-struct: null
          x-validate: null
      title: V2 card purchase stage
      type: object
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Card.Purchase.Stage
      x-validate: null
    V2_card_purchase_status:
      description: Purchase status
      enum:
        - authorized
        - approved
        - denied
        - confirmed
        - canceled
        - reversed
        - voided
      title: V2 card purchase status
      type: string
      x-struct: Elixir.TrioFoundationWeb.Schemas.Banking.V2.Card.Purchase.Status
      x-validate: null
  securitySchemes:
    authorization:
      scheme: basic
      type: http

````

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