SUQODocs
User GuideAPI ReferenceSDKs

Checkout JS SDK

Official SUQO drop-in script for rendering the checkout inline on any web page.

Collect a SUQO payment inline on any web page, with one <script> tag and one <div>. Your backend creates a checkout session through SUQO's API and hands the buyer its id; this script mounts SUQO's own payment block for that id, keeps it the right height, and reports exactly one outcome per attempt.

Source: github.com/suqo-ai/suqo-checkout-js · Script: suqo-checkout.js · v0.1.0

No credential in the page. The script makes no SUQO API calls of its own and holds no API key. The session id is the only thing it knows — single-use, short-lived, and carrying no buyer details — so nothing sensitive and nothing long-lived ever sits in your page.

Install

There is nothing to install. Load the script from the SUQO environment your checkout sessions are created in — sandbox and live are served from different hosts:

<!-- Sandbox (test data) -->
<script src="https://test.suqo.ai/suqo-checkout.js"></script>

<!-- Live -->
<script src="https://app.suqo.ai/suqo-checkout.js"></script>

Load one, not both. The script and the session must come from the same environment: a sandbox session opened through the live script reports onUnavailable('not-found'). See Choosing the environment.

One file, no build step, no dependencies, ES5, and one global: SuqoCheckout. Every style is inlined on the elements it creates, so your CSS cannot restyle the block's chrome and the chrome cannot leak styles into your page.

What's included

  • SuqoCheckout — one global that renders the payment block inline, with onReady, onSuccess, onFailure, onUnavailable and onIntent callbacks.
  • Automatic mounting — the block mounts on load and re-scans on DOM changes, so SPA routes, lazy sections and CMS widgets need no extra step.
  • Exactly one outcome per attempt — the result can arrive by more than one path; the first delivery latches and the rest are dropped.
  • Environment from the host — the script builds its frame URL from the host it was loaded from, so going live is a one-word change to the src.
  • Deeplinks handed to you — bank and wallet deeplinks reach your onIntent handler; the script never navigates on them.
The session must already have a customer. There is no buyer-detail attribute or option. A session created without a customer reports onUnavailable('no-customer'). Assign the customer on your backend, through the checkout-session API, before the id reaches the browser.

Next

  • Usage guide — quick start, environments, placement, outcomes, options and troubleshooting.
  • Changelog — what shipped.

On this page