This page documents a legacy SDK. Starting a new integration? Use the Yuno SDK. Already on a legacy SDK? Follow the migration guide.The new Yuno SDK (Web v2.x, iOS v3.x, Android v3.x) replaces the Full, Lite, Seamless, Render, Headless, and Secure Fields SDKs with one API across every platform. Legacy SDKs remain supported side by side during the transition and are scheduled for deprecation in 2027. Contact your Account Manager for migration planning.
Step 1: Include the library in your project
New SDK equivalent for Steps 1 and 2: Install. The integration guide provides three flexible methods:- Direct HTML script inclusion
- Dynamic JavaScript injection
- NPM module installation
TypeScript LibraryIf you are using TypeScript, Yuno offers a library that provides access to all available methods in the Yuno Web SDK.
Step 2: Initialize SDK with the public key
Initialize the Yuno SDK in your JavaScript application by providing a validPUBLIC_API_KEY:
CredentialsSee the credentials page for more information: /reference/getting-started/authentication
Step 3: Create a checkout session
New SDK equivalent: Create the checkout session. To initialize the payment flow, create a newcheckout_session using the Create checkout session endpoint.
- First, create a customer or retrieve an existing customer ID
- Include it when creating the
checkout_session
Control Authorization and CaptureTo control authorization and capture with cards, send
payment_method.detail.card.capture on the Create Payment request your backend sends from createPayment: set false to authorize only, true to capture immediately. Yuno reads this field from the payment request. See Cancel and capture flow.Key parameters
onPaymentMethodSelect EventFor all APMs, including Google Pay, Apple Pay, and PayPal, onPaymentMethodSelected is triggered as soon as the customer chooses the payment method (before the payment flow begins). Define onPaymentMethodSelected in await yuno.startCheckout() before await yuno.mountCheckoutLite().Step 4: Start the checkout process
New SDK equivalent for Steps 4 to 6: Lite mode migration. Use the configuration below to provide a lite and user-friendly payment experience for your customers:startCheckout, specify the callbacks to handle payments. You can also customize the checkout interface using the texts objects.
Parameters
Configure the lite checkout with the following options:PromotionsWhen Promotions is enabled for your organization, Lite checkout asks for a promotion quote as the shopper types the card, and
createPayment receives it in tokenWithInformation.quote. Wallets aren’t a supported target for this release: mountExternalButtons doesn’t ask for a quote. See Promotions.Customer and Merchant-Initiated TransactionsPayments can be initiated by the customer (CIT) or by the merchant (MIT). You find more information about their characteristics in Stored credentials.
Step 5: Mount the SDK
To present the checkout process based on the selected payment method, use theawait yuno.mountCheckoutLite() function. This step ensures the SDK is properly mounted on your chosen HTML element.
vaultedToken is optional. It represents a previously enrolled payment method. If you provide the vaultedToken, the user will not be required to provide the payment information again since it was provided in a previous transaction.
After mounting, you must start the checkout flow by calling yuno.startPayment(). If you skip this call, the payment form will not open. Note that yuno.startPayment() also returns a promise and should be awaited.
Step 6: Start the payment flow (Required)
Callawait yuno.startPayment() immediately after await yuno.mountCheckoutLite() to open the selected payment method UI:
Demo AppIn addition to the code examples provided, you can access the Demo App for a complete implementation of Yuno SDKs (clone from the repository).
Check that a payment method will render before listing it
If you draw your own payment-method list, ask the SDK which methods will actually render for this shopper and checkout session before you show them. CallisPaymentMethodAvailable after startCheckout and hide every method that resolves to false. Otherwise the shopper can pick a method that is not enabled for the session, or a wallet the device cannot use, and see an empty box where the form or button should be.
isPaymentMethodAvailable for what is checked for each method.
Mount external buttons
You can use themountExternalButtons method to render Google Pay and Apple Pay buttons in custom locations within your UI. This gives you control over where these buttons are displayed. Call it after startCheckout.
A wallet button renders only when the payment method is enabled for the checkout session and passes the SDK’s device and browser check, for example Google Pay’s
isReadyToPay() for the session’s configuration. The same code can therefore show a wallet button on one device or browser and not on another. On Web SDK 1.11.43 and later, or 1.10.35 and later, call isPaymentMethodAvailable for each wallet before mounting it, and only show the containers of the wallets that resolve to true.External button parameters
Unmounting buttons
You can unmount a single external button by payment method type:Unmounting the SDK
For explicit cleanup of the Yuno SDK, for example when a user cancels the flow or you need to remove the SDK from the DOM, use theunmountSdk() method:
PayPal REDIRECT Workflow
The Yuno SDK supports aREDIRECT workflow for PayPal. This workflow is useful when PayPal was not initialized at the start of the SDK or when using a pre-existing PayPal orderId.
- PaypalButtonModal: If PayPal is not initialized, the SDK can render the PayPal button inside a modal.
- Workflow: The
REDIRECTworkflow skips fraud detection and OTT creation, utilizing the providedorderId.
Enrolling payment methods in lite flow
New SDK equivalent: Enrollment. You can enroll payment methods (store cards for future use) directly during the lite payment flow by settingpayment_method.vault_on_success = true on the Create Payment request your backend sends from createPayment — nested under payment_method, as shown below. In the Lite flow your server creates the payment, so this is where the flag belongs; setting it on the checkout session is the Seamless pattern, where the SDK creates the payment.
When vault_on_success is set to true:
- The payment method will be automatically enrolled if the payment status is
SUCCEEDED - If the payment does not succeed, no vaulting will occur
- The payment response will include a
vaulted_tokenthat you can use for future transactions
Vaulting RequirementsTo generate and receive a
vaulted_token when vault_on_success = true, the payment must reference an existing Yuno customer through customer_payer.id in the checkout session. Creating or sending the customer data inline inside the payment request does not create the customer in Yuno’s system, so no vaulting will occur.