React Environment Properties

Developers can implement various environmental settings that determine how the withdrawal process functions.

🧩 Props Reference

PropertyRequiredDescription
walletSolana wallet adapter instance
blockchainBlockchain type – set to "solana"
merchantIdMerchant identifier (source of funds). Contact Approvely to obtain yours.
connectionSolana connection object
envEnvironment ("prod" by default, use "staging" or "sandbox" for testing)
onSuccessCallback function that fires when the withdrawal is successful
lockAmountSet to true to disable user input of withdrawal amount
amount❌/✅Required only if lockAmount=true – fixed amount to withdraw
tokensArray of tokens to show in the UI (filters selectable token options)
lockDefaultTokenSet to true to lock the default token selection (e.g., force USDC only)
emailPre-fill the user's email in the UI
bankAccountLinkRedirectCustom redirect URL for bank account linking
supportsVersionedTransactionsEnable support for versioned Solana transactions
additionalWalletsAdd additional wallets tied to the user (see below)

⚙️ Usage Example

import { useWallet } from '@solana/wallet-adapter-react';
import { useConnection } from '@solana/wallet-adapter-react';

const wallet = useWallet();
const connection = useConnection();

<CoinflowWithdraw
  wallet={wallet}
  merchantId='<YOUR_MERCHANT_ID>'
  env='prod' // or 'staging' or 'sandbox'
  connection={connection}
/>;

➕ Additional Wallets

If you need to associate more than one wallet with the user:

const additionalWallets = [
  {
    wallet: '1111111111111111111111111111111111111111111',
    blockchain: 'solana'
  }
];

<CoinflowWithdraw
  ...
  additionalWallets={additionalWallets}
/>;