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
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, withonReady,onSuccess,onFailure,onUnavailableandonIntentcallbacks.- 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
onIntenthandler; the script never navigates on them.
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.