
Step 1: Load the Widget Script
Load the Activate Card widget script into your page by adding the following script tag:Step 2: Get a Widget Token
Request a widget token from your backend using the Synctera API. The widget token is required for the widget to authenticate and submit data.Step 3: Add the Widget Component
Add the<activate-card> web component to your page:
Configuration Options
Custom Labels
Customize the labels displayed in the widget:widgetTitle- Widget header textcardNumberLabel- Card number field labelsecurityCodeLabel- CVV field labelcardPanPlaceholder- Card number placeholdercardCvvPlaceholder- CVV placeholdersubmitButtonText- Submit button textsubmitLoadingText- Loading state text
Event Handling
The widget dispatches lifecycle events across two phases:load— Widget initialized successfully, all fields are ready for user input.error— Widget failed to initialize (field load failure, network error, or timeout).success— Card activation completed successfully.failure— Card activation failed (incorrect card number, wrong CVV, expired widget token, or API error).
addEventListener or callback properties:
Load Event
Dispatched when all secure input fields have loaded and the widget is fully functional. Use it to hide loading UI or enable dependent controls.Error Event
Dispatched when the widget fails to initialize. This means one or more secure input fields could not load, and the widget is not functional. Show an error message or retry UI to the user.Success and Failure Events
Dispatched after the user submits the activation form. Commonfailure reasons include incorrect card number, wrong CVV, and expired widget token.
The success event exposes only non-sensitive status metadata:
PAN and CVV are never included in host-page event details.

