PaySightSDK.createWidget
Returns
| Method | Description |
|---|---|
update(updates) | Merge partial config at runtime |
submitPayment() | Trigger card/wallet checkout |
submitUpsell() | Trigger upsell charge (usePreviousPaymentMethod mode) |
subscribe(handler) | Add onMessage listener; returns unsubscribe function |
destroy() | Tear down iframe and listeners |
submitPayment / submitUpsell
Use when hidePaymentButton: true or when you want a host-controlled CTA.
Calling
submitPayment() during upsell mode (or submitUpsell() during checkout) emits ERROR with code INVALID_MODE.update
CONFIG_UPDATE. Listen for CONFIG_UPDATE_SUCCESS.
subscribe
CDN script
PaySightSDK.createWidget.
Use environment: 'sandbox' or environment: 'production' in config to target the matching widget endpoint.