glabun002/x402-unity-demo — explained in plain English
Analysis updated 2026-05-18
See a working example of an AI agent completing a machine-to-machine cryptocurrency payment.
Learn how the x402 payment protocol's request and settlement flow works end to end.
Prototype in-game purchases that an AI agent, rather than a human, initiates and pays for.
Study a minimal Unity client that polls a backend for purchase status changes.
| glabun002/x402-unity-demo | anulman/docx-sax | atrblizzard/vtmb-sbox-mounter | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | C# | C# | C# |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 3/5 | 4/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Needs Node.js, Unity 6, and a wallet funded with free testnet USDC from a public faucet.
This project is a small demo showing an AI agent buying an item inside a Unity video game on its own, without a human entering payment details. Instead of using a normal app store or payment processor, the game server responds to a purchase request with the plain web message that payment is required, and the AI agent replies by signing a payment using a cryptocurrency called USDC, sent over something called the x402 payment protocol. A neutral third party confirms the payment on the blockchain, and once that is done the game unlocks the item. The README is upfront about which parts are simplified for the demo: the money used is a test version of USDC on a test blockchain network, so it has no real value, the store only has one item and tracks who owns it in the server's memory rather than a real database, and the agent's decision to buy is scripted rather than genuinely decided by an AI model. What is not simplified is the actual payment mechanism itself: the payment request, the signed authorization, and the settlement step all use the real, unmodified protocol. To run the demo you need a recent version of Node.js and any version of Unity 6, plus a small amount of free test cryptocurrency for the agent's wallet, available from a public faucet website. You start a small server that acts as the store, start a separate small program that acts as the buying agent, then open the Unity project and press play. A sword shown in gray, meaning locked, turns gold once the agent's payment goes through, which the Unity scene checks for every two seconds. This is meant for developers curious about how AI agents might pay for things automatically inside games or apps, not for building a real store as is.
A demo where an AI agent autonomously pays testnet USDC to unlock an item inside a Unity game using the x402 payment protocol.
Mainly C#. The stack also includes C#, Unity, Node.js.
No license information was found in the README, so usage rights are unclear.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.