Skip to main content
The widget puts the full LightSwap swap flow on your page with one iframe. No backend and no API key required. Use it when you want users to swap on your site without building an API integration. For full control of the experience, use the Direct API instead.
Never put an API key in the widget. API keys are secret backend credentials. Widget keys are public attribution identifiers.

Quick start

1

Paste the iframe

Place the snippet where the widget should appear. No wrapper or custom parent component is required.
2

Set optional defaults

Set the starting pair, amount, theme, accent color, and locale in the iframe URL.
3

Add your widget key

Add key=YOUR_PUBLIC_WIDGET_KEY from Account → Business so completed swaps earn you commission. Without a key, the widget works but attributes nothing.

Basic iframe

https://lightswap.me/widget with no parameters is a valid URL and opens with LightSwap defaults.

Open widget example

Preview the hosted widget in an iframe.

Add attribution

Copy your public widget key from Account → Business and add it as the key query parameter.
Revenue-sharing terms live on your LightSwap account, not in the URL. Don’t add custom fee or commission parameters to the widget URL. You don’t need to register a domain before embedding. Only place your widget key on pages where you want swaps attributed to your integration.

Parameters

All parameters are optional.
The snippet controls the widget width and height, so you can paste it directly into a page layout.

Need a widget key?

Activate a business account from Account → Business on lightswap.me. The widget key is created instantly, and the attributed widget URL and embed code are always copyable from the tab.