Fiat On-Ramps

Fiat On-Ramps

#Overview

Magic offers fiat on-ramp functionality in our wallet widget UI, allowing US and international users to purchase crypto through multiple payment options, including instant ACH, credit card, debit card, Apple Pay, Google Pay, and SEPA transfer. Fiat on-ramp is only supported on Ethereum and Polygon networks.

#Compatibility

  • For Dedicated Wallet, Stripe is the default on-ramp provider and is the only service compatible. To get access to alternative providers, reach out to sales.
  • For Universal Wallet, all of the on-ramp providers are available
  • Fiat on-ramp functionality is available via the widget UI using the following client-side SDKs:
restricted availability

Universal wallets will soon be merged with Dedicated Wallets into a single product line. Universal apps created before February 7, 2024 will work as expected with no change. See our blog post to learn more.

#Use Cases

  • Allow users to purchase cryptocurrencies via our on-ramp partners through the wallet widget UI
  • Prompt users to top-up their wallet’s token balance if they do not have enough to complete a certain on-chain transaction

#Usage

How do I allow users to purchase cryptocurrencies through the wallet widget UI?

Once you have verified the correct setup of the Magic SDK and successfully authenticated the user, the wallet widget can then be displayed in an iframe by calling the showUI function: ⁠ ⁠

Javascript
01const walletInfo = await magic.user.getInfo();
02const walletType = walletInfo.walletType;
03
04if (walletType === "magic") {
05  await magic.wallet.showUI();
06};

How do I allow users to purchase crypto within the context of a transaction flow?

Fiat on-ramp functionality can also be invoked during the transaction signing flow with the sendTransaction() function. This allows users to top-up their wallet's if their token balance is insufficient to complete the on-chain transaction.

#On-Ramp Partners

We’ve partnered with PayPal, Sardine, Onramper, and Stripe to offer a wide variety of dependable on-ramp options to users in all 50 US states and a total of 150+ countries.

Please consult the documentation of our partners (linked below) for information on their fiat, token, and blockchain coverage.

#Resources