Skip to main content

Widget playground

The Paysight Widget Playground is a public, interactive sandbox at payment.paysight.io/demo. Switch between 12 presets, tune config in real time, watch onMessage events, and copy a vanilla PaySightSDK.createWidget({...}) snippet that matches what you see on screen.

Open playground

Launch the full demo at payment.paysight.io/demo.
All presets use environment: 'sandbox'. The playground uses a shared sandbox product for demos — replace productId with your numeric product ID when you integrate.

Layout

The playground has three main areas:
AreaPurpose
Preset navigator (left)Jump between integration scenarios grouped by category
Checkout preview (center)Live widget iframe, order summary, and host-page controls (external pay button, upsell tabs, terms checkbox, etc.)
Inspector panel (right)Five tabs — Scenario, Setup, Events, Config, Code

Inspector tabs

Options that change per preset: field builder, 3DS strategy, theme presets, wallet toggles, Shopify cart settings, or host-flow controls. Updates apply immediately via widget.update() where possible.
Amount, currency, locale, customer prefill, tracking data rows, card-brand filters, and payment-success copy. Available on most presets.
Last 60 onMessage events with timestamps and payloads. Expected events for the active preset are highlighted. Use Reset session in the header for a fresh sessionId.
Read-only snapshot of the config sent to the iframe, including overrides from the control panels.
Generated vanilla HTML/JS using https://payment.paysight.io/widget-sdk.js. Wallet presets include applePayContainerId / googlePayContainerId when enabled.

Preset index

Quick links — each URL opens the playground with that preset loaded:
PresetOpenCategory
Basic checkout?preset=basicStart
Full configuration?preset=fullStart
Custom fields?preset=fieldsCheckout UX
Custom styling?preset=themingCheckout UX
Single purchase toggle?preset=single-purchaseCheckout UX
3D Secure?preset=three-dsRisk
Apple Pay?preset=apple-payWallets
Google Pay?preset=google-payWallets
Apple Pay + Google Pay?preset=both-walletsWallets
Shopify cart checkout?preset=shopifyFunnels
Saved payment & upsell?preset=upsellFunnels
External payment button?preset=external-buttonFunnels

Start

Basic checkout

Open basic preset

Minimum viable embed — start here.
What it demonstrates: product ID, session ID, amount, optional customer prefill, and a single email field. Try in the playground:
  • Edit customer prefill under Setup and watch the iframe update
  • Change amount, currency, or locale
  • Submit a sandbox payment and inspect PAYMENT_SUCCESS in Events
Key config: productId, sessionId, amount, customer, fields Guide: Quickstart

Full configuration

Open full preset

Kitchen-sink reference config.
What it demonstrates: every common option in one place — full field set, 3DS flags, ecom, tracking data, theme.css, and custom payment-success copy. Try in the playground:
  • Toggle 3DS and risk flags under Scenario
  • Adjust theme CSS and success messaging
  • Compare the Config tab with the Code tab output
Key config: fields, threeDSRequired, ecom, data, theme, paymentSuccess Guide: Configuration reference

Checkout UX

Custom fields

Open fields preset

Compose a fields array interactively.
What it demonstrates: which inputs appear in the iframe, half vs full width, above vs below the card form, plus optional ecom and custom buttonText. Try in the playground:
  • Add/remove field types in Scenario
  • Change size and position per field
  • Enable ecom and custom button label
Key config: fields, fieldType, position, size, buttonText, ecom Events to watch: FIELD_CHANGE, FIELD_BLUR, CONFIG_UPDATE_SUCCESS Guide: Configuration guide

Custom styling

Open theming preset

Theme presets via theme.css.
What it demonstrates: CSS overrides for .ps-widget, inputs, submit button, and optional success-screen copy. Try in the playground:
  • Switch theme presets in Scenario
  • Edit accent color, border radius, and spacing
  • Copy the generated theme.css block from Code
Key config: theme.css, buttonText, paymentSuccess Guide: Styling guide

Single purchase toggle

Open single-purchase preset

Host checkbox → widget.update({ singlePurchase }).
What it demonstrates: a host-rendered pay button (hidePaymentButton: true) with a subscription checkbox that calls widget.update() before submitPayment(). Try in the playground:
  • Toggle Include subscription add-on under host controls
  • Accept terms, then pay from the external button
  • Confirm CONFIG_UPDATE_SUCCESS and singlePurchase in Config
