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

# Enroll Payment Methods

Enrollment allows you to securely store a customer's payment method in Yuno's vault for future use. When you enroll a payment method, Yuno generates a `vaulted_token` that references the payment details without exposing sensitive information. This enables recurring payments, subscriptions, and retries across providers while maintaining PCI compliance.

<Note>
  **Vaulted Token**

  A Vaulted Token is created once a payment method is enrolled and stored with the customer information. You can use the created Vaulted Token to identify the payment method in future payments.
</Note>

## Available payment methods for enrollment

| Payment method             | Type                   |
| -------------------------- | ---------------------- |
| **Cards**                  | `CARD`                 |
| **Nupay**                  | `NU_PAY_ENROLLMENT`    |
| **PayPal**                 | `PAYPAL_ENROLLMENT`    |
| **Daviplata**              | `DAVIPLATA_ENROLLMENT` |
| **MercadoPago Wallet**     | `WALLET_CONNECT`       |
| **dLocal Yape**            | `YAPE_ENROLLMENT`      |
| **dLocal Smart PIX**       | `SMART_PIX`            |
| **Astropay**               | `ASTROPAY_ENROLLABLE`  |
| **Nequi**\*                | `NEQUI`                |
| **Bancolombia Tokenbox**\* | `BANCOLOMBIA_TOKENBOX` |
| **Adyen PIX Biométrico**   | `PIX_BIOMETRICO`       |
| **DolarApp**               | `DOLARAPP`             |

(\*) SDK only. Consult the [SDK documentation](/docs/sdks/overview/quickstart) for integration details.

## Requirements

* Gather your [API credentials](/docs/developers-credentials) from the [Yuno Dashboard](https://dashboard.y.uno/developers):
  * `public-api-key`
  * `private-secret-key`
  * `account_id`
* [Set up connections](/docs/connections) on your Yuno Dashboard. Add a payment method that requires enrollment.
* [Build a route](/docs/routing#configuring-the-dynamic-routing) for the payment method to define how it will be processed.
* [Configure the checkout builder](/docs/checkout-builder) to make your connected payments available.

## Steps summary

To enroll a payment method into a customer account:

1. [Create a Customer](/reference/create-customer)
2. [Create Customer Session](/reference/create-customer-session) (Only for Checkout workflow)
3. (Optional) Retrieve Payment Methods Available to Enroll - [Checkout workflow](/reference/retrieve-payment-methods-to-enroll-checkout)
4. Enroll Payment Method [Checkout workflow](/reference/enroll-payment-method-checkout)/[Direct workflow](/reference/enroll-payment-method-api)
5. Retrieve Payment Methods - [Direct workflow](/reference/retrieve-enrolled-payment-methods-api)

## Enroll a payment method

### Step 1: Create a customer

Register customer info through the [Create Customer](/reference/create-customer) endpoint. Also, supply the `merchant_customer_id`, a unique identifier for the customer used on your system.

<Note>
  **Customer complementary information**

  Providing optional details like phone, billing address, and shipping address enhances the payment experience. If you include these fields, certain sub-fields become required.
</Note>

After creating the customer, you'll receive an `id` that identifies them in Yuno. If your customer already has an `id`, skip this step.

### Step 2: Create a customer session

<Warning>
  **Workflow Requirements**

  The enrollment workflow varies by payment method type:

  * **Checkout workflow**: Requires customer session for most payment methods (Cards, Nupay, PayPal, Daviplata, dLocal methods, Astropay, Adyen PIX Biométrico)
  * **Direct workflow**: Available for Cards only (PCI compliant merchants). Proceed directly to Step 3 using the customer `id` generated in Step 1.
  * **SDK workflow**: Payment methods like Nequi and Bancolombia Tokenbox require SDK implementation. WALLET\_CONNECT (MercadoPago) supports both SDK and Checkout workflows. Consult the [SDK documentation](/docs/sdks/overview/quickstart) for details.
  * **SDK Seamless workflow**: You can enroll payment methods during the seamless payment flow by setting `vault_on_success: true` when creating the payment. The payment method will be automatically enrolled if the payment succeeds.
</Warning>

Create a customer session to store the customer's payment preferences using the [Create Customer Session](/reference/create-customer-session) endpoint. Use the `id` from Step 1 as the `customer_id`.

The response returns a `customer_session`, which you'll use to enroll the payment method.

### Step 3: Retrieve payment methods to enroll

This **optional step** lists all available payment methods the customer can enroll. If you already know which payment method to enroll, proceed to [Step 4](#step-4-enroll-a-payment-method).

To list available payment methods, use the Retrieve Payment Methods To Enroll endpoint. For the [Checkout workflow](/reference/retrieve-payment-methods-to-enroll-checkout), include the `customer_session` in the request. The Direct workflow doesn't currently support retrieving payment methods to enroll.

The response returns a `payment_methods` array containing all available payment methods to enroll. Use the `type` field from this response in the next step.

<Note>
  **Available Payment Methods**

  Only payment methods that you've connected, routed, and added to your checkout will appear in the response.
</Note>

### Step 4: Enroll a payment method

Enroll the payment method using one of the following endpoints:

* [**Checkout workflow**](/reference/enroll-payment-method-checkout): Pass the payment method `type` to the `payment_method_type` parameter. Supported types include: `CARD`, `NU_PAY_ENROLLMENT`, `PAYPAL_ENROLLMENT`, `DAVIPLATA_ENROLLMENT`, `WALLET_CONNECT`, `YAPE_ENROLLMENT`, `SMART_PIX`, `ASTROPAY_ENROLLABLE`, `PIX_BIOMETRICO`.
* [**Direct workflow**](/reference/enroll-payment-method-api): Pass the payment method `type` to the `type` parameter. (Only available for `CARD` payment methods used by PCI compliant merchants)
* [**SDK workflow**](/docs/sdks/overview/quickstart): Payment methods like `NEQUI` and `BANCOLOMBIA_TOKENBOX` require SDK implementation. `WALLET_CONNECT` (MercadoPago) supports both SDK and Checkout workflows.

Redirect the user to the payment provider page to complete enrollment. You'll receive this URL in Step 5.

### Step 5: Retrieve payment methods

The customer must provide authorization on the payment provider page. Retrieve the authorization URL based on your workflow:

* **Checkout workflow**: The enrollment URL appears in the enrollment response from Step 4. Find it in `provider.redirect.init_url`.
* **Direct workflow**: You'll receive the final status in Step 4 (cards only).

Redirect the user to complete authorization. Once enrollment is complete, proceed to the next step.

To confirm enrollment, retrieve the enrolled payment methods and verify the `status` is `ENROLLED`.

<Note>
  **Fingerprint**

  When a credit card is enrolled, the response includes a `fingerprint` field that represents your customer's card across your organization. If a customer enrolls the same card multiple times, multiple `vaulted_token` values are generated, but the `fingerprint` remains the same, allowing you to deduplicate on your side. See [Card Fingerprint](/docs/fingerprint).

  The fingerprint is available after enrollment but can be `null` for some providers. Always check for its presence before using it for deduplication.

  The fingerprint also appears in payment responses when a transaction uses an enrolled credit card.
</Note>
