x402 Payment
Testing x402

Testing x402

Testing x402 Payments

Prerequisites

Before testing x402 payments, ensure you have:

  • Monad Testnet added to your wallet
  • MON tokens for gas fees
  • mUSDC tokens for payment testing
  • Wallet connected to Mflo webpage

Basic Testing Flow

  1. Connect your wallet to Mflo webpage
  2. Select a dataset or service requiring payment
  3. Approve the x402 payment in your wallet
  4. Sign the payment authorization using EIP-712
  5. Verify the transaction on the Monad block explorer (opens in a new tab)
  6. Check the data to ensure you received the correct dataset or service response

Example Payment Transaction

// Example x402 payment structure
const paymentData = {
  recipient: "0x...", // Service provider address
  amount: "1000000", // 1 mUSDC (6 decimals)
  token: "0x72c0839d3CAcb2FB77569c221EDB3A547C6a242d", // mUSDC contract
  nonce: 12345,
  deadline: 1234567890
};

Troubleshooting

Common Issues

IssueSolution
Network not foundManually add Monad Testnet using the configuration above
No MON for gasRequest MON tokens from the faucet
mUSDC not showingImport the token contract manually in your wallet
Transaction failingEnsure sufficient MON balance for gas fees
Payment not processingVerify mUSDC balance and allowance

Getting Help

  • Community Support: Follow @Mflo (opens in a new tab) X account
  • Block Explorer: Use https://testnet.monadexplorer.com/ to verify transactions

Security Notes

  • Testnet only: These tokens have no real value
  • Private keys: Keep your testnet private keys secure but separate from mainnet
  • Reset wallets: Consider using dedicated testnet wallets
  • Regular updates: Network parameters may change during testnet phases