> ## 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.

# Obtener método de pago inscrito por ID

> Obtiene un método de pago específico que un cliente ha inscrito, mediante su token almacenado

Obtén un método de pago específico en el que un usuario se ha inscrito.

> [!NOTE]
>
> **Obtener método de pago inscrito**
>
> Para recuperar la información del método de pago inscrito, debes proporcionar el `payment_method_id`, que es el `vaulted_token` recibido al usar el endpoint [Inscribir método de pago](https://docs.y.uno/es/reference/payment-methods-direct-workflow/enroll-payment-method-api.md).


## OpenAPI

````yaml openapi/es/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: Obtener método de pago inscrito por id
      operationId: retrieve-enrolled-payment-method-by-id-api
      parameters:
        - name: customer_id
          in: path
          description: >-
            El identificador único del cliente, creado con el endpoint [Create
            Customer](https://docs.y.uno/es/reference/customers/create-customer)
            (UUID, 36 caracteres).
          schema:
            type: string
          required: true
        - name: payment_method_id
          in: path
          description: >-
            El identificador único del `payment_method`. Esta información se
            recibió como el `vaulted_token` al inscribir un método de pago con
            [Enroll Payment
            Method](/es/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 antes de que el código de seguridad
                          almacenado deje de estar disponible para el proxy de
                          reenvío PCI. Devuelve -1 una vez que esa ventana se
                          cerró, y se omite por completo cuando la tarjeta no
                          tiene código de seguridad. Solo está presente para
                          organizaciones con el proxy de reenvío 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 alfa-2 del país emisor de la
                          tarjeta, obtenido de la consulta de BIN cuando la
                          tarjeta se guarda en el vault. Es nulo cuando los
                          datos de enriquecimiento de BIN no están disponibles.
                        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: >-
                          Moneda de la verificación de la tarjeta, tal como se
                          envió cuando se inscribió el método de pago (ISO
                          4217).
                      external_subscription:
                        type: object
                        description: >-
                          La suscripción externa a la que se vinculó este método
                          de pago cuando se inscribió. Se devuelve solo cuando
                          la inscripción se creó con `verify.vault_on_success`
                          en `true` y con un objeto `external_subscription`. La
                          clave se omite cuando no hay vínculo, por lo que la
                          ausencia de `external_subscription` no prueba que la
                          inscripción no tenga uno: el campo también se omite
                          cuando no se puede obtener el pago de verificación.
                          Obtén el pago de verificación para confirmarlo.
                        properties:
                          id:
                            type: string
                            description: Identificador de la suscripción en tu sistema.
                          customer_id:
                            type: string
                            description: >-
                              Identificador del cliente de la suscripción en tu
                              sistema.
                      payment: {}
                  preferred: {}
                  provider_data:
                    type: object
                    description: Datos adicionales del proveedor
                    properties:
                      raw_request:
                        type: object
                        description: >-
                          Copia ofuscada de la solicitud que Yuno envió al
                          proveedor. Solo se devuelve para organizaciones
                          autorizadas.
                      raw_response:
                        type: object
                  parent_type:
                    nullable: true
                    description: Tipo principal.
                  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.