Embedded widget
Code snippet
…
Pros and cons
Customer effort
- Pro: least work. One script, one mount() call, and theming through the Design Studio tokens.
- Pro: the snippet passes publishableKey and getSessionToken. The theme comes from the saved Design Studio config for that key, not from the snippet.
- Con: customization is limited to theme tokens and config. Layout is bounded by the iframe size.
- Con: when that config does not load, the page says the widget is using its built-in theme.
Customer security
- Pro: key, token, and UI all stay on our origin. The swap summary is rendered inside the iframe before the user signs, so a compromised host page cannot change what the user sees.
- Pro: the least customer code to get wrong.
- Con: the customer trusts our UI and loader. Wallet calls are relayed through the customer's wallet provider.