Check tokens from code
Wallets, payment apps and AI agents can ask Habeas the same questions as the check page and get a signed answer back. Each answer costs 0.001 USDC, paid per call with x402 on Stellar testnet. Checking on this website stays free.
The request
- Endpoint
- GET /api/v1/check/CODE-ISSUER
?network=testnet - Network the token is on
- mainnet (default) or testnet
- Price
- 0.001 USDC per answer, on Stellar testnet (stellar:testnet, exact)
- Payment collected by
- the x402.org facilitator, which also pays the network fee
- If the check fails
- You get an error and the payment is never collected. You pay only for answers.
Without a payment the endpoint answers 402 Payment Required, with a PAYMENT-REQUIRED header that says what to pay and where. An x402 client reads it, pays and asks again.
Try it from a terminal
The example script pays, checks the signature and prints the verdict. It needs a testnet account with a little testnet USDC.
git clone https://github.com/Prashant-Mishra-12569/habeas
cd habeas/examples && npm install
AGENT_SECRET=S... node agent-check.ts USBDCP-GDABKPZMAIULVJVJJQM7L3VIG5A2IS5V4KP2P3YNP6YWRUBJNBGFGG6EWhat the answer says
The same facts as the check page: the issuer's powers, who runs the token contract, take backs and freezes in the issuer's history, reasons left in memos, and one of four verdicts.
- Protected by Habeas
- protectedFreezing and taking back can only happen through a case with a reason, a deadline and a reviewer.
- Powers never used
- not-usedThe issuer can freeze or take back, and its full history shows it never has.
- Powers used without a public process
- used-without-processThe issuer has frozen or taken back tokens, and nothing on-chain gave a reason or a way to answer.
- Can't be frozen or taken back
- no-powersThe issuer never gave itself the power to freeze or take back this token.
Every answer is signed
Keep the answer. Anyone can check later that Habeas gave it, and when, without trusting the connection it came over.
- Signing key (ed25519)
- GAJ2MWWE…ZWUJHZ4JGAJ2MWWEY5VAMG3GW72Z36647UVIYWZKOZDBF5BUTZM2JNTOZWUJHZ4JAlso published at /api/v1/key
- What is signed
- sha256("habeas-check-v1:" + json({ resource, network, result, signedAt }))
- Canonical JSON
- object keys sorted at every level, no spaces
Paid checks so far
USDC payments to the address above, newest first, read from Stellar testnet just now.
- Oct 4, 2026, 08:46 UTCb5fb…cfb90.001 USDC from GBMV…UZYW
- Oct 4, 2026, 06:45 UTCbe26…21410.001 USDC from GBMV…UZYW
- Oct 4, 2026, 06:39 UTCde37…dc010.001 USDC from GBMV…UZYW

