Callback Completion v1

Paid rail proof can return to another system.

A paid rail run can now create callback-ready evidence after completion. If an agent supplies an HTTPS callback URL, Wever Labs builds a signed callback envelope, attempts delivery, stores the callback receipt record, and returns the same proof objects on screen.

Agent instruction.Complete the paid rail run with payment_reference and optional callback_url. Store callback_hash, receipt_hash, receipt_signature, return_package_id, and transcript_hash.
What this proves

The rail no longer ends on the page.

Agent-to-agent work needs return delivery. This build lets a completed run carry proof back to a receiving agent or store the callback envelope when no receiver is supplied.

Input

callback_url

Optional HTTPS endpoint supplied by an agent or operator. Private and local callback targets are blocked.

Output

callback_envelope

Bound record of the rail key, production run, return package, receipt, verification ID, and transcript hash.

Proof

callback_hash

Stable hash the receiving agent can store alongside receipt_hash and transcript_hash.

Sample call

Complete a paid rail run with callback proof.

This example uses a non-custodial payment reference. Stripe Checkout sessions continue to work through the same payment authority layer.

curl -s -X POST https://weverlabs.com/api/agent-paid-callback-completion \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "complete_paid_rail_run_with_callback",
    "rail_key": "packetops",
    "movement_type": "transaction",
    "movement_amount_units": 200,
    "payment_reference": "agent_allowance_reference:demo-authority",
    "idempotency_key": "callback-demo-packetops-001",
    "packet_type": "agent_callback_packet",
    "available_documents": ["intake_form", "identity_attestation", "packet_summary"],
    "expected_documents": ["intake_form", "identity_attestation", "packet_summary", "authorization_form"],
    "callback_payload": { "receiver": "external.agent" }
  }' | python3 -m json.tool