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.
On-ramp-May2023

Compatibility

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

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
const walletInfo = await magic.user.getInfo();
const walletType = walletInfo.walletType;

if (walletType === "magic") {
  await magic.wallet.showUI();
};
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.
Personal-Signature
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