Skip to main content
The Web SDK makes it easy to integrate payment flows into your web and browser-based experiences.

Additional resources

Requirements

The first step is including the library in your project. The integration guide provides three flexible methods:
  1. Direct HTML script inclusion: Add the script tag to your page.
  2. Dynamic JavaScript injection: Load the SDK at runtime.
  3. NPM module installation: Install via npm (recommended).
Option 1: NPM (Recommended)
When using the NPM package, you can use the loadScript method to handle script loading with Subresource Integrity (SRI) support:
Option 2: HTML Script Tag
v1.10 is a global path: it receives every patch released on that line, so you get fixes without changing your integration.Do not add an integrity attribute to this URL. Because the file is republished on each patch release, any hash you pin to it stops matching and the browser blocks the script. Subresource Integrity requires the immutable full-version URL instead — see Subresource Integrity.
Option 3: Dynamic JavaScript
Once Step 1 is complete, continue with the full-checkout integration.

Parameters

These are the parameters covered in this guide. For the full list of parameters and callbacks, see the Web SDK Common Reference.

full-checkout

Implement Yuno’s Full integration: pre-built checkout UI with full control over branding, forms, and flow. Use this when you want Yuno to render the checkout experience while you manage customer and checkout session creation on your backend.

Step 1: Include the library in your project

Follow the steps in Include the library in your project above.

Step 2: Initialize the SDK

After including the library (step 1), initialize the SDK. See Quickstart guide for initialization.

Step 3: Start the checkout process

Use the await yuno.startCheckout() function to start the checkout process with the necessary parameters. See Parameters for all options. For styling, themes, and additional configurations, see SDK customizations.
By default, Yuno SDK renders as a modal. You can specify the element where the SDK will render. See Render mode for details. For all APMs (Google Pay, Apple Pay, PayPal), onPaymentMethodSelected triggers when the customer chooses the payment method (before the payment flow begins). Define onPaymentMethodSelected in await yuno.startCheckout() before await yuno.mountCheckout(). For PayPal, the payment sheet opens immediately after selection—no extra confirmation click required.

Step 4: Mount the SDK

Display the payment methods:

Step 5: Initiate the payment process

Call await yuno.startPayment() to initiate the payment flow after the user selects a payment method:

Step 6: Get the OTT (one-time token)

After the customer fills out the requested data in Yuno’s payment forms, the SDK provides the one-time token. The configuration function yunoCreatePayment(oneTimeToken) is then triggered with the one-time token.
You can also use tokenWithInformation to receive additional information provided by the customer in the checkout, such as installments or document type/number:
Use Yuno’s default loader or implement your own with the required configuration.

Step 7: Create the payment

Create a payment using the Create Payment endpoint. The merchant’s backend should call this endpoint to create the payment in Yuno using the one-time token and checkout session. After Step 6, the basic payment flow is implemented. Test using the checkout session and one-time token. For additional features, see Complementary features. Required: After creating a payment, integrate the continuePayment method. When the API response sets sdk_action_required to true, call await yuno.continuePayment() to present the necessary screens. Card payments that come back DECLINED or ERROR also require calling continuePayment to run payment retry (keeps the card form open with the decline shown); if neither of those applies, call unmountSdk to clean up. See Payment retry for details.

continuePayment return value or null

For payment methods that require merchant-side action (e.g., when the payment provider requires a redirect URL in a webview), the await yuno.continuePayment() method returns either an object with the following structure or null:
When the method returns an object, you can handle your application’s payment flows that require custom redirect handling. When it returns null, no additional merchant-side action is needed.

Complementary features

For styling, themes, form options, and additional configurations, see SDK customizations. Changelog.

Common reference

For full parameter and customization details, see the Web SDK Common Reference.