Lite SDK (Enrollment)

The Lite SDK provides full control over your payment experience. It allows you to:

  • Control the payment methods displayed to your customers.
  • Enroll new payment methods to the customer’s account.

This page focuses on the enrollment process. For details on the payment process, refer to Lite SDK (Payment).

If you wish to save cards during the payment, you can do so while the customer pays. For more information, see Lite SDK (Payment).

Enrollment workflow

The following diagram describes the complete enrollment workflow. Each step is explained in detail below:

Step 1: Create a customer

Begin by creating a customer. After creating the customer, you can enroll payment methods to their account. If a customer id from a previous customer creation already exists, you may skip this step.

Use the Create Customer endpoint to create new customers and obtain the customer id. This customer id will be used in the subsequent steps.

Step 2: Create a customer session

Next, create a customer session. Each enrollment needs a new customer session. This session lets you access all available payment methods your customer can enroll in their account.

Use the Create Customer Session endpoint with the customer id to get a new customer_session.

Step 3: Retrieve and display payment methods

Query the available payment methods using the Retrieve Payment Methods To Enroll endpoint using the customer_session. Next, display these methods to the customer so they can select the one they want to enroll.

You can enable or disable payment methods using the Checkout Builder in the Yuno dashboard.

Use the Enroll Payment Method endpoint to enroll the selected payment method to the customer account. You need to inform the customer_session and the payment method.

Step 4: Implement the SDK

After the customer selects the payment method, you have to initialize the Lite SDK before completing the enrollment process.

To initialize Yuno's Lite SDK, you have to provide your API credentials and the customer_session. Follow these steps to complete the process:

  1. Include the library in your project.
  2. Initialize the SDK with the public key.
  3. Configure and mount the SDK by calling yuno.mountEnrollmentLite with your desired configuration.

For platform-specific instructions on initializing Yuno's SDK, refer to the following: