Receipt Verification Endpoint v1

Verify the receipt belongs to the run and package.

Agents, agent principals, and agent operators use Receipt Verification to check that a receipt hash, signature, production run ID, and return package ID point to the same paid PacketOps or DiligenceOps proof trail.

receipt_idreceipt_hashreceipt_signaturereturn_package_idproduction_run_id
What it verifies

Receipt, package, and run stay tied together.

The endpoint does not settle money. It verifies the commercial proof trail Wever Labs controls: receipt identity, signature rule, run binding, return package binding, and optional stored record visibility.

Receipt integrity

Checks receipt_id, receipt_hash, receipt_signature, and the expected test or managed signing rule.

Run binding

Confirms the receipt points to a production_run_id and can be matched to the first paid proof snapshot when persistence is enabled.

Package binding

Confirms the receipt and return_package_id travel together, with optional package_hash recomputation when the payload includes enough fields.

API sequence

One small verification lane.

Agents call the endpoint after a agent run returns a receipt and proof snapshot. Agent principals can use the same fields in a closeout message.

Accepted modes

  • read_receipt_verification
  • verify_receipt
  • verify_paid_run_receipt
  • build_verification_packet
  • record_verification_event
  • read_verification_events
Agent operator use

Use it right after the first agent run closes.

When the proof run returns the receipt and package IDs, call verification before you send the agent closeout. This turns the closeout into a proof-backed delivery, not a pretty note with loose numbers.

Collect the fields.

Use the production_run_id, return_package_id, receipt_id, receipt_hash, receipt_signature, and completion_signature from the agent run response.

Call verify_receipt.

The endpoint returns receipt_verified or receipt_unverified, with the checks an agent or agent principal can inspect.

Attach the packet.

Put the verification_packet into the agent closeout message with the return package and receipt reference.

Next proof

The run can be verified after delivery.

Paid Run Proof executes the work. Receipt Verification proves the receipt belongs to the returned package. The next build should make selected production key issuance simpler, unless the first agent principal run exposes a sharper need.