Fund an app or agent to send messages with XMTP
Use this guide to learn how to use the XMTP Funding Portal to fund an app or agent to send messages with XMTP. You can also use the portal to view usage and current and projected fees.
Behind the scenes, the Funding Portal handles Payer Registry smart contract deposits, XMTP Broadcast Network messaging fee and XMTP App Chain gas payments, and all blockchain interactions.
Ephemera currently hosts the XMTP Funding Portal UI as a community service. Stewardship will move to DUNA post-GA.
The smart contracts used by the portal are fully decentralized and non-custodial. Full audits from Trail of Bits and Octane will be published before paid messaging is enforced.
Understand payer wallets
A payer wallet is what an app or agent's XMTP Gateway Service uses to pay fees.
You can:
For example, you might self-fund your payer wallet if it already has or can easily obtain USDC. Or, you might ask your finance team to fund your payer wallet from a company multi-sig. You might also use a wallet you control to support a different app or agent by funding its payer wallet.
Self-fund a payer wallet
Step 1. Create the payer wallet
The payer wallet must be:
- A standard Ethereum-compatible wallet account
- Non-custodial, meaning you control the private key (not a third-party service)
- Able to sign and transact on the Base and XMTP App Chain networks
- Able to hold and transfer USDC tokens
You can create a payer wallet using common non-custodial wallet apps, such as Coinbase Wallet and MetaMask.
Payer wallets can be funded by Ethereum EOAs and smart contract wallets. For example, a Gnosis Safe or any ERC-1271 wallet can deposit funds into a payer account using the Funding Portal.
You'll need your payer wallet's private key when setting up your XMTP Gateway Service.
Step 2. Register the payer wallet
- Use your payer wallet to connect to the XMTP Funding Portal → testnet link coming soon.
- On the Welcome page, click Use connected wallet.
- Open the drop-down menu in the upper right and click Manage payers.
- Click the pencil icon to give your payer wallet a human-readable name.
- Click the green check button to save.
Your payer wallet is now a payer in the Payer Registry smart contract.
Step 3: Fund the payer wallet with USDC on Base
Fund your payer wallet with USDC on Base. Here are some sources you can use to acquire USDC:
- Centralized exchanges: Binance, Coinbase, Kraken
- Direct purchase: Circle, Coinbase
- Business accounts: Circle business accounts for larger operations
To get USDC on Base Sepolia for use with XMTP testnet, you can use https://faucet.circle.com/, which provides 10 USDC per hour.
Step 4: Allocate funds for messaging
The XMTP Funding Portal will accept only testnet USDC until November 1, 2025. Plan your testnet and mainnet funding accordingly.
- Connect the payer wallet to the XMTP Funding Portal → testnet link coming soon.
- In the drop-down menu in the upper right, be sure to select the payer wallet.
- On the Dashboard page, click Fund.
- Enter the amount of USDC you want to allocate from your payer wallet.
- The XMTP Funding Portal automatically optimizes how the funds are allocated to cover messaging fees and gas fees. Expand the Transaction details area to view the details of the split.
- Click Continue.
- The Depositing funds screen displays. You can click Cancel transaction to attempt to cancel the transaction, if needed.
Your payer wallet now has:
- USDC allocated to your registered payer wallet in the Payer Registry smart contract. This allowance will be used to pay XMTP Broadcast Network messaging fees.
- USDC bridged to your payer wallet on the XMTP App Chain. This balance will be used to pay XMTP App Chain gas fees.
You can use the payer wallet (and only the payer wallet) to withdraw USDC from your messaging fee allowance.
Step 5: Monitor your usage and allowance
You can use the Usage panel on the XMTP Funding Portal Dashboard to review the number of messages sent by your app, as well as actual and projected fees.
Before data can display in the Usage panel, you must have completed the following on the appropriate network (testnet or mainnet):
- Deployed your XMTP Gateway Service
- Updated your app to use a compatible XMTP SDK
- Sent messages using your app
We recommend funding an allowance for 3-6 months of estimated usage.
If your allowance goes to zero, the Payer Registry smart contract rejects new messages sent to the XMTP Broadcast Network and returns an INSUFFICIENT_PAYER_BALANCE
error.
Step 6: Withdraw and claim funds
You can use the payer wallet (and only the payer wallet) to withdraw USDC from its messaging fee allowance at any time.
- Withdrawals that require bridging will be available after 7 days and require a second transaction to claim.
- Withdrawals without bridging will be available after 48 hours and require a second transaction to claim.
- Connect your payer wallet to the XMTP Funding Portal → testnet link coming soon.
- On the Dashboard page, click Withdraw.
- Enter the amount of USDC you want to withdraw from your messaging balance. Click MAX if you want to withdraw the maximum amount available.
- Click Request withdrawal.
- After the required wait time, return to the XMTP Funding Portal to complete your withdrawal. On the homepage, view the Transaction panel and locate your Withdrawal and Bridge transactions. The Status column should be set to Ready to withdraw.
- Click Ready to withdraw to display the Transaction details panel.
- Verify the withdrawal details and click Claim USDC.
Fund a payer wallet using another wallet
Step 1. Get the payer wallet address
To fund an app using a wallet other than its payer wallet, you need the payer wallet address.
Step 2. Select the payer wallet you want to fund
- Use the wallet you want to use to fund the payer wallet to connect to the XMTP Funding Portal → testnet link coming soon.
- On the Welcome page, click Use other wallet.
- On the Manage payer wallets screen, enter the payer wallet address you want to fund and a human-readable display name.
- Click the green check button to save.
Your wallet can now fund the payer wallet.
Step 3: Deposit USDC into your wallet
Deposit USDC into your wallet on Base. This is the wallet you want to use to fund the payer wallet.
Here are some sources you can use to acquire USDC:
- Centralized exchanges: Binance, Coinbase, Kraken
- Direct purchase: Circle, Coinbase
- Business accounts: Circle business accounts for larger operations
To get USDC on Base Sepolia for use with XMTP testnet, you can use https://faucet.circle.com/, which provides 10 USDC per hour.
Step 4: Allocate funds to the payer wallet
The XMTP Funding Portal will accept only testnet USDC until November 1, 2025. Plan your testnet and mainnet funding accordingly.
- Use the wallet you funded in Step 3 to connect to the XMTP Funding Portal → testnet link coming soon.
- In the drop-down menu in the upper right, be sure to select the payer wallet.
- On the Dashboard page, click Fund.
- Enter the amount of USDC you want to allocate from your wallet to the payer wallet.
- The XMTP Funding Portal automatically optimizes how the funds are allocated to cover messaging fees and gas fees. Expand the Transaction details area to view the details of the split.
- Click Continue.
- The Depositing funds screen displays. You can click Cancel transaction to attempt to cancel the transaction, if needed.
The payer wallet now has:
- USDC allocated to the registered payer wallet in the Payer Registry smart contract. This allowance will be used to pay XMTP Broadcast Network messaging fees.
- USDC bridged to the payer wallet on the XMTP App Chain. This balance will be used to pay XMTP App Chain gas fees.
Troubleshooting
Is there a testnet?
Yes. The XMTP App Chain testnet and XMTP Broadcast Network testnet run smart contracts that are identical to those run on mainnet.
You can dry-run allocating funds using Base Sepolia USDC and sending messages using these XMTP testnets.
Signature rejected (MetaMask only)
If you see a Signature rejected error in MetaMask, it can sometimes be caused by a stuck or out-of-sync nonce (a number that keeps track of your transaction order).
To fix this:
- Open MetaMask.
- Click your account icon in the top right.
- Go to Settings → Advanced.
- Click Reset Account. This does not affect your funds or wallet.
If the issue persists:
- Check for any stuck or pending transactions in your wallet.
- Try sending a new transaction with a custom nonce if needed.
Bridge pending > 15 min
Check Base status: https://status.base.org/.
Message reverted
Check for INSUFFICIENT_PAYER_BALANCE
.
Region restrictions
Nodes in the XMTP testnet and mainnet that operate in US jurisdiction do so in compliance with Office of Foreign Assets Control (OFAC) sanctions and Committee on Foreign Investment in the United States (CFIUS) export compliance regulations. Accordingly, for these nodes, IP-based geoblocking is in place for the following countries/territories:
- Cuba
- Iran
- North Korea
- Syria
- The Crimea, Donetsk People’s Republic, and Luhansk People’s Republic regions of Ukraine