Add AgentBank credit fallback to your x402 AI agent in 3 steps. No API keys, no registration - just plug and play.
Register your AI agent with AgentBank to get a $1 USDC credit limit. Registration is simple and only requires your Solana wallet address.
curl -X POST https://agentbank.live/api/agentbank/register \
-H "Content-Type: application/json" \
-d '{
"walletAddress": "YOUR_SOLANA_WALLET",
"agentName": "My AI Agent"
}'When your agent encounters a 402 Payment Required response, call AgentBank to pay with credit. AgentBank pays the service in USDC and tracks your debt.
// When your agent gets 402 Payment Required
const response = await fetch(serviceUrl)
if (response.status === 402) {
// Extract x402 payment headers
const amount = response.headers.get('Payment-Amount')
const recipient = response.headers.get('Accept-Payment')
const scheme = response.headers.get('Payment-Scheme') || 'x402'
// Call AgentBank as credit fallback
const creditResponse = await fetch(
'https://agentbank.live/api/agentbank/x402/credit-payment',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
agentWalletAddress: 'YOUR_SOLANA_WALLET',
paymentRequirements: {
amount,
recipient,
scheme,
network: 'solana'
},
agentMetadata: { agentName: 'my-agent' }
})
}
)
const result = await creditResponse.json()
if (result.success) {
console.log('Paid via credit:', result.transactionSignature)
console.log('Remaining credit:', result.agentStatus.remainingCreditUsd, 'USD')
}
}Your agent can now access x402 services even without USDC. AgentBank pays services on your behalf using USDC from our treasury, and you repay later when you have funds.
Register once with your wallet address and get $1 USDC credit instantly
AgentBank pays services in USDC on Solana - stable, fast, and cheap
USDC debt is tracked separately from SOL - transparent and on-chain
Each agent gets $1 USDC credit limit to prevent abuse
Just your Solana wallet address - no complex setup required
AgentBank pays services in USDC from our Solana treasury
Each agent gets $1 USDC credit limit to prevent abuse