Skip to main content
All options are passed in the config object of PaySightSDK.createWidget.
amount uses decimal major units (29.99). productId is a number. When shopify is set, pass amount: 0 — totals are computed from cart lines.

Required fields

productId
number
required
Paysight product ID from your dashboard.
sessionId
string
required
Unique idempotency key per checkout attempt (you generate this).
amount
number
required
Charge amount in decimal currency units. Ignored when shopify is set (use 0).
environment
'sandbox' | 'production'
required
sandbox for testing, production for live payments.

Customer and fields

customer
CustomerMetadata
Optional prefill — values merged into the form and payment request. Does not replace visible fields.
FieldType
emailstring
phonestring
firstNamestring
lastNamestring
addressstring (street)
citystring
statestring
zipstring
countrystring (two-letter ISO, required for many flows)
fields
FieldConfig[]
Form layout — inputs rendered in the iframe. Product requirements determine the minimum set.
{
  label: string;
  placeholder: string;
  fieldType: 'name' | 'phone' | 'address' | 'city' | 'state' | 'zip' | 'email' | 'country' | 'divider';
  position: 'above' | 'below';  // relative to card form
  size: 'full' | 'half';
}
disabledCardTypes
CardType[]
Card brands to hide. Values: visa, mastercard, american-express, discover, diners, jcb, maestro, unionpay.

3D Secure

threeDSRequired
boolean
Require 3DS when supported.
cancelOnThreeDSFailure
boolean
Cancel payment when 3DS fails.
failOnThreeDSChallenge
boolean
Treat 3DS challenge as failure.
Per-upsell overrides: upsell.threeDSRequired, upsell.cancelOnThreeDSFailure, upsell.failOnThreeDSChallenge.

Saved payment & upsell

savePaymentMethod
boolean
On checkout, ask the API to store the payment method for a later charge. Works on card, Apple Pay, and Google Pay.
usePreviousPaymentMethod
boolean
Charge using the stored method. Requires upsell.initialPaymentSession (the paysightSession from page 1).
upsell
UpsellConfig
Page-2 upsell configuration. Active when both upsellId and initialPaymentSession are set.
{
  upsellId: string;
  initialPaymentSession: string;  // paysightSession from PAYMENT_SUCCESS
  upsellButton?: { text?: string; style?: StyleObject };
  threeDSRequired?: boolean;
  cancelOnThreeDSFailure?: boolean;
  failOnThreeDSChallenge?: boolean;
}

External pay button

hidePaymentButton
boolean
Hide in-iframe Pay and Upsell buttons. Call submitPayment() or submitUpsell() from the host page.
singlePurchase
boolean
When true, charge as one-time purchase without subscription. Update at runtime via widget.update({ singlePurchase: true }).

Shopify cart

shopify
ShopifyConfig
Shopify-style cart checkout. Totals computed from line items.
{
  showCart?: boolean;       // default true
  disableWallets?: boolean;
  optIn?: boolean;
  cart: [{
    quantity: number;
    variant: number;        // Shopify variant ID
    product: number;        // Shopify product ID
    price: number;
    name: string;
    description?: string;
    imageUrl?: string;
    discountCodeAmount?: number;
  }];
  shipping?: { product: number; name: string; price: number };
}

Wallets

showOnlyWalletMethods
boolean
Hide card form when a configured wallet is available; falls back to full UI on error, timeout, or misconfiguration.
applePayEnabled
boolean
Enable Apple Pay (button renders on host page via applePayContainerId).
applePayOptions
object
applePayMerchantId (required), optional style (buttonStyle, buttonType, borderRadius, size).
googlePayEnabled
boolean
Enable Google Pay (host-page container via googlePayContainerId).
googlePayOptions
object
googlePayMerchantId (required), optional style (buttonStyle, buttonType, borderRadius, size, locale).

Presentation

theme
WidgetTheme
font (Google Fonts URL) and css (class overrides on supported .ps-* classes). See Styling guide.
locale
SupportedLocale
UI locale. Default en-US. See SDK for full list (19 locales).
currency
SupportedCurrency
Display currency. Default USD.
buttonText
string
In-iframe pay button label.
paymentSuccess
{ title?: string; description?: string }
Custom success screen copy.
ecom
boolean
default:"false"
Mark the payment as ecommerce. When true, sent to the API on card, wallet, and upsell payment paths.

Tracking & attribution

data
Record<string, string>
Arbitrary key-value pairs sent with payment requests (affiliate IDs, UTM params, landing URL, etc.). See Tracking & attribution.

Advanced

midOverride
string
Override default MID routing (account-specific).