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 |
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
Updated about 7 hours ago