Comprehensive API reference for the Paysight Widget SDK, including methods, types, configuration, events, errors and usage examples.
Section | What’s Covered |
---|---|
Core API | Widget instantiation and main methods |
Configuration | WidgetConfig options, types, and parameters |
Events & Messages | Supported event types and message structure |
State Management | Widget state and lifecycle |
Error Handling | Error types, codes, and best practices |
Usage Examples | Integration, customization, and error flows |
createWidget
, WidgetOptions
and Widget
WidgetConfig
Event Type | Description |
---|---|
READY | The widget has fully loaded and is ready for user input or payment initiation. |
DESTROY | The widget has been removed from the page and its resources have been cleaned up. |
PAYMENT_START | A payment process has begun, typically after the user submits the payment form. |
PAYMENT_SUCCESS | The payment was successfully authorized and completed. |
PAYMENT_ERROR | There was an error processing the payment e.g., decline, network, or system error. |
PAYMENT_3DS_START | 3D Secure authentication flow has started for the payment (if required/available). |
PAYMENT_3DS_SUCCESS | 3D Secure authentication completed successfully. |
PAYMENT_3DS_ERROR | An error occurred during the 3D Secure authentication process. |
PAYMENT_3DS_FAILURE | 3D Secure authentication failed (user challenge failed or was rejected). |
VALIDATION_ERROR | The user’s input did not pass validation (fields missing or formatted incorrectly). |
NETWORK_ERROR | The widget could not complete a server request due to network connectivity problems. |
onError
callback to handle errors and integrate with your app’s UI/UX.
pattern
and an error message
for extra input checks.