Skip to main content
The Activate Card widget allows your customers to activate their physical card by entering the card number (PAN) and security code (CVV).
Activate Card

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.
Widget tokens expire after 5 minutes and are scoped to a specific card. Generate a new token on each page load or when the user initiates a new activation.

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:
Available custom label keys:
  • widgetTitle - Widget header text
  • cardNumberLabel - Card number field label
  • securityCodeLabel - CVV field label
  • cardPanPlaceholder - Card number placeholder
  • cardCvvPlaceholder - CVV placeholder
  • submitButtonText - Submit button text
  • submitLoadingText - 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).
error fires only during widget initialization (e.g., a secure input field failed to load). If the widget loads successfully but the user’s submission fails — incorrect PAN, wrong CVV, expired token — that triggers failure, not error.
You can listen for events using either 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.
The load and error events are mutually exclusive — exactly one will fire during widget initialization. Always listen for both to handle all scenarios.

Success and Failure Events

Dispatched after the user submits the activation form. Common failure 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.

Complete Example