Lite SDK (Enrollment)
With the Lite version of the Yuno SDK, you have full control of your payment experience. The Lite SDK allows you to control the payment methods displayed to your customer and enroll new payment methods to your customer account. Access the Lite SDK (Payment) for additional information regarding the payment process. This page focuses on the enrollment process.
The Lite SDK lets you enroll any payment method to your customer account by following the enrollment workflow described on this page. However, if you want to save cards, you can do it while your customer pays. Access Lite SDK (Payment) for additional information.
Enrollment Workflow
The following image describes the complete enrollment workflow. Below, each step is described in detail.
Step 1: Create a customer
First, create a customer. After you create a customer, you can enroll payment methods to their account. You can skip this step if you already have a customer ID received from a previous customer creation.
Use the Create Customer endpoint to create new customers and get a customer id
. The customer id
will be used in the following 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:
- Include the library in your project.
- Initialize the SDK with the public key.
- Configure and mount the SDK by calling
yuno.mountEnrollmentLite
with your desired configuration.
For more information on how to initiate Yuno's SDK, refer to one of the following pages according to the corresponding platform:
Updated 5 months ago