Get started integrating the Paysight Widget SDK in minutes. This guide covers the minimal setup for most use cases. For advanced configuration, see the Configuration Guide and Styling Guide.
Add the SDK to your page
<head>
component.Create a container
Initialize the widget
productId
with your actual product ID from your Paysight account.amount
should be a decimal (e.g. 1.00 for $1.00).country
is always required (two-letter code, uppercase, e.g. US
or UK
).state
is required for US transactions (two-letter code, e.g. CA
).Use a real zip code for best approval rates.Email is not required in fields
if provided in the customer
object.threeDSRequired
should be set to false
by default. Set to true
for non-US MIDs.locale
must be in the format xx-XX
(e.g. en-US
, fr-FR
| 'language'
-'COUNTRY'
).Handle payment events
Example of a failed Payment Event Payload
message.payload
object.message.payload
object. This gives you access to all transaction, customer, and card details for debugging.Update customer data (if needed)
customer
object (fields are hidden and prefilled), or collect data from the user using the fields
array.You can also mix both—prefill some fields and collect others.customer
object, you do not need an email field in fields
. The payment button will be enabled as long as a valid email is present in either source.Use test mode
'sandbox'
for testing:Use Test Cards in Sandbox
Check your test transactions