Configuring your widget
Sardine’s On/Off-ramp widget can be customized by passing parameters as part of the URL used to initialize the widget
When generating the URL, you can specify the on-ramp flow by adding /buy to the URL (see examples). If no flow is specified, our widget will default to the buy flow.
json_schema
Examples
Description | Example URL |
---|---|
No configuration | https://crypto.sardine.ai/?address=0x10b195F7Be9B120efd05C58f16650A13f533eA33&client_token= |
User buys $1000 USD of USDC.eth but can modify purchase | https://crypto.sardine.ai/buy?address=0x10b195F7Be9B120efd05C58f16650A13f533eA33&fiat_amount=1000&fiat_currency=USD&asset_type=USDC&network=ethereum |
User is only allowed to buy USDC.eth | https://crypto.sardine.ai/buy?supported_tokens=[{“token”:“usdc”,“network”:“ethereum”}] |