Quick start
- Add
<script src="https://widgets-sandbox.synctera.com/assets/activate/activate_v1.0.1.js"></script>to your page. - Embed the Card Activation widgets when and as needed (both the card-pan and card-cvv widgets are needed):
- Add your own submit button under the Card Activation widgets.
- Listen for the
validityevent on the Controller Card Activation widget (the one with the id): - Have the button call
activationWidget.submit()to activate the card.It returns a promise, which resolves if the activation submission was successful, or rejects if it failed.
Basic Example:
Environments
- Sandbox: https://widgets-sandbox.synctera.com/assets/activate/activate_v1.0.1.js
- Production: https://widgets.synctera.com/assets/activate/activate_v1.0.1.js
Browser support
The widgets work on both mobile and desktop, and we ensure support for all modern browsers. It also works in many older browsers, which we try to support where feasible.Card Activation flow
Summary Fetch widget token from backend → Render widgets with token → Listen for “validity” event → User submits controller widget → Widget submits PAN & CVV to Synctera → And returns success or failure → Widget auto-destroys
Note: It is recommended to also add ‘load’ and ‘error’ listeners for UI management (see Widget API below).
- On your backend, request a widget token from Synctera for the particular card you wish to use.
- Make sure the Synctera Activation widget Javascript has been added to your website.
- Render the two specialized Card PAN and Card CVV HTML tags as above, setting the token attribute, and your own button to submit the widget.
- You can style these fields however you like (as explained below in Custom Styling).
- Listen for the “validity” event from the controller widget.
- When valid, enable your button.
- When the button is clicked, call the
submit()function on the controller widget. - The submit function will activate the card.
- It also returns a promise which resolves when successful, or rejects when there’s a failure.
- Once submitted, the widgets will auto-destroy and you can now remove them.
Widget API
Element Attributes:
Events:
Fields:
Custom styling
SummaryBy default, without custom styling, the widgets use the browser’s inbuilt styling for the PAN and CVV input text fields (note that the widget iframe is 4px bigger than the input field inside to allow for any browser outline effects). You may want to style the widget to match your webapp design or to add things like placeholders. This can be done entirely through css styling. When a
- Add a class name to
card-panorcard-cvvtags to activate Custom Styling:<card-pan class='customStyles' ...- Style as desired (i.e. border), but Font Styles are special
- For pseudo-selectors, e.g.
:hover,:focus, etc - use pseudo-attributes instead: Example:.customStyles[_hover] { border: 1px solid #616161; }- Font styles are auto-forwarded, but only certain values are allowed (see below)
- Optional: You can use
.customStyles[_required]to show the widgets once they have loaded
class attribute is added to the widget, the 4px spacing is removed, the input box styling is stripped and the background is made transparent such that any elements placed behind the widget will be visible (i.e. a placeholder element). The text input is set to always take up 100% of the height and width of the iframe, and likewise for the iframe in the widget tag.
Input text field pseudo selectors such as :hover, :focus and :blank are indirectly supported through css-like attributes instead of actual pseudo selectors. As the user hovers, focuses and types in the field, attributes will be added/removed on the card-pan and card-cvv tags automatically. Supported “pseudo attributes” are inspired from: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes#input_pseudo-classes
Where customStyles is the class name added to widget tags, e.g. <card-pan class='customStyles'...:
See Font Styles for information on acceptable font style values.
src=“https://widgets-sandbox.synctera.com/assets/activate/activate_v1.0.1.js”
Custom Styling Example:
Font Styles
You can style the or tag as you see fit (border, background, etc). Css font properties are handled in a special way to forward them to the iframe for styling the input, in a secure and sanitized manner. As such only certain css font properties are supported and only with certain values (all other values may be ignored, if they work they are not guaranteed across all browsers):
Note that with the
font-family property, we look for a keyword in the first font in the comma separated list of fonts you supply. If there’s a match, we use the font-family strings in the above table and not the font-family specified (for security). The above list of fonts are designed to ensure maximum coverage across different operating systems for similar style fonts. Custom fonts are not supported at this time.