Key config: singlePurchase, hidePaymentButton, submitPayment() Guide: External payment button

Risk

3D Secure

Open 3DS preset

Sandbox 3DS with configurable failure handling.
What it demonstrates: threeDSRequired, cancelOnThreeDSFailure, and failOnThreeDSChallenge — the flags that control challenge and failure behavior. Try in the playground:
  • Pick a 3DS strategy preset in Scenario (required, optional, cancel on failure, etc.)
  • Pay with an Evervault sandbox card that triggers a challenge
  • Watch PAYMENT_3DS_STARTPAYMENT_3DS_SUCCESS (or error events) in Events
Key config: threeDSRequired, cancelOnThreeDSFailure, failOnThreeDSChallenge Guide: 3DS via widget

Wallets

Apple Pay

Open Apple Pay preset

Parent-hosted Apple Pay button.
What it demonstrates: applePayEnabled, applePayOptions, and host applePayContainerId on createWidget. Try in the playground:
  • Adjust wallet button style, height, and border radius in Scenario
  • Confirm the Code tab includes #apple-pay-slot markup
  • Test on Safari with Apple Pay configured
Key config: applePayContainerId, applePayEnabled, applePayOptions Guide: Apple Pay via widget

Google Pay

Open Google Pay preset

Parent-hosted Google Pay button.
What it demonstrates: same host-button pattern as Apple Pay with googlePayContainerId and googlePayOptions. Try in the playground:
  • Tune button appearance in Scenario
  • Submit via Google Pay and watch for optional PAYMENT_3DS_START
Key config: googlePayContainerId, googlePayEnabled, googlePayOptions Guide: Google Pay via widget

Apple Pay + Google Pay

Open both-wallets preset

Dual wallets with wallet-only layout.
What it demonstrates: both wallet buttons on the host page, plus showOnlyWalletMethods to hide the card form when a wallet is available. Try in the playground:
  • Toggle Wallet-only in Scenario
  • Watch WALLET_FORM_LAYOUT and HEIGHT_CHANGE in Events as the layout switches
Key config: applePayEnabled, googlePayEnabled, showOnlyWalletMethods, WALLET_FORM_LAYOUT Guide: Wallet-only checkout

Funnels

Shopify cart checkout

Open Shopify preset

Line-item cart totals with optional cart UI.
What it demonstrates: shopify mode with amount: 0, cart line items, shipping, wallet buttons, and toggles for cart visibility and wallet availability. Try in the playground:
  • Change item quantities, discount, and shipping price in Scenario
  • Toggle showCart to hide the in-iframe cart summary
  • Watch CART_READY and CART_UPDATE events
Key config: shopify.cart, shopify.shipping, showCart, disableWallets, amount: 0 Guide: Shopify cart checkout

Saved payment & upsell

Open upsell preset

Two-phase checkout → upsell handoff.
What it demonstrates: page 1 saves the payment method (savePaymentMethod: true); page 2 charges an add-on via usePreviousPaymentMethod and upsell.initialPaymentSession (the paysightSession from page 1). Try in the playground:
  • Complete checkout on the Checkout tab
  • Copy paysightSession from Events (PAYMENT_SUCCESS payload)
  • Switch to Upsell — the playground captures the session automatically
  • Submit the upsell and confirm PAYMENT_SUCCESS with mode: 'upsell'
Key config: savePaymentMethod, paysightSession, usePreviousPaymentMethod, upsell Guide: Saved payment & upsell

External payment button

Open external-button preset

Host-rendered pay CTA with optional upsell.
What it demonstrates: hidePaymentButton: true so the iframe collects card data only; your page calls submitPayment() or submitUpsell() after READY. Includes terms checkbox gating and the same upsell flow as above. Try in the playground:
  • Agree to terms, then click the host Pay button
  • Walk through checkout → upsell using the tab controls
  • Inspect SUBMIT_PAYMENT and READY in Events
Key config: hidePaymentButton, submitPayment(), submitUpsell(), READY Guide: External payment button

Static copy-paste examples

The playground is the best way to explore config. These pages provide full standalone HTML/JS you can drop into a project:

Basic integration

Simple embed with event handling.

Saved payment & upsell

Two-page checkout handoff.

External button

Host-controlled pay CTAs.

Shopify two-page

Cart checkout and cart upsell.

3DS integration

Full 3DS event handling.

Custom styling

Theme CSS walkthrough.