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

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Consultar meio de pagamento cadastrado por ID

> Consulta um meio de pagamento específico que um cliente cadastrou, pelo seu token armazenado

Consulte um meio de pagamento específico que um usuário cadastrou.

> [!NOTE]
>
> **Consultar meio de pagamento cadastrado**
>
> Para recuperar as informações do meio de pagamento cadastrado, você precisa informar o `payment_method_id`, que é o `vaulted_token` recebido ao usar o endpoint [Cadastrar meio de pagamento](https://docs.y.uno/pt-br/reference/payment-methods-direct-workflow/enroll-payment-method-api.md).


## OpenAPI

````yaml openapi/pt-br/payment-methods-direct-workflow/retrieve-enrolled-payment-method-by-id-api.json GET /customers/{customer_id}/payment-methods/{payment_method_id}
openapi: 3.1.0
info:
  title: customer-api
  version: 1.0.2
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /customers/{customer_id}/payment-methods/{payment_method_id}:
    get:
      summary: Consultar meio de pagamento cadastrado por id
      operationId: retrieve-enrolled-payment-method-by-id-api
      parameters:
        - name: customer_id
          in: path
          description: >-
            O identificador único do cliente, criado com o endpoint [Criar
            cliente](https://docs.y.uno/pt-br/reference/customers/create-customer)
            (UUID, 36 caracteres).
          schema:
            type: string
          required: true
        - name: payment_method_id
          in: path
          description: >-
            O identificador único do `payment_method`. Essa informação foi
            recebida como o `vaulted_token` ao cadastrar um meio de pagamento
            usando [Enroll Payment
            Method](/pt-br/reference/payment-methods-direct-workflow/enroll-payment-method-api)
            (UUID, 36 caracteres).
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    idempotency_key: 2ca58c6d-8794-4c8f-a2f6-bba4b7498b74
                    id: 2fd6bf11-2129-4061-9c2a-34e196f89753
                    account_id: 493e9374-510a-4201-9e09-de669d75f256
                    name: VISA ****1111
                    description: VISA ****1111
                    type: CARD
                    category: CARD
                    country: US
                    status: ENROLLED
                    sub_status: null
                    vaulted_token: 7ced7717-f860-4705-a376-58a714953de9
                    metadata:
                      - key: on_behalf_of
                        value: acct_1A2b3C4d5E6f7G8h
                      - key: order_ref
                        value: ABC-123
                    action: FORM
                    redirect_url: null
                    created_at: '2024-06-04T12:47:46.992602Z'
                    updated_at: '2024-06-04T12:47:46.992603Z'
                    enrollment:
                      session: ''
                      sdk_required_action: false
                    provider:
                      id: YUNO
                      type: YUNO
                      token: e47299a5-269e-42a1-9be1-9f64e400413a
                      provider_status: null
                    customer_payer:
                      first_name: John
                      last_name: Doe
                      email: john.doe@example.com
                      gender: M
                      date_of_birth: '1990-02-28'
                      document:
                        document_number: '123456789'
                        document_type: SSN
                      phone:
                        number: '5551234567'
                        country_code: '1'
                      billing_address:
                        address_line_1: 123 Main St
                        address_line_2: Apt 4B
                        country: US
                        state: NY
                        city: New York
                        zip_code: '10001'
                    card_data:
                      iin: '41111111'
                      lfd: '1111'
                      expiration_month: 3
                      expiration_year: 26
                      number_length: 16
                      security_code_length: 3
                      brand: VISA
                      issuer: JPMORGAN CHASE BANK N A
                      issuer_code: null
                      country_code: US
                      category: CREDIT
                      type: CREDIT
                      fingerprint: 55a7fe38-cdc3-45dc-8c5f-820751799c76
                    last_successfully_used: null
                    last_successfully_used_at: null
                    verify:
                      vault_on_success: false
                      payment: null
                    preferred: null
                    parent_type: null
                    callback_url: null
              schema:
                type: object
                properties:
                  idempotency_key:
                    type: string
                    example: 2ca58c6d-8794-4c8f-a2f6-bba4b7498b74
                  id:
                    type: string
                    example: 2fd6bf11-2129-4061-9c2a-34e196f89753
                  account_id:
                    type: string
                    example: 493e9374-510a-4201-9e09-de669d75f256
                  name:
                    type: string
                    example: VISA ****1111
                  description:
                    type: string
                    example: VISA ****1111
                  type:
                    type: string
                    example: CARD
                  category:
                    type: string
                    example: CARD
                  country:
                    type: string
                    example: US
                  status:
                    type: string
                    example: ENROLLED
                  sub_status: {}
                  vaulted_token:
                    type: string
                    example: 7ced7717-f860-4705-a376-58a714953de9
                  metadata:
                    type: array
                  action:
                    type: string
                    example: FORM
                  redirect_url: {}
                  created_at:
                    type: string
                    example: '2024-06-04T12:47:46.992602Z'
                  updated_at:
                    type: string
                    example: '2024-06-04T12:47:46.992603Z'
                  enrollment:
                    type: object
                    properties:
                      session:
                        type: string
                        example: ''
                      sdk_required_action:
                        type: boolean
                        example: false
                        default: true
                  provider:
                    type: object
                    properties:
                      id:
                        type: string
                        example: YUNO
                      type:
                        type: string
                        example: YUNO
                      token:
                        type: string
                        example: e47299a5-269e-42a1-9be1-9f64e400413a
                      provider_status: {}
                  customer_payer:
                    type: object
                    properties:
                      first_name:
                        type: string
                        example: John
                      last_name:
                        type: string
                        example: Doe
                      email:
                        type: string
                        example: john.doe@example.com
                      gender:
                        type: string
                        example: M
                      date_of_birth:
                        type: string
                        example: '1990-02-28'
                      document:
                        type: object
                        properties:
                          document_number:
                            type: string
                            example: '123456789'
                          document_type:
                            type: string
                            example: SSN
                      phone:
                        type: object
                        properties:
                          number:
                            type: string
                            example: '5551234567'
                          country_code:
                            type: string
                            example: '1'
                      billing_address:
                        type: object
                        properties:
                          address_line_1:
                            type: string
                            example: 123 Main St
                          address_line_2:
                            type: string
                            example: Apt 4B
                          country:
                            type: string
                            example: US
                          state:
                            type: string
                            example: NY
                          city:
                            type: string
                            example: New York
                          zip_code:
                            type: string
                            example: '10001'
                  card_data:
                    type: object
                    properties:
                      iin:
                        type: string
                        example: '41111111'
                      lfd:
                        type: string
                        example: '1111'
                      expiration_month:
                        type: integer
                        example: 3
                        default: 0
                      expiration_year:
                        type: integer
                        example: 26
                        default: 0
                      number_length:
                        type: integer
                        example: 16
                        default: 0
                      security_code_length:
                        type: integer
                        example: 3
                        default: 0
                      security_code_expires_in:
                        type: integer
                        example: 842
                        description: >-
                          Segundos restantes até que o código de segurança
                          armazenado deixe de estar disponível para o proxy de
                          encaminhamento PCI. Retorna -1 quando essa janela é
                          encerrada e é totalmente omitido quando o cartão não
                          tem código de segurança. Presente apenas para
                          organizações com o proxy de encaminhamento PCI
                          habilitado.
                      brand:
                        type: string
                        example: VISA
                      issuer:
                        type: string
                        example: JPMORGAN CHASE BANK N A
                      issuer_code: {}
                      country_code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Código de país ISO 3166-1 alpha-2 do país emissor do
                          cartão, obtido pela consulta de BIN quando o cartão é
                          armazenado no vault. Null quando os dados de
                          enriquecimento de BIN não estão disponíveis.
                        example: US
                      category:
                        type: string
                        example: CREDIT
                      type:
                        type: string
                        example: CREDIT
                      fingerprint:
                        type: string
                        example: 55a7fe38-cdc3-45dc-8c5f-820751799c76
                  last_successfully_used: {}
                  last_successfully_used_at: {}
                  verify:
                    type: object
                    properties:
                      vault_on_success:
                        type: boolean
                        example: false
                        default: true
                      currency:
                        type: string
                        description: >-
                          Moeda da verificação do cartão, conforme enviada
                          quando o meio de pagamento foi cadastrado (ISO 4217).
                      external_subscription:
                        type: object
                        description: >-
                          A assinatura externa à qual este meio de pagamento foi
                          vinculado quando foi cadastrado. Retornada apenas
                          quando o cadastro foi criado com
                          `verify.vault_on_success` definido como `true` e
                          incluiu um objeto `external_subscription`. A chave é
                          omitida quando não há vínculo, então a ausência de
                          `external_subscription` não prova que o cadastro não
                          tem um: o campo também é omitido quando o pagamento de
                          verificação não pode ser consultado. Consulte o
                          pagamento de verificação para confirmar.
                        properties:
                          id:
                            type: string
                            description: Identificador da assinatura no seu sistema.
                          customer_id:
                            type: string
                            description: >-
                              Identificador do cliente da assinatura no seu
                              sistema.
                      payment: {}
                  preferred: {}
                  provider_data:
                    type: object
                    description: Dados adicionais do provedor
                    properties:
                      raw_request:
                        type: object
                        description: >-
                          Cópia ofuscada da requisição que a Yuno enviou ao
                          provedor. Retornada apenas para organizações em uma
                          lista de permissões.
                      raw_response:
                        type: object
                  parent_type:
                    nullable: true
                    description: Tipo pai.
                  callback_url:
                    nullable: true
                    description: URL de callback.
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Bad Request:
                  value:
                    code: INVALID_REQUEST
                    messages:
                      - Invalid request
                Customer Not Found:
                  value:
                    code: CUSTOMER_NOT_FOUND
                    messages:
                      - Customer not found
                  summary: Customer Not Found
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_REQUEST
                  messages:
                    type: array
                    items:
                      type: string
                      example: Invalid request
        '401':
          description: '401'
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    code: INVALID_CREDENTIALS
                    messages:
                      - Invalid credentials
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_CREDENTIALS
                  messages:
                    type: array
                    items:
                      type: string
                      example: Invalid credentials
        '403':
          description: '403'
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    code: AUTHORIZATION_REQUIRED
                    messages:
                      - The merchant has no authorization to use this API.
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: AUTHORIZATION_REQUIRED
                  messages:
                    type: array
                    items:
                      type: string
                      example: The merchant has no authorization to use this API.
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: public-api-key
      x-default: <Your public-api-key>
    sec1:
      type: apiKey
      in: header
      name: private-secret-key
      x-default: <Your private-secret-key>

````

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