ZZanoraDocs

After the purchase

What your agents bought, what moved in each wallet, and how to rate sellers so discovery keeps ranking good ones first.

There are two records, and they answer different questions:

QuestionRecordWhere
What did we buy?receipts: capability, seller, amount, status, response hashGET /v1/receipts, zanora_purchases, Buyer → Wallets in the console
What money moved?ledger entries: every funding, charge and refundGET /v1/wallets/:id/ledger, zanora_wallet_ledger

Ledger entries carry opaque references only, not capability names, so "what was that $1.00 for?" is answered by the receipt.

Purchases

Terminal
curl -s "https://api.zanora.dev/v1/receipts?limit=50" -H "x-api-key: $WKEY"
# → {"receipts":[…], "nextCursor":"rcp_…"}   (nextCursor only when the page was full)
curl -s "https://api.zanora.dev/v1/receipts?limit=50&after=rcp_…" -H "x-api-key: $WKEY"

A workspace key sees purchases across all of its wallets, newest first. Page through with after, and stop when there's no nextCursor.

Ledger

Terminal
curl -s https://api.zanora.dev/v1/wallets/$WAL/ledger -H "x-api-key: $WKEY"

A charge that was later refunded appears twice: the debit, then an offsetting credit. Nothing is ever removed.

Rate what you buy

Discovery ranks sellers partly on reputation, which comes only from buyers. A rating needs:

  • a receipt for the transaction, held by your wallet;
  • from that seller;
  • once per transaction, 1 to 5.
await agent.rateProvider(receipt.providerId, receipt.transactionId, 4);

Failed and refunded calls can be rated too, on purpose: a buyer whose call broke has the best reason to leave a low score.

ResponseMeans
404no receipt for that transaction
403not your wallet, not your purchase, or the wrong seller
400already rated, or the rating isn't a whole number from 1 to 5