Configuration Guide
Learn how to configure the PaySight Widget for your specific needs
Widget Configuration
Core Configuration Options
Required Parameters
Your PaySight product ID that identifies your merchant account and product configuration.
A unique identifier for the payment session. This should be unique for each payment attempt.
The payment amount in cents. For example, $29.99 would be represented as 2999.
The environment to run the widget in. Use ‘sandbox’ for testing and ‘production’ for live payments.
Required Form Fields
An array of field configuration objects that define form fields. Must include an email field.
Semi-Required Customer Data
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.
Optional Parameters
Enable 3D Secure authentication for the payment. Recommended for enhanced security.
Enable ecommerce mode with additional fields for shipping and billing information.
Set the language and region for the widget interface.
The currency code for the payment. Must be a valid ISO 4217 currency code.
Custom text for the payment button. Use this to match your brand voice or specific action.
Override the merchant ID for the payment. Requires special permissions.
Additional custom data to include with the payment. Useful for tracking and analytics.
PaySight Tracking Parameters
PaySight campaign identifier for tracking marketing campaigns and their performance.
PaySight affiliate identifier for tracking specific affiliate partners.
PaySight sub-affiliate identifier for more granular affiliate tracking.
PaySight tracking click identifier for detailed click tracking and attribution.
Generic click identifier for tracking ad campaigns or affiliate links from any source.
Google Click Identifier (gclid) for tracking Google Ads clicks and conversions.
Web BRAID identifier for Google Ads tracking in browsers with limited third-party cookies.
Google BRAID identifier for app conversion tracking and attribution.
Use Cases for Additional Data
- Campaign Tracking: Track specific marketing campaigns and their performance
- Affiliate Management: Monitor affiliate and sub-affiliate performance
- Click Attribution: Track the source of conversions with click IDs
- Google Ads Tracking: Track conversions from Google Ads campaigns using gclid, wbraid, and gbraid
- Custom Analytics: Include additional metadata for reporting and analysis
Customer Data Pre-filling
Pre-fill customer information to streamline the checkout process. This will populate the corresponding form fields.
Theme Customization
Customize the widget appearance to match your brand.
Custom Form Fields
An array of field configuration objects that define custom form fields.
Each field object supports the following properties:
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 inputcountry
- 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.
Feature-Specific Configuration
Ecommerce Mode is designed for online shopping carts and product purchases. It displays a summary of the purchase including product details, quantity, and total amount.
Key Features
- Product summary display
- Quantity indicator
- Price breakdown
- Order total calculation
The ecom
flag enables ecommerce-specific features and optimizations:
When enabled, this flag:
- Optimizes the payment flow for ecommerce transactions
- Enables additional ecommerce-specific validations
- Adjusts the UI for better integration with shopping cart experiences
Ecommerce Mode is designed for online shopping carts and product purchases. It displays a summary of the purchase including product details, quantity, and total amount.
Key Features
- Product summary display
- Quantity indicator
- Price breakdown
- Order total calculation
The ecom
flag enables ecommerce-specific features and optimizations:
When enabled, this flag:
- Optimizes the payment flow for ecommerce transactions
- Enables additional ecommerce-specific validations
- Adjusts the UI for better integration with shopping cart experiences
You can customize the text displayed on the payment button to better match your brand voice or the specific action being taken.
Default Button Text
By default, the payment button displays “Pay Now” or its localized equivalent based on the selected locale.
You can customize the text displayed on the payment button using the buttonText
property:
This allows you to:
- Match the button text to your specific use case (e.g., “Subscribe”, “Donate”, “Pay Now”)
- Maintain consistent language across your application
- Improve conversion rates with action-oriented text
For advanced use cases, you can override the default merchant ID using the midOverride
property:
This feature is useful for:
- Multi-merchant platforms
- White-label solutions
- Testing specific merchant configurations
Complete Configuration Example
Configuration Best Practices
Include Required Email Field
Always include an email field in your form configuration, even if you’re pre-filling it with customer data.
Validate Required Fields
Always ensure all required fields are provided with valid values.
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 Cards in Sandbox
When testing in the sandbox environment, use specific test cards to simulate various payment scenarios:
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
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