Documentation Index
Fetch the complete documentation index at: https://docs.paysight.io/llms.txt
Use this file to discover all available pages before exploring further.
Widget Configuration
The Paysight Widget is highly configurable to meet your business needs. This guide covers required parameters, customer data handling, optional settings, and best practices for a robust integration.Required Parameters
Your Paysight product ID that identifies your merchant account and product configuration.
7900 can be used for testing purposes.A unique identifier for the payment session. This should be unique for each payment attempt.
The payment amount in the selected currency.
1.00 = $1.00 is the default value for testing or a specified amount for live testing (e.g. 14.99 = $14.99).The environment to run the widget in. The options are ‘production’ and ‘sandbox’.
Semi-Required Customer Data
The following customer fields are semi-required. They can be provided either via the
customer object or as fields in the fields array.Customer’s first name. Can be provided via customer object or a name field.
Customer’s last name. Can be provided via customer object or a name field.
Customer’s state/province. Can be provided via customer object or a state field.
Customer’s country code (e.g., ‘US’). Can be provided via customer object or a country field.
This string is only required if the country is US.
Optional Parameters
Enable 3D Secure authentication for the payment. Recommended for enhanced security.
Do not display 3DS challenge if set to true. Proceed to payment without 3DS.
Cancel the payment if the 3DS not successfully completed.
Enable ecommerce mode. This is used if the payment is for a ecommerce product.
Set the language and region for the widget interface.
The currency code for the payment. Must be a valid ISO 4217 currency code.Supported currencies:
USD, EUR, GBP, JPY, AUD, CAD, CHF, CNY, HKD, NZD, SEK, KRW, SGD, NOK, MXN, INR, RUB, ZAR, TRY, BRL, TWD, DKK, PLN, THB, IDR, HUF, CZK, ILS, CLP, PHP, AED, COP, SAR, MYR, RONCustom text for the payment button. Use this to match your brand voice or specific action.
UI theme customization options to match your brand. Includes font, colors, and styling.
Override the merchant ID for the payment. Requires special permissions.
Payment success message configuration. After successful payment, a payment complete message is shown with a title and description.
Custom title for the payment success message. Overrides the default “Payment Successful” text.
Custom description for the payment success message. Overrides the default “Thank you for your business” text.
Enable or disable Apple Pay for the widget.
Apple Pay configuration options for enabling Apple Pay payments.
Apple Pay merchant identifier (per merchant account). This is the merchant ID registered with Apple Pay. Currently required, will be optional in v2.
Optional styling for the Apple Pay button.
Button style:
black, white, or white-outline.Button type:
pay, buy, donate, etc.Border radius in pixels.
Enable Google Pay. The Google Pay button is mounted on the host page above the iframe (parent-hosted). See Google Pay via Widget.
Google Pay configuration when
googlePayEnabled is true.Google Pay merchant identifier (from Paysight). Required when Google Pay is enabled.
Optional styling for the Google Pay button.
Button style for the hosted Google Pay button.
Button type, e.g.
pay, checkout.Border radius in pixels.
Optional locale for the Google Pay button.
When
true, the checkout can show only Apple Pay and/or Google Pay (wallet buttons on the host page) and hide the card form, custom fields, and primary pay button inside the iframe—plus hide the horizontal “OR” divider—if at least one configured wallet is available. If no wallet is usable, readiness times out, or a wallet payment fails, the widget falls back to the full card UI. User cancellation of the wallet sheet does not by itself expand the card form.Requires applePayEnabled / applePayOptions and/or googlePayEnabled / googlePayOptions to be fully set when you want wallet-only mode.For a focused walkthrough (layout, fallbacks, code sample), see Wallet-only checkout.
Developer-only flag for extra diagnostics in some flows. Do not enable in production unless directed by Paysight.
Disable specific card types from being used in the payment.Supported values:
visamastercardamerican-expressdiscoverdinersjcb
Additional custom data to include with the payment. Useful for tracking and analytics.
Wallet buttons on the host page
Apple Pay and Google Pay render outside the iframe. When you enable either wallet in
config, also supply container ids to createWidget (vanilla) or to the React <Widget /> component:applePayContainerId— default slot idapple-pay-slotgooglePayContainerId— default slot idgoogle-pay-slot
Fields Configuration
Thefields parameter allows you to customize the form fields displayed in the widget. This is useful for collecting additional information from customers or customizing the checkout experience.
An array of field configuration objects that define custom form fields.
The label text displayed to the user.
Placeholder text shown in the input field when empty.
The type of field to display. Supported values:
email- Email address input with validation (required)name- Name input fieldphone- Phone number input with formattingaddress- Street address inputcity- City inputstate- State/province inputzip- Postal/ZIP code input
It is recommended to put a real ZIP code if you were to test live MIDs due to Address Verification Service (AVS) check, which is a fraud prevention measure used for processing credit card transactions.
country- Country selection dropdowntext- Generic text inputdivider- Visual divider (not an input field)
Label position relative to the input field. Options:
above or below.Field width within the form. Options:
full, half, or third.Whether the field is required to be filled before submission.
Theme Configuration
Thetheme parameter allows you to customize the appearance of the widget to match your brand.
Object containing theme customization options.
URL to a custom font to use in the widget. We currently support Google Fonts only. This is a beta feature.
Base theme to use. Options:
light or dark.Custom CSS properties for different widget elements.
See the Styling Guide for detailed theme customization options.
Additional Data
Thedata parameter allows you to include custom data with the payment transaction, which is useful for tracking and analytics.
An object containing additional data to associate with the payment.
Google tracking parameters (
gclid, wbraid, and gbraid) are automatically captured from URL parameters when available, but can also be manually specified.Feature-Specific Configuration
- Merchant ID Override
Complete Configuration Example
Full HTML Example
Full HTML Example
Configuration Best Practices
Use Unique Session IDs
Generate a unique session ID for each payment attempt to prevent duplicate charges and ensure proper tracking.
Implement Error Handling
Always provide an
onError handler to catch and respond to configuration errors.Test Configuration Changes
When updating configuration dynamically, test all possible combinations to ensure a smooth user experience.
Use test card numbers
In Sandbox mode, you can use specific test cards to simulate various real-life scenarios. These cards can be used with any valid expiry date and CVV.
- Basic Testing
- NMI Test Cards PANs
- 3DS Challenge Flow
- 3DS Successful Frictionless
- 3DS Failed Frictionless
- 3DS Attempted Auth
Successful Payment
Card: 4242 4242 4242 4242
Expiry: Any future date
CVV: Any 3 digits
Failed Payment
Card: 4000 0000 0000 0002
Expiry: Any future date
CVV: Any 3 digits
When prompted for 3DS authentication in test mode, use any value to complete the process.
Next Steps
Wallet-only checkout
Hide the card form and lead with Apple Pay and/or Google Pay.
Event Handling
Understand how to handle widget events for a complete integration.
Google Pay via Widget
Parent-hosted Google Pay setup and testing.
Styling Guide
Learn how to customize the widget appearance to match your brand.
Localization Guide
Implement multi-language support for global customers.