` component provides a way for users to onramp from fiat to crypto from within your app.">
The <FundButton />
component provides a way for users to onramp from fiat to crypto from within your app.
<FundButton />
component provides a way for users to fund their wallet without leaving your app. It automatically
detects the user’s wallet type (EOA vs Smart Wallet) and directs them to the appropriate funding URL.
If your user connects a Coinbase Smart Wallet, it provides an easy way to access the Coinbase Smart Wallet
Fund flow. Users will be able to buy and receive crypto, or use their Coinbase
balances onchain with Magic Spend.
If your user connects any other EOA wallet, it provides an easy way to access Coinbase Onramp
where your users will also be able to buy crypto using a fiat payment method, or transfer existing crypto from their
Coinbase account.
Before using it, ensure you’ve completed all Getting Started steps.
Get your Project ID
.env
file.Add Project ID to OnchainKitProvider
Drop in the<FundButton /> component
<FundButton />
component. We provide the getOnrampBuyUrl
utility to help you generate a Coinbase Onramp
URL tailored to your use case.
openIn
prop.
text
prop, and hide the icon with the hideIcon
prop.
hideText
prop.
FundButtonReact
for the full list of customization options.