Configure your Card Ramp URL

The following query parameters can be added to the https://swap.boomfi.xyz/ URL to customize BoomFi's Card Ramp solution:

Parameter NameDescriptionValid Values
sell_ccyFiat currency symbol to sell.Refer to the Supported Fiat Currencies table.
sell_amountAmount of the fiat currency to be sold. Applicable only if sell_ccy is provided.Any positive number.
chain_idIdentifier for the token's blockchain network. Identifies networks like ETH, BSC, Polygon, Arbitrum, Solana, and Tron.Refer to the Supported blockchain networks table.
buy_ccyCryptocurrency symbol to buy. Optional; must correspond with buy_token and chain_id.Match with buy_token
buy_amountAmount of the cryptocurrency to be bought. This amount only gets applied if buy_ccy is provided and valid.Any positive number.
buy_tokenAddress of the cryptocurrency token to buy. It must be a valid, checksummed address specific to the token's blockchain.
recipient_walletAddress of the wallet to receive the cryptocurrency. The transaction is invalid if the wallet address does not match the chain_id.
redirect_toURL where the user will be redirected after a successful transaction. Ensure the URL is correct and functional; invalid URLs will be ignored.Valid URL format
locked_fieldsFields that can be locked to prevent modification by the user. Locking these fields ensures they remain fixed during the transaction process. Check the Locked Fields use cases to learn how to use this parameter.sell_amount
sell_ccy
buy_amount
buy_token

πŸ“˜

Note

If both buy_amount and sell_amount are provided and valid, buy_amount will take priority.

Use cases

The following is an example URL using most parameters on the table:

https://swap.boomfi.xyz/?locked_fields=buy_amount&sell_ccy=GBP&sell_amount=10&chain_id=1&buy_ccy=USDC&buy_token=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&recipient_wallet=0x844Acef789989Cb6E21E0F07DD4e894709f92F96&redirect_to=https://www.youtube.com/watch?v=dQw4w9WgXcQ

Locked Fields

To lock a field, you need to add the locked_field parameter. The example below locks the sell amount to the value set in the sell_amount field:

https://swap.boomfi.xyz/?locked_fields=sell_amount&locked_fields=buy_token&sell_ccy=GBP&sell_amount=10&chain_id=1&buy_ccy=USDC&buy_token=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&recipient_wallet=0x844Acef789989Cb6E21E0F07DD4e894709f92F96&redirect_to=https://www.youtube.com/watch?v=dQw4w9WgXcQ

🚧

Constraints

It's important to note the following constraints:

  • In order to lock the sell_amount, you must also lock the sell_ccy.
  • In order to lock the buy_amount, you need to lock the buy_ccy.

Also, you can lock multiple fields in the URL. To do this, add multiple locked_fields query parameters to the URL, one for each field you need to be locked. Below, you will find an example of locking sell_amount and sell_ccy, making the option locked with a sell currency of GBP and a sell amount of 10:

https://swap.boomfi.xyz/?locked_fields=sell_amount&locked_fields=sell_ccy&sell_ccy=GBP&sell_amount=10&chain_id=1&buy_ccy=USDC&buy_token=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&recipient_wallet=0x844Acef789989Cb6E21E0F07DD4e894709f92F96&redirect_to=https://www.youtube.com/watch?v=dQw4w9WgXcQ