Buy Widget

ParameterTypeDescription
defaultFiatstringThe default fiat currency is to be displayed.
onlyFiatsstringThe only fiat currencies to be displayed.
excludeFiatsstringFiat currencies are to be excluded.
defaultAmountnumberThe default amount to be displayed (must be used with defaultFiat).
defaultCryptostringThe default cryptocurrency is to be displayed.
excludeCryptosstringCryptocurrencies to be excluded.
onlyCryptosstringThe only cryptocurrencies to be displayed.
excludeCryptoNetworksstringBlockchain networks to be excluded.
onlyCryptoNetworksstringThe only blockchain networks to be displayed
defaultPaymentMethodstringThe default payment method is to be displayed.
excludePaymentMethodsstringPayment Methods to be excluded.
walletsstringThe wallet address(es) to be passed to the widget.
networkWalletsstringMultiple wallet addresses can be specified for use with all tokens that are supported by a single blockchain network.
walletAddressTagsstringString of wallet address tags (destination tags/memos) that can be supplied to the widget

Default Fiat

Set a default fiat currency to be displayed using thedefaultFiat

https://buy.onramper.com?defaultFiat=USD



Only Fiats

Force one or multiple fiat currencies in your widget using onlyFiats:

https://buy.onramper.com?onlyFiats=USD,EUR



Exclude Fiats

Omit certain fiat currencies with excludeFiats:

https://buy.onramper.com?excludeFiats=USD,EUR



Default Amount

When used in conjunction with defaultFiat, defaultAmount will pre-populate the fiat currency input with your desired amount.

The URL below will default to a EUR amount of €125 whenever a user accesses your widget:

https://buy.onramper.com?defaultFiat=EUR&defaultAmount=125



Default Crypto

By default, the widget will use its recommendation algorithm to set the output currency, based on the most-used crypto in the user’s country.

However, you can override this with defaultCrypto. Check out Crypto Currenciesto find your desired ID.

https://buy.onramper.com/?defaultCrypto=ETH



Exclude Cryptos

Right out of the box, the Onramper widget makes all cryptocurrencies available.

Use excludeCryptos if you want to remove some from your widget. For instance, the example below makes ether and bitcoin unavailable to buy:

https://buy.onramper.com?excludeCryptos=BTC,ETH



Only Cryptos

If you only want a specific set of cryptos to be displayed, use onlyCryptos. The string below ensures that only BTC and ETH can be bought through your widget:

https://buy.onramper.com?onlyCryptos=ETH,BTC



Exclude Crypto Networks

Similar to excludeCryptos, excludeCryptoNetworks allows you to remove entire crypto networks from the widget: Network ids can be found from Crypto Networks

https://buy.onramper.com?excludeCryptoNetworks=bitcoin,ethereum



Only Crypto Networks

onlyCryptoNetworks enables you to force the use of certain networks.

https://buy.onramper.com/?onlyCryptoNetworks=ethereum,polygon



Default Payment Method

Load your preferred payment method with defaultPaymentMethod. You can find their Onramper IDs under Payment Methods.

Below is an example of a URL that loads Bank Transfer:

https://buy.onramper.com/?defaultFiat=EUR&defaultAmount=200&defaultPaymentMethod=banktransfer



Exclude Payment Methods

Don’t want to show your users certain payment methods? Add excludePaymentMethods to your string:

https://buy.onramper.com/?defaultFiat=EUR&excludePaymentMethods=creditcard

Wallets

The wallets parameter allows you to pass a string containing wallet addresses to the widget.

Format-wise, each address should be a combination of the Token ID and the wallet address, separated by a colon. For instance, the example below shows the string for a wallet on the Bitcoin network:

BTC:3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5

Want to add multiple addresses? Just use the same format, separating each instance with a comma:

wallets=BTC:3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5,ETH:0xb794f5ea0ba39494ce839613fffba74279579268

Remember, the URL itself should also incorporate a valid production API Key:

https://buy.onramper.com?wallets=BTC:3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5,ETH:0xb794f5ea0ba39494ce839613fffba74279579268



Network Wallets

Want to pass a wallet that functions for multiple currencies or tokens on a network? For that, you’ll need networkWallets. Provide a valid Onramper Network ID, followed by the wallet address:

The wallet address can be prefixed with any valid).

https://buy.onramper.com/?networkWallets=ETHEREUM:0xb794f5ea0ba39494ce839613fffba74279579268



Wallet Address Tags

The walletAddressTags parameter allows you to pass a string of wallet address tags (destination tags/memos) that can be supplied to the widget.

Format-wise, each address should be a combination of the Token ID and the tag, separated by a colon.

https://buy.onramper.com/?wallets=xrp_ripple:rCoinaUERUrXb1aA7dJu8qRcmvPNiKS3d,xlm_stellar:0xb794f5ea0ba39494ce839613fffba74279579268&walletAddressTags=xrp_ripple:1234567890,xlm_stellar:1234567890