Seamless SDK
Yuno's Seamless SDK provides a simple and efficient integration while giving you full control over the payment experience. Like the Lite SDK, it allows you to retrieve available payment methods and decide which to display during checkout. Once the selection is made, a single API and SDK call completes the payment process, creating an experience identical to the Lite SDK.
When using the Seamless SDK, you can:
- Execute the payment process.
- Enroll a credit card while making a payment.
- Use a vaulted token from an enrolled payment method to complete a payment.
Use the following guides to implement each process.
Payment workflow
The diagram below illustrates the complete payment workflow:
Step 1: Create a customer (optional)
If you want to associate a customer with stored payment methods, start by creating a customer profile.
- Use the Create customer endpoint to generate a new customer
id
. - If a customer session is not used, payments will proceed without stored user data (e.g., pre-filled fields or saved payment methods).
You can skip this step if you already have a customer id
or prefer to omit it entirely.
Omit customer session step
When you choose to not use a customer_session
, the payment will be created without a customer id
, leaving it empty when creating the payment. As a result, the process will not use any stored customer date, such as pre-filled form fields or saved payment details.
While skipping the customer session can simplify integration, it removes features designed to streamline the user experience, which can improve conversion rates by reducing friction during checkout.
Step 2: Create a checkout session
Next, create a checkout session. You must create a new checkout session for every new payment. This session provides access to all available payment methods (previously enrolled or not) for a specific customer.
Use the Create checkout session endpoint, providing the customer id
, to get a new checkout_session
.
Step 3: Display payment methods
Query the available payment methods using the Retrieve payment methods endpoint using the checkout_session
. Show these methods to the customer so they can select their preferred payment method to execute the payment.
If the customer has previously enrolled payment methods, you'll receive them as well. Use the vaulted_token
for these methods to create the One-Time Token and process the payment.
You are responsible for displaying the payment methods and capturing the customer's selection when using the Seamless SDK.
Step 4: Implement the SDK
After the customer selects the payment method, initialize the SDK with the checkout information. The SDK will generate the one-time toke, create the payment, and call on continuePayment()
to display any screens necessary for the user to complete the payment automatically.
After the customer selects a payment method, initialize the SDK with the checkout information. The SDK will:
- Generate the one-time token (OTT).
- Create the payment.
- Call
continuePayment()
if additional customer actions are required.
To initialize the Seamless SDK, follow these steps:
- Include the SDK library in your project.
- Initialize it with your API credentials and
checkout_session
. - Start the checkout process by calling
yuno.startCheckout()
with your configuration. - Display the checkout interface in a browser or mobile app.
- Add a payment button that calls
yuno.startPayment()
when clicked.
The SDK may also collect customer details (e.g., card information, email, phone number, document ID) required by the provider. Once initialized, the SDK returns a one-time token (OTT) via the yunoCreatePayment()
callback function.
For platform-specific setup, refer to:
Step 5: Get payment status
To obtain the payment status, call the yunoPaymentResult()
function. Based on the status, display the corresponding confirmation screen to the customer.
Step 6: Receive payment result through webhook
Yuno recommends configuring webhooks in your dashboard. Webhooks automatically notify your system of payment updates, eliminating the need for frequent status requests.
Updated 9 days ago