Reading NEAR testnet · checking the contract

No invoice gets paid until it clears.

A payment guardrail for AI agents

Your AI agent reads the invoice. Code checks it against the order, the delivery and the supplier's signed address before a single USDC moves on NEAR.

Steel from Ningbo, cloud hosting from Berlin, a designer in Lagos: every invoice faces the same checks.

Inspectionreceipt #0
INV-2209 · Qingmar Steel Co.
OrderPO-1184
Amount9.36 USDC
Asked to payqingmar.cleartopay.testnet

Bills for more than the storekeeper signed as delivered, and the supplier's address is still inside its 72-hour wait.

How it works

From inbox to paid, in four steps.

The AI reads documents and drafts messages. Code makes every decision that moves money, so a convincing fake still fails the checks. Any agent can sit on top; none of them can go around it.

ArriveAn invoice is forwarded or uploaded, with its order and delivery note.
InspectQuantities, prices and the payee are checked line by line.
StampCleared, held or seized, with every reason listed.
PayCleared invoices are paid in USDC on NEAR, under a key with a spending limit.

Held invoices wait at anchor while the agent asks the supplier one precise question. Seized ones never leave port.

On chain and at sea

Every ship is an invoice on its way to being paid.

When a ship reaches port it raises its flag: green for cleared, yellow for held, red for seized. Ships marked ON CHAIN carry real receipts read from the NEAR contract; the others are worked examples from other trades.

    The checks

    An invoice has to prove itself.

    Three documents must agree, and the money can only go to the supplier's registered address. Changing that address takes the supplier's own signature, the buyer's approval and 72 hours, so an email, an invoice or an AI can never redirect a payment.

    Watch an invoice go through every check →

    Purchase order100 t at the agreed price Delivery note100 t received at Lagos Payee manifestregistered, 72-hour lock INVOICE
    Proof

    Every decision carries its record.

    Read live from the contract: the document's fingerprint, each check's result and where the money was allowed to go. Every receipt is on the ledger.

    Seizure recordReceipt #1 · cleartopay.testnet

    Seized · INV-2210

    Qingmar Steel Co. (fictional supplier, real verdict)

    Amount stopped7.80 USDC
    Asked to payqingmar-payments.testnet
    DocumentsPO-1184 · INV-2210
    • Signed by the supplier's registered key.
    • Asked to be paid to an address that is not the supplier's registered one.
    • Order PO-1184 found and matched.
    • No money moved. The receipt is permanent and public.
    No invoice gets paid
    until it clears.

    Building in public on NEAR, 1 to 14 November · follow every commit at @cleartopay