execute.receipt. Anyone who holds the receipt can check it against the log without an API key and without trusting the API operator.
A receipt is made to be handed over, for example to a merchant who was paid. It names no agent, account or key, so the holder cannot link it to the payer or to other receipts.
At a glance
- Which executions:
transfer,withdraw,swap,limit_orderanddeposit, once they settle. Not shield, unshield, native NEAR, or EVM and Solana signing. - Read one:
GET /v1/agents/{agent_id}/operations/{correlation_id}/receipt, orapi.getReceipt(). List them:GET /v1/agents/{agent_id}/receipts, orapi.listReceipts(). Both need your partner API key. - Label a payment: set
referenceon a transfer or withdrawal. The payee checks it. Set a privatenoteon any execution for the account’s own record. - Verify:
verifyReceipt(), orverifyPaymentReceipt()for a payment you expect. Both run against a trusted checkpoint and the log’s public tiles.
getReceipt, listReceipts, verifyReceipt, verifyPaymentReceipt and logTileReader are in SDK 0.9.0 and later.
Label a payment
Two optional fields on a request tie an execution to something you track.
Both are part of the request’s
Idempotency-Key hash, so a retry must send the same values.
A merchant issues a unique reference for each order, the payer sets it on the payment, and the merchant later checks that a receipt carries it. The receipt does not say who paid. The reference is what ties the payment to the order.
Read a receipt
An execution has a receipt once its status readsSUCCESS. For a limit order, SUCCESS means the order was funded and placed, not filled.
type is one of transfer, withdraw, swap, limit_order or deposit, limit is 1 to 100 (default 25), and cursor takes the previous page’s next_cursor. With type, a page can hold fewer than limit items, or none, while next_cursor is set. Keep paging until it is null.
Each item has:
details carries the terms below, and also settled_at, usd_value, note, grant_id and policy_epoch, and for a deposit deposit_address and deposit_tx_hash. None of those are in the receipt.
usd_value is the API’s valuation of the requested amount when the execution was dispatched, from its cached price, in USD with six decimals, rounded up. It is not a quote or a settlement price, and it is absent when the API held no price.
An execution that has not settled, failed, or is of another type answers 409 receipt_not_available. Both endpoints answer 501 transparency_log_disabled when the deployment runs without the log. The list leaves out executions without a receipt. Prove those with the operation proof.
What a receipt commits to
The receipt’sterms are canonical JSON: the type, the settlement identifiers the provider reported, and the fields of that type. The opening commits to the terms, the execution’s correlation_id (random per execution) and the time.
The settlement identifiers are
intent_hash, transfer_intent_hash, tx_hash, destination_tx_hash, settlement_tx_hash and receipt_hash, whichever the provider reported for the route. A receipt always names at least one, or a limit order’s order_id.
asset and origin_asset are the asset as requested. A NEAR withdrawal to chain near delivers native NEAR whatever was requested.
What it leaves out
A receipt deliberately omits the tenant, agent id, NEAR account, wallet id, key id, grant and policy epoch, the request hash, the provider’s request ids, fees,usd_value and the note. A deposit’s receipt also leaves out the deposit address and the transaction that paid it, because 1Click’s public status ties either one to the account it credits.
A public settlement hash can still be looked up on chain, where the paying account is visible. A confidential route’s intent hash names no public transaction.
What it proves
A verified receipt proves that the API’s append-only log records the execution as settled, with these terms, at that time. It does not prove who paid, and the same receipt can be shown twice, so a payee should accept eachcorrelationId once.
- Withdrawal:
amountis what the account was debited. The bridge or network fee comes out of it, so the recipient receives less, in the destination chain’s units.amount_outstates what the provider reported delivering, when it reported it. To confirm an exact arrival, checkamount_outor the destination chain. - Limit order: the order was funded and placed under
order_id. It does not prove a fill. Read fills from the order, see Limit Orders. - Deposit: funds arrived and were credited to the account. It does not say who sent them.
- Confidential transfer: it counts as settled when the provider reports success with an intent hash. Nothing checks it independently on chain.
Verify a receipt
The holder needs no API key.verifyReceipt takes a trusted checkpoint, which must come from the witness or from state the verifier kept itself, never from the receipt’s source, and a tile reader for the log’s public tiles. Pin the origin and witness key as on Transparency Proofs.
verifyReceipt(receipt, { origin, trusted, readTile })checks any receipt and returns its typedterms(terms.typepicks the fields),correlationId,settledAtandleafIndex. It rebuilds Merkle inclusion from the log’s tiles against the trusted checkpoint. It accepts only a leaf with the fields of a receipt, so an execution’s own settled event is refused, and it requires terms that name a settlement.verifyPaymentReceipt(receipt, { origin, trusted, readTile, expect })runs those checks, then accepts only a transfer or withdrawal with exactly theexpectyou owe.
What expect must match
On success it returns the verified payment:
correlationId, type, settledAt, the terms, chain, memo and amountOut when present, the settlement hashes and leafIndex.
Errors
To check many receipts, fetch the witness head once, build one tile reader, and verify each receipt against that head.
Next steps
Transparency Proofs
The operation proof, the witness key and the log.
Executions
Run a transfer, withdrawal or swap.