Skip to content

Configuring funding methods ​

To enable various funding flows for your users, visit the Privy Dashboard and select your app from the App Dropdown in the sidebar. Then, navigate to the Funding page for your selected app.

Configuring recovery of embedded wallets

Set a default chain and amount ​

To enable funding flows for your app, first select the chain your users will use. When EVM is selected you'll need to select a default network. Both for EVM or Solana you'll need an amount that users should fund their wallets with. Users can update the amount manually if they choose, before selecting a funding provider.

During funding flows, Privy will prompt users to fund their wallets with the native currency of your default chain (e.g. ETH on Ethereum Mainnet, POL on Polygon, SOL on Solana) with the funding amount you specify here.

You can enable cross-chain bridging to allow funding EVM wallets with Solana wallets and viceversa. Cross-chain brdiging is not available on testnets like Sepolia or Solana's devnet.

TIP

You can also prompt users to fund their wallets with USDC or other ERC20 tokens by setting a funding asset in code.

You can always change these values in the Dashboard later or even override them in your app's code.

Enable funding methods ​

Once you've set a default chain and funding amount for your app, you can enable external wallets, MoonPay, and/or Coinbase Onramp as funding methods by selecting the corresponding option in the Dashboard.

Privy will present the options you enable here for your users to select from during a funding flow. If only one option is enabled, Privy will automatically navigate the user to that funding option instead of prompting users to select one.

Additional configurations ​

Certain funding methods may have additional configurations that you can set.

MoonPay ​

To better guide your user, you can set additional configurations on the config.fundingMethodConfig.moonpay property of the PrivyProvider component.

Within config.fundingMethodConfig.moonpay, you may set the following fields (all optional):

FieldDescriptionType
paymentMethodIndicates the payment method you'd like your user to use when completing their purchase. Supported paymentMethods are listed on the right.'ach_bank_transfer', 'credit_debit_card', 'gbp_bank_transfer', 'gbp_open_banking_payment', 'mobile_wallet', 'sepa_bank_transfer', 'sepa_open_banking_payment', 'pix_instant_payment', 'yellow_card_bank_transfer'
uiConfig.accentColorHex string indicating an accent color for MoonPay's fiat on-ramp UIsstring
uiConfig.themeTheme to use for MoonPay's fiat on-ramp UIs'light', 'dark'
useSandboxDetermines if transactions will use the Moonpay testing environment. See this guide for instructions on how to test purchases in sandbox.true, false

As an example, you might construct config.fundingMethodConfig.moonpay like below:

tsx
<PrivyProvider
  appId="insert-your-privy-app-id"
  config={{
    ...restOfYourConfig,
    fundingMethodConfig: { 
      moonpay: { 
        paymentMethod: 'credit_debit_card', // Purchase with credit or debit card
        uiConfig: {accentColor: '#696FFD', theme: 'light'}, // Styling preferences for MoonPay's UIs
      }, 
    }, 
  }}
>
  {children}
</PrivyProvider>