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 Name | Description | Valid Values |
---|---|---|
sell_ccy | Fiat currency symbol to sell. | Refer to the Supported Fiat Currencies table. |
sell_amount | Amount of the fiat currency to be sold. Applicable only if sell_ccy is provided. | Any positive number. |
chain_id | Identifier for the token's blockchain network. Identifies networks like ETH, BSC, Polygon, Arbitrum, Solana, and Tron. | Refer to the Supported blockchain networks table. |
buy_ccy | Cryptocurrency symbol to buy. Optional; must correspond with buy_token and chain_id . | Match with buy_token |
buy_amount | Amount of the cryptocurrency to be bought. This amount only gets applied if buy_ccy is provided and valid. | Any positive number. |
buy_token | Address of the cryptocurrency token to buy. It must be a valid, checksummed address specific to the token's blockchain. | |
recipient_wallet | Address of the wallet to receive the cryptocurrency. The transaction is invalid if the wallet address does not match the chain_id . | |
redirect_to | URL 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_fields | Fields 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 |
skip_quote_screen | You can use the skip_quote_screen=1 query parameter to bypass the quote screen. When using this parameter, please ensure the following:- Required Parameters: chain_id , buy_token , sell_ccy , and either buy_amount or sell_amount (do not provide both).- Lock the following fields: Use the locked_fields parameter to lock buy_token , sell_ccy , and the amount field you provided (buy_amount or sell_amount ). | 1 |
Note
If both
buy_amount
andsell_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 thesell_ccy
.- In order to lock the
buy_amount
, you need to lock thebuy_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
Skipping Quote Screen
Below, you find two examples to skip the quote screen by adding the skip_quote_screen=1
query parameter:
Buy 10000 USDC on Ethereum, Sell GBP
https://swap.boomfi.xyz/?chain_id=1&buy_amount=10000&buy_token=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&sell_ccy=GBP&locked_fields=buy_token&locked_fields=sell_ccy&locked_fields=buy_amount&skip_quote_screen=1
Here, the following required parameters were added:
chain_id=1
buy_token=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
sell_ccy=GBP
buy_amount=10000
And, the following fields were locked:
locked_fields=buy_token
locked_fields=sell_ccy
locked_fields=buy_amount
Buy 1000 GBP worth of USDC on Ethereum
https://swap.boomfi.xyz/?chain_id=1&sell_amount=1000&buy_token=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&sell_ccy=GBP&locked_fields=buy_token&locked_fields=sell_ccy&locked_fields=sell_amount&skip_quote_screen=1
In this example, the following required parameters are set:
chain_id=1
buy_token=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
sell_ccy=GBP
sell_amount=1000
And, the following fields are locked:
locked_fields=buy_token
locked_fields=sell_ccy
locked_fields=sell_amount
Updated 2 days ago