Our Compliance Checker has now been updated to include a compliance check on the EU AI Act! Learn more.

Agent-to-Agent USDC Payment Workflow

Coinbase AgentKit flow: a human allocates a USDC budget, the agent authenticates its Base wallet, pays an x402 invoice and processes the supplier data, with no fiat in the path.

Full FlowZap Code

Copy and paste the following FlowZap code into a project in your FlowZap account to see this template diagram.

user { # Human User
n1: circle label:"Start Task"
n2: rectangle label:"Allocate USDC Budget"
n9: circle label:"Task Complete"
n1.handle(right) -> n2.handle(left)
n2.handle(bottom) -> agent.n3.handle(top) [label="Start Session"]
}

agent { # AI Agent
n3: rectangle label:"Authenticate Base Wallet"
n4: rectangle label:"Ping Global Supplier API"
n7: rectangle label:"Pay x402 Invoice via USDC"
n8: rectangle label:"Process Supplier Data"
n3.handle(right) -> n4.handle(left)
n4.handle(bottom) -> supplier.n5.handle(top) [label="Data Request"]
n7.handle(bottom) -> supplier.n6.handle(top) [label="Send Crypto"]
n8.handle(top) -> user.n9.handle(bottom) [label="Result"]
}

supplier { # Supplier API
n5: rectangle label:"Return 402 Payment Required"
n6: rectangle label:"Verify Onchain Transfer"
n5.handle(top) -> agent.n7.handle(bottom) [label="x402 Invoice"]
n6.handle(top) -> agent.n8.handle(bottom) [label="Unlock Data"]
}

Install the MCP packagenpm install -g flowzap-mcpMCP documentation

Related templates

Back to all templates