> ## Documentation Index
> Fetch the complete documentation index at: https://yn-c9bb3266.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Enroll Payment Method

> Enrolls (vaults) a payment method for a customer, enabling one-click payments in future transactions.

Vaults a payment method for a customer. Returns a `vaulted_token` for recurring use.


## OpenAPI

````yaml POST /v1/customers/{customer_id}/payment-methods
openapi: 3.1.0
info:
  title: Yuno Payments API
  description: >-
    Yuno payment orchestration platform — unified REST API for payments,
    checkout sessions, customers, payment methods, subscriptions, payouts,
    marketplace transfers, and banking connectivity across Latin America.
  version: 1.0.0
  contact:
    name: Yuno Support
    email: support@y.uno
    url: https://docs.y.uno
  license:
    name: Proprietary
    url: https://y.uno
servers:
  - url: https://api-sandbox.y.uno
    description: Sandbox
  - url: https://api.y.uno
    description: Production
security:
  - publicApiKey: []
    privateSecretKey: []
paths:
  /v1/customers/{customer_id}/payment-methods:
    post:
      tags:
        - Payment Methods
      summary: Enroll payment method
      description: >-
        Enrolls (vaults) a payment method for a customer, enabling one-click
        payments in future transactions.
      operationId: enrollPaymentMethod
      parameters:
        - name: customer_id
          in: path
          required: true
          description: The unique identifier of the customer
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentMethodEnrollRequest'
            example:
              type: CARD
              token: tok_4a8b9c2d-1e3f-5678-90ab-cdef12345678
              country: BR
      responses:
        '201':
          description: Payment method enrolled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentMethod'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PaymentMethodEnrollRequest:
      type: object
      required:
        - type
        - token
      properties:
        type:
          type: string
          enum:
            - CARD
            - PIX
            - BOLETO
            - PSE
            - SPEI
            - OXXO
          description: Payment method type
          example: CARD
        token:
          type: string
          description: One-time token from SDK tokenization
          example: tok_4a8b9c2d-1e3f-5678-90ab-cdef12345678
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code
          pattern: ^[A-Z]{2}$
          example: BR
      example:
        type: CARD
        token: tok_4a8b9c2d-1e3f-5678-90ab-cdef12345678
        country: BR
    PaymentMethod:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: pm_1a2b3c4d-5e6f-7890-abcd-ef1234567890
        customer_id:
          type: string
          format: uuid
          example: c9d0e1f2-3a4b-5c6d-7e8f-9a0b1c2d3e4f
        type:
          type: string
          enum:
            - CARD
            - PIX
            - BOLETO
            - PSE
            - SPEI
            - OXXO
          example: CARD
        status:
          type: string
          enum:
            - ACTIVE
            - EXPIRED
            - REVOKED
          example: ACTIVE
        card:
          type: object
          properties:
            last_four:
              type: string
              example: '4242'
            brand:
              type: string
              example: VISA
            expiry_month:
              type: integer
              example: 12
            expiry_year:
              type: integer
              example: 2028
        vaulted_token:
          type: string
          description: Token for reuse in future payments
          example: vtok_9f8e7d6c-5b4a-3210-fedc-ba9876543210
        created_at:
          type: string
          format: date-time
          example: '2026-03-01T10:00:00.000Z'
      example:
        id: pm_1a2b3c4d-5e6f-7890-abcd-ef1234567890
        customer_id: c9d0e1f2-3a4b-5c6d-7e8f-9a0b1c2d3e4f
        type: CARD
        status: ACTIVE
        card:
          last_four: '4242'
          brand: VISA
          expiry_month: 12
          expiry_year: 2028
        vaulted_token: vtok_9f8e7d6c-5b4a-3210-fedc-ba9876543210
        created_at: '2026-03-01T10:00:00.000Z'
    Error:
      type: object
      description: >-
        Standard error envelope returned by every Yuno service for any 4xx or
        5xx response. Top level. `code` is a stable SCREAMING_SNAKE_CASE
        identifier. `messages` is always an array of strings, even when there is
        only one entry. There is no `error` wrapper, no singular `message`, no
        `type`, no `details`. See the Error handling guide for the full code
        catalog.
      required:
        - code
        - messages
      properties:
        code:
          type: string
          description: >-
            Stable, machine readable identifier. Branch on this in your client.
            Common values include `BAD_REQUEST`, `VALIDATION_ERROR`,
            `INVALID_REQUEST`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`,
            `TOO_MANY_REQUESTS`, `INTERNAL_ERROR`, `BAD_GATEWAY`,
            `SERVICE_UNAVAILABLE`, plus business codes like
            `CUSTOMER_ID_DUPLICATED`, `RECIPIENT_NOT_FOUND`, `INVALID_STATE`,
            and the `PROVIDER_*` family for downstream provider errors.
          example: VALIDATION_ERROR
        messages:
          type: array
          description: >-
            Human readable details. Validation errors put one entry per failed
            field, formatted `"fieldName message"`.
          items:
            type: string
          example:
            - merchant_customer_id must not be blank
      example:
        code: VALIDATION_ERROR
        messages:
          - amount must be greater than 0
          - country must not be blank
  securitySchemes:
    publicApiKey:
      type: apiKey
      in: header
      name: public-api-key
      description: Your public API key from the Yuno Dashboard
    privateSecretKey:
      type: apiKey
      in: header
      name: private-secret-key
      description: Your private secret key (server-side only)

````