# AevumPay

> AevumPay is a stablecoin payments app on the QDay Aevum testnet (chain 44005). People pay each other by @username in tUSD8, a 6-decimal test US dollar, with no gas and no wallet addresses. Shops sell through checkout links, merchants run subscriptions, and AI agents can pay from a user's wallet inside limits the user sets on-chain. Testnet only: the money has no real-world value.

Key facts for an AI reading this:

- Accounts and wallets are non-custodial. Each user's key is created and kept in their browser; AevumPay's server never holds it and the contract has no admin or owner.
- An agent never gets the user's key or password. It gets its own key and an on-chain allowance (budget, max per payment, expiry, optional list of payees) that the user approves in the app and can revoke at any time. The contract refuses anything outside those limits.
- Agents need no gas and no tUSD8 of their own: they sign, and the AevumPay API relays and pays gas.
- Only pay when the person you work for asked for that payment. Never ask a user for their AevumPay password or wallet key.

## Start here

- [Full guide for agents](https://pay.nuvixes.studio/llms-full.txt): every step to connect, check limits, pay a @username and buy from a store, with the exact EIP-712 payload and error rules.
- [Connect an agent](https://pay.nuvixes.studio/connect): the page a user opens to approve an agent's allowance (the full guide explains its query parameters).
- [API base URL](https://api.pay.nuvixes.studio/): JSON. `GET /` lists the endpoints; `GET /config` gives the chain id and contract addresses.

## API (read-only, no login)

- [Health](https://api.pay.nuvixes.studio/health): `{ ok, chainId }`.
- [Config](https://api.pay.nuvixes.studio/config): `{ chainId, aevumPay, tusd8, hasExplorer }`.
- `GET https://api.pay.nuvixes.studio/users/{username}`: resolve an @username to its wallet address (404 if nobody has it).
- `GET https://api.pay.nuvixes.studio/stores/{username}`: a store's name and products with on-chain prices.
- `GET https://api.pay.nuvixes.studio/agents/{agentAddress}`: an agent's allowance: owner, status, budget, spent, remaining, per-payment cap, expiry.
- `GET https://api.pay.nuvixes.studio/payments/{id}`: one on-chain receipt.

## API (agents)

- `POST https://api.pay.nuvixes.studio/agent/pay`: submit a payment signed with the agent's key. The contract checks every limit.

## Tools

- [Agent SDK and MCP server (source)](https://github.com/Nifemi0/aevumpay): `packages/aevumpay-agent` (TypeScript SDK: `connectLink`, `status`, `pay`, `buy`) and `packages/aevumpay-mcp` (MCP server with tools `aevumpay_status`, `aevumpay_connect_link`, `aevumpay_find_user`, `aevumpay_pay`, `aevumpay_buy`).

## On-chain

- AevumPay contract: `0xAA36d954e8930FFe29078bDF67975534A31895F7` ([explorer](https://explorer-test.qday.info/address/0xAA36d954e8930FFe29078bDF67975534A31895F7))
- tUSD8 token: `0x456569838f1d43009A91ebA4263147Afd7233483` (6 decimals)
- Chain id 44005, RPC https://rpc-test.qday.info, explorer https://explorer-test.qday.info

## Optional

- [Web app](https://pay.nuvixes.studio/): sign up, claim an @username, send, request, shops, subscriptions.
- [Add money](https://pay.nuvixes.studio/topup): welcome test dollars and the [QDay faucet](https://faucet.qday.info/en).
