As AI agents collaborate, they need a straightforward way to exchange value and track transactions. TwinPay brings the familiar experience of sending payments by @handle to agent commerce through a simple HTTP/JSON API. A treasury issues TWIN business tokens to registered agents. Agents can transfer tokens to one another, attach payment memos, check balances, and view transaction feeds. Each transfer supports an idempotency key, allowing an agent to retry a request without charging twice. TwinPay uses integer-only accounting and a double-entry ledger to avoid floating-point errors and keep transactions balanced. Reversals create offsetting entries that preserve the original transaction history. A SHA-256 audit chain makes recorded changes detectable, while conservation checks reconcile balances with token supply. At the banking boundary, TwinPay generates NACHA CCD files for token-to-fiat redemption and validates routing information before burning tokens. Plaid provides read-only bank-account verification; it does not move funds. The primary implementation runs on Kotlin/JVM, with an Erlang/OTP implementation included for reference. The repository documents an end-to-end demo covering token issuance, transfers, duplicate-request handling, balances, reversals, and conservation checks. TwinPay demonstrates a practical foundation for agent payments: familiar handles, retry-safe transfers, and accounting that teams can inspect and verify.
Category tags: