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, watchonMessage 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:| Area | Purpose |
|---|---|
| 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
Scenario — preset-specific controls
Scenario — preset-specific controls
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.Setup — shared checkout controls
Setup — shared checkout controls
Events — live message log
Events — live message log
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.Config — active WidgetConfig JSON
Config — active WidgetConfig JSON
Read-only snapshot of the config sent to the iframe, including overrides from the control panels.
Code — copy-paste embed
Code — copy-paste embed
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:| Preset | Open | Category |
|---|---|---|
| Basic checkout | ?preset=basic | Start |
| Full configuration | ?preset=full | Start |
| Custom fields | ?preset=fields | Checkout UX |
| Custom styling | ?preset=theming | Checkout UX |
| Single purchase toggle | ?preset=single-purchase | Checkout UX |
| 3D Secure | ?preset=three-ds | Risk |
| Apple Pay | ?preset=apple-pay | Wallets |
| Google Pay | ?preset=google-pay | Wallets |
| Apple Pay + Google Pay | ?preset=both-wallets | Wallets |
| Shopify cart checkout | ?preset=shopify | Funnels |
| Saved payment & upsell | ?preset=upsell | Funnels |
| External payment button | ?preset=external-button | Funnels |
Start
Basic checkout
Open basic preset
Minimum viable embed — start here.
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_SUCCESSin Events
productId, sessionId, amount, customer, fields
Guide: Quickstart
Full configuration
Open full preset
Kitchen-sink reference config.
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
fields, threeDSRequired, ecom, data, theme, paymentSuccess
Guide: Configuration reference
Checkout UX
Custom fields
Open fields preset
Compose a
fields array interactively.ecom and custom buttonText.
Try in the playground:
- Add/remove field types in Scenario
- Change size and position per field
- Enable
ecomand custom button label
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..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.cssblock from Code
theme.css, buttonText, paymentSuccess
Guide: Styling guide
Single purchase toggle
Open single-purchase preset
Host checkbox →
widget.update({ singlePurchase }).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_SUCCESSandsinglePurchasein Config
singlePurchase, hidePaymentButton, submitPayment()
Guide: External payment button
Risk
3D Secure
Open 3DS preset
Sandbox 3DS with configurable failure handling.
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_START→PAYMENT_3DS_SUCCESS(or error events) in Events
threeDSRequired, cancelOnThreeDSFailure, failOnThreeDSChallenge
Guide: 3DS via widget
Wallets
Apple Pay
Open Apple Pay preset
Parent-hosted Apple Pay button.
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-slotmarkup - Test on Safari with Apple Pay configured
applePayContainerId, applePayEnabled, applePayOptions
Guide: Apple Pay via widget
Google Pay
Open Google Pay preset
Parent-hosted Google Pay button.
googlePayContainerId and googlePayOptions.
Try in the playground:
- Tune button appearance in Scenario
- Submit via Google Pay and watch for optional
PAYMENT_3DS_START
googlePayContainerId, googlePayEnabled, googlePayOptions
Guide: Google Pay via widget
Apple Pay + Google Pay
Open both-wallets preset
Dual wallets with wallet-only layout.
showOnlyWalletMethods to hide the card form when a wallet is available.
Try in the playground:
- Toggle Wallet-only in Scenario
- Watch
WALLET_FORM_LAYOUTandHEIGHT_CHANGEin Events as the layout switches
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.
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
showCartto hide the in-iframe cart summary - Watch
CART_READYandCART_UPDATEevents
shopify.cart, shopify.shipping, showCart, disableWallets, amount: 0
Guide: Shopify cart checkout
Saved payment & upsell
Open upsell preset
Two-phase checkout → upsell handoff.
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
paysightSessionfrom Events (PAYMENT_SUCCESSpayload) - Switch to Upsell — the playground captures the session automatically
- Submit the upsell and confirm
PAYMENT_SUCCESSwithmode: 'upsell'
savePaymentMethod, paysightSession, usePreviousPaymentMethod, upsell
Guide: Saved payment & upsell
External payment button
Open external-button preset
Host-rendered pay CTA with optional upsell.
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_PAYMENTandREADYin Events
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.