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
- Connect your wallet to Mflo webpage
- Select a dataset or service requiring payment
- Approve the x402 payment in your wallet
- Sign the payment authorization using EIP-712
- Verify the transaction on the Monad block explorer (opens in a new tab)
- 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
| Issue | Solution |
|---|---|
| Network not found | Manually add Monad Testnet using the configuration above |
| No MON for gas | Request MON tokens from the faucet |
| mUSDC not showing | Import the token contract manually in your wallet |
| Transaction failing | Ensure sufficient MON balance for gas fees |
| Payment not processing | Verify 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