Define a shared invoice schema both agents can produce and consume: invoice ID, issuer agent ID, recipient agent ID, line items with amount and description, total, currency, due_date, and a callback URL for payment confirmation.
The issuing agent creates the invoice and publishes it to a shared ledger or message queue both agents can access; the invoice ID must be globally unique and stable (use UUID v4 or a content-addressed hash).
The paying agent validates the invoice: amount is within its authorized spend policy, issuer ID is in its trusted counterparty list, invoice has not already been paid (check by ID against its payment history).
The paying agent submits payment through its wallet service (which enforces spend limits); on PSP confirmation, it posts a payment receipt to the callback URL with the PSP transaction ID and a signed acknowledgment.
The issuing agent verifies the payment receipt: PSP transaction ID resolves to the expected amount and currency, signature is valid; marks the invoice as settled in its own ledger.
Both agents emit their side of the transaction to their respective audit logs; reconciliation runs periodically to match invoice records between the two systems and flag discrepancies.
Known gotchas
Agent-to-agent trust is only as strong as the identity binding — an agent's identity token must be issued by a root authority the other agent can verify; otherwise a rogue process can impersonate a service and generate fraudulent invoices.
Eventual consistency between two independent ledgers means short-term discrepancies are normal; build reconciliation to tolerate a grace window (e.g., 1 hour) before flagging a mismatch as a real error.
Circular payment loops are possible in multi-agent architectures (A pays B, B pays C, C pays A for the same logical task); implement cycle detection in your invoice graph to avoid infinite billing chains.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp