Lavender Receipts

Documentation

Take USDC on Arc, with proof.

Payment links, checkout with a return URL, a REST API, signed webhooks, an SDK, and x402 so AI agents can pay any link. Money goes straight from payer to payee on chain; we never hold it.

Quickstart

  1. Open the dashboard and sign in with the wallet that should receive payments.
  2. Sign the one-time permission. It lets requests made with your API keys ask for money to your address, and nothing else.
  3. Create an API key. Then:
curl https://receipts.lavenderventures.co/v1/requests \
  -H "Authorization: Bearer lr_live_…" \
  -H "Content-Type: application/json" \
  -d '{"amount":"25.00","memo":"Order 1042","reference":"SO-1042","return_url":"https://yourshop.com/thanks","metadata":{"order":1042}}'

The answer includes url, the pay link. Send your customer there, put it behind a button, or hand it to an agent.

No account at all? Anyone can make a signed link on Get paid, and every payment gets a receipt.

Ledger and accounting sync

Free follows your sign-in wallet; Books and Team let you add more in the dashboard: a business wallet, a treasury, or an agent's wallet. We read its USDC history from Arc a few thousand blocks a minute, so a wallet with months of history takes hours to backfill (the ledger fills oldest first), then keep it up to date every minute.

Preview any address without a wallet: paste it on the home page, or open /look/0x…. The preview shows how many movements, money in and out, fees and how many of each category, while the history is read. Counterparties and individual lines stay private until someone signs in with that wallet, which keeps the books for good. A preview lasts seven days.

Counted once, the way Arc records money

On Arc, USDC is both the gas and a token. Every USDC movement is logged by Arc as a transfer from its system address, in 18 decimals. A plain send is logged only there, and a token transfer is logged there and again by the USDC contract. Reading only the token log misses plain sends; reading both counts token transfers twice. We read the system log only, so each movement appears exactly once.

Categories

In order:

Change one and it is remembered for that counterparty, and applied to its past movements too. An entry already in Xero or QuickBooks is changed there at the next sync (the line's account, in place; never booked twice). If the new category is not mapped, the sync says so and the line is left for you to change in the books. The directory comes from our own Arc chain reader and Circle's and Arc's published addresses: most entries are DEX pools, shown as "DEX pool · TOKEN/USDC", and a counterparty we cannot name shows as a short address. Give any counterparty your own name (Name on a ledger row); yours wins everywhere, including the contact sent to Xero or QuickBooks.

Statements and CSV

A monthly statement per wallet, or for all your wallets together (up to five, each shown beside the total), shows opening and closing balances read from Arc at the month's boundaries, what came in and went out by category and by counterparty (an agent wallet's "what did it pay, and to whom"), and network fees. Anything the itemised movements do not explain, mostly fees on transactions that moved no USDC for that wallet, is shown as one line rather than hidden. CSV exports come in three formats: generic, Xero's bank statement import, and QuickBooks' three-column upload.

Category audit trail

Every movement keeps the category we gave it on its own, and that original is never overwritten. When you change a category, the change is logged: from, to, why, the wallet that made it, and when. The log is append-only. The generic CSV carries original_category, category_source (automatic, edited, saved rule or payment request), changed_by and changed_at_utc beside the current category, and Category changes (audit log) downloads the full history. A movement recategorised before the log existed (23 September 2026) shows its original as "not recorded"; we do not guess it. The Xero and QuickBooks formats keep the columns those imports require.

Xero and QuickBooks

Status: direct sync is built and switches on once Xero and Intuit approve our apps. Until then, download the CSV each one imports (Ledger → Download), and every plan is half price. When it is on, connect from Integrations:

QuickBooks connects to Intuit's sandbox until production access is granted; nothing reaches a real QuickBooks company before that. Network fees go to the books as one "Network fees" line per wallet per month (paid to "Arc network", Xero account 404 Bank Fees by default) once the month has closed, so the books' bank balance matches the chain. They are in the Xero and QuickBooks CSVs the same way, and on every line of the generic CSV. Fees on transactions that moved no USDC for the wallet are not itemised anywhere; the statement shows them as one line.

Checkout and return URL

With a return_url, the payer is sent back after paying, to:

https://yourshop.com/thanks?request_id=0x…&tx=0x…&receipt=https://receipts.lavenderventures.co/r/0x…

Never trust the redirect by itself. Anyone can type a URL. Confirm it on your server, either from the webhook or with one call (public, no key):

GET /v1/verify?tx=0x…&req=<the request token from the pay link>

{ "ok": true, "state": "paid", "paid": "$25.00", "asked": "$25.00", "final": true,
  "bound": "chain", "payer": "0x…", "tx": "0x…", "request_id": "0x…" }

state is one of paid, underpaid, wrong-payee, before-request, failed. Ship only on paid.

A pay button

The dashboard gives you one to copy. It is a plain link, so it works on any site and in any email:

<a href="https://receipts.lavenderventures.co/pay/…">Pay $25.00 with USDC</a>

API

Base URL https://receipts.lavenderventures.co. Authenticate with Authorization: Bearer lr_live_…. Errors are { "error": { "type", "message" } } with an HTTP status. The limit is 60 calls a minute per key, and an account holds up to ten active keys. The public routes (/v1/verify, /v1/receipts) answer { "ok": false, "why" } instead and allow 30 lookups a minute per caller.

POST /v1/requests

amount (dollars, up to 2 decimals), memo (up to 280), and optionally reference, final (default true: nothing more is owed), days (1–365, default 30), return_url (https), and metadata (up to 20 short keys, returned in webhooks). Returns the request with status: "open".

GET /v1/requests/:id · GET /v1/requests?status=&limit=&before= · POST /v1/requests/:id/cancel

Statuses are open, paid, underpaid, expired and cancelled. The list is newest first and pages with next_before (pass it back as before; requests made in the same second are neither skipped nor repeated). Once paid, a request carries payment: tx, payer, amount, bound, paid_at and receipt_url. A paid, cancelled or expired request cannot be paid again through us: the relayer and the x402 quote refuse it, and the pay page says so. Part payments add up: each transaction is listed in payments (with its own receipt), remaining says what is left, and the request is underpaid until the sum reaches the amount, then paid. The pay link asks for the remainder, and a direct payment of exactly the remainder is matched too.

POST /v1/endpoints · POST /v1/endpoints/delete · GET /v1/events · POST /v1/events/:id/resend

Set your webhook URL. The signing secret comes back once; setting the URL again rotates it. Delete it and new events wait, without spending retries, until you set one again. You can list and resend events.

GET /v1/receipts/:tx?req=

Public. The verified receipt for any USDC payment on Arc, as JSON.

The books

Everything the dashboard's ledger does, with a key. The same plan limits apply; a route the plan does not cover answers 402 with error.type: "upgrade_required".

curl "https://receipts.lavenderventures.co/v1/statement?wallet=wal_…&month=2026-09" \
  -H "Authorization: Bearer lr_live_…"

An edit made with a key is logged in the audit trail as api:<key prefix>, so your accountant can tell your changes from your agent's.

Webhooks

We POST request.paid, request.underpaid and request.expired to your https endpoint, and for an agent wallet with a budget, wallet.budget_exceeded once per wallet per month (its data holds wallet, month, spent and budget):

{ "id": "evt_…", "object": "event", "type": "request.paid", "created": "2026-09-24T12:00:00.000Z",
  "data": { "request": { "id": "0x…", "status": "paid", "amount": "$25.00", "metadata": { "order": 1042 },
            "payment": { "tx": "0x…", "payer": "0x…", "bound": "chain", "receipt_url": "…" } } } }

Every delivery is signed: Lavender-Signature: t=<unix>,v1=<hex>, where v1 is HMAC-SHA256 of "<t>.<raw body>" with your signing secret. Verify it on the raw body and reject anything older than five minutes. The SDK does it for you:

import { verifyWebhook } from 'lavender-receipts';
const ok = await verifyWebhook(rawBody, req.headers['lavender-signature'], process.env.LAVENDER_WEBHOOK_SECRET);

Answer 2xx fast. Failures are retried up to eleven times with backoff over about two days; with no endpoint set, events wait without spending attempts. Deliveries go only to public https addresses and never follow redirects. Handle an event more than once safely: key on id.

How we notice a payment

Agents: x402

Every pay link speaks x402. A browser gets the page. Anything else gets 402 Payment Required, with the quote in the PAYMENT-REQUIRED header:

{ "x402Version": 2,
  "resource": { "url": "https://receipts.lavenderventures.co/pay/…", "description": "Order 1042", "mimeType": "application/json" },
  "accepts": [{ "scheme": "exact", "network": "eip155:5042", "asset": "0x3600000000000000000000000000000000000000",
                "amount": "25000000", "payTo": "0x…", "maxTimeoutSeconds": 600,
                "extra": { "name": "USDC", "version": "2", "requestId": "0x…" } }] }

The payer signs an EIP-3009 transferWithAuthorization for USDC on Arc and retries with PAYMENT-SIGNATURE. We settle it and pay the gas, and answer 200 with the transaction and the receipt link, plus PAYMENT-RESPONSE. Using extra.requestId as the authorisation nonce ties the payment to the request on chain. Standard clients that pick their own nonce still pay; their payment is recorded by us. Retries are safe: if the answer is lost and the same wallet pays the same link again, we answer with the transaction already sent ("again": true, whether it has landed or is still pending) and send nothing more. Once a request is paid, the 402 refusal carries payment (tx, receipt_url). Links need at least $1.00 to be paid this way. Discovery is at /.well-known/x402.

SDK

The SDK and the MCP server are not on npm yet. Write to contact@lavenderventures.co for early access; everything below also works against the plain HTTP API.

import { LavenderReceipts, pay } from 'lavender-receipts';
import { privateKeyToAccount } from 'viem/accounts';

const lr = new LavenderReceipts({ apiKey: process.env.LAVENDER_API_KEY });
const request = await lr.requests.create({ amount: '4.00', memo: 'Dataset access' });

// an agent, from its own wallet, capped:
const paid = await pay(request.url, { account: privateKeyToAccount(process.env.AGENT_KEY), maxUsd: 5 });
paid.tx; paid.receipt_url;

pay() refuses anything that is not USDC on Arc and any quote above maxUsd, before signing.

MCP server

Lets an AI agent ask for, check and pay USDC on Arc, and read and keep its books, as tools: create_payment_request, get_request, list_requests, verify_payment, get_receipt, pay_request, get_plan, buy_plan, and for the books list_wallets, add_wallet, get_ledger, get_statement, recategorise, name_counterparty and export_csv. Not on npm yet (see SDK above); the configuration below is what it will look like.

{ "mcpServers": { "lavender-receipts": {
    "command": "npx", "args": ["-y", "lavender-receipts-mcp"],
    "env": { "LAVENDER_API_KEY": "lr_live_…", "LAVENDER_WALLET_KEY": "0x…", "LAVENDER_MAX_USD_PER_PAYMENT": "1" } } } }

The wallet key stays on the agent's machine and signs locally. The owner's cap is enforced before anything is signed.

What proves what

A receipt says where each fact comes from.

Limits and pricing