> ## Documentation Index
> Fetch the complete documentation index at: https://yuno-3979e326-docs-agent-readable-descriptions.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Enroll Payment Method — Direct

> Enroll a customer's payment method directly via the DIRECT workflow.



## OpenAPI

````yaml /openapi/yuno_sandbox_tested.json POST /v1/customers/{customer_id}/payment-methods
openapi: 3.1.0
info:
  title: Yuno Payments API
  version: 1.0.0
  description: >
    The Yuno Payments API is built around REST principles, using standard HTTP
    methods and JSON payloads.


    ## Authentication

    All requests require two headers:

    ```

    public-api-key: YOUR_PUBLIC_KEY

    private-secret-key: YOUR_PRIVATE_KEY

    ```


    ## Idempotency

    Payment mutations (create, capture, cancel, refund, payout) require an
    `X-Idempotency-Key` header (UUID).

    The API stores the key and returns the same response for duplicate requests
    within 24 hours.


    ## Environments

    | Environment | Base URL |

    |-------------|----------|

    | Sandbox | `https://api-sandbox.y.uno/v1` |

    | Production | `https://api.y.uno/v1` |
  contact:
    name: Yuno Support
    url: https://docs.y.uno
  license:
    name: Proprietary
servers:
  - url: https://api-sandbox.y.uno
    description: Sandbox
  - url: https://api.y.uno
    description: Production
security:
  - PublicApiKey: []
    PrivateSecretKey: []
tags:
  - name: Customers
    description: Create and manage customer records.
  - name: Checkout Sessions
    description: Initialize the Yuno SDK on the front-end.
  - name: Payment Methods
    description: Enroll and manage vaulted payment methods.
  - name: Payments
    description: Create and manage payment transactions.
  - name: Payment Links
    description: Hosted payment pages requiring no SDK.
  - name: Subscriptions
    description: Recurring billing management.
  - name: Payouts
    description: Disburse funds to individuals or entities.
  - name: Reports
    description: Generate and download transaction reports.
  - name: Currency Conversion
    description: Dynamic currency conversion (DCC).
paths:
  /v1/customers/{customer_id}/payment-methods:
    post:
      tags:
        - Payment Methods
      summary: Enroll Payment Method — Direct API
      operationId: enroll-payment-method-direct
      parameters:
        - $ref: '#/components/parameters/CustomerId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrollPaymentMethodDirectRequest'
            example:
              account_id: YOUR_ACCOUNT_ID
              country: US
              type: CARD
              workflow: DIRECT
              callback_url: https://example.com/enrollment/callback
              verify:
                vault_on_success: true
                currency: USD
      responses:
        '200':
          description: Payment method enrolled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrolledPaymentMethod'
components:
  parameters:
    CustomerId:
      name: customer_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    EnrollPaymentMethodDirectRequest:
      type: object
      required:
        - account_id
        - country
        - type
        - workflow
      properties:
        account_id:
          type: string
          format: uuid
        country:
          $ref: '#/components/schemas/Country'
        type:
          type: string
          enum:
            - CARD
            - NU_PAY_ENROLLMENT
        workflow:
          type: string
          enum:
            - DIRECT
        callback_url:
          type: string
          format: uri
        verify:
          type: object
          properties:
            vault_on_success:
              type: boolean
            currency:
              $ref: '#/components/schemas/Currency'
    EnrolledPaymentMethod:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: VISA ****1111
        type:
          type: string
        category:
          type: string
        vaulted_token:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - ENROLLED
            - READY_TO_ENROLL
        card_data:
          type: object
          properties:
            iin:
              type: string
            lfd:
              type: string
            brand:
              type: string
            issuer:
              type: string
            fingerprint:
              type: string
    Country:
      type: string
      enum:
        - AR
        - BO
        - BR
        - CL
        - CO
        - CR
        - EC
        - SV
        - GT
        - HN
        - MX
        - NI
        - PA
        - PY
        - PE
        - US
        - UY
      description: ISO 3166-1 alpha-2 country code
    Currency:
      type: string
      minLength: 3
      maxLength: 3
      description: ISO 4217 currency code (e.g. USD, BRL, MXN)

````