{"ok":true,"service":"provider-callback-receiver-examples","public_path":"/provider-callback-receiver-examples/","api_path":"/api/provider-callback-receiver-examples","demo_receiver_api_path":"/api/provider-callback-receiver-demo","summary":"Examples for providers, agents, and workflow systems that need to receive Wever Labs callback proof after paid rail completion.","receiver_contract":{"method":"POST","content_type":"application/json","required_transport":"https_public_url","recommended_headers":["X-Wever-Callback-Event","X-Wever-Callback-Hash"],"store_fields":["callback_event_id","callback_hash","receipt_hash","receipt_signature","return_package_id","verification_id","transcript_hash"],"ack_shape":{"ok":true,"receiver_state":"accepted","stored":true}},"examples":[{"name":"netlify_function","language":"javascript","code":"exports.handler = async function(event) {\n  if (event.httpMethod !== 'POST') return { statusCode: 405, body: JSON.stringify({ ok: false }) };\n  const envelope = JSON.parse(event.body || '{}');\n  const proof = {\n    callback_event_id: event.headers['x-wever-callback-event'] || envelope.callback_event_id,\n    callback_hash: event.headers['x-wever-callback-hash'] || envelope.callback_hash,\n    receipt_hash: envelope.receipt_hash,\n    receipt_signature: envelope.receipt_signature,\n    return_package_id: envelope.return_package_id,\n    verification_id: envelope.verification_id,\n    transcript_hash: envelope.transcript_hash\n  };\n  return { statusCode: 200, headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ ok: true, receiver_state: 'accepted', stored_fields: proof }) };\n};"},{"name":"express_receiver","language":"javascript","code":"app.post('/wever/callback', express.json(), async (req, res) => {\n  const envelope = req.body;\n  const proof = {\n    callback_event_id: req.get('X-Wever-Callback-Event') || envelope.callback_event_id,\n    callback_hash: req.get('X-Wever-Callback-Hash') || envelope.callback_hash,\n    receipt_hash: envelope.receipt_hash,\n    receipt_signature: envelope.receipt_signature,\n    return_package_id: envelope.return_package_id,\n    verification_id: envelope.verification_id,\n    transcript_hash: envelope.transcript_hash\n  };\n  await db.callbackReceipts.insert(proof);\n  res.json({ ok: true, receiver_state: 'accepted', stored: true });\n});"},{"name":"fastapi_receiver","language":"python","code":"from fastapi import FastAPI, Request\napp = FastAPI()\n\n@app.post('/wever/callback')\nasync def wever_callback(request: Request):\n    envelope = await request.json()\n    proof = {\n        'callback_event_id': request.headers.get('x-wever-callback-event') or envelope.get('callback_event_id'),\n        'callback_hash': request.headers.get('x-wever-callback-hash') or envelope.get('callback_hash'),\n        'receipt_hash': envelope.get('receipt_hash'),\n        'receipt_signature': envelope.get('receipt_signature'),\n        'return_package_id': envelope.get('return_package_id'),\n        'verification_id': envelope.get('verification_id'),\n        'transcript_hash': envelope.get('transcript_hash')\n    }\n    return {'ok': True, 'receiver_state': 'accepted', 'stored_fields': proof}"}],"test_command":"curl -s -X POST https://weverlabs.com/api/agent-paid-callback-completion \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"mode\":\"complete_paid_rail_run_with_callback\",\"rail_key\":\"packetops\",\"movement_type\":\"transaction\",\"movement_amount_units\":200,\"payment_reference\":\"wallet_reference:demo\",\"callback_url\":\"https://weverlabs.com/api/provider-callback-receiver-demo\",\"idempotency_key\":\"provider-receiver-demo-001\",\"packet_type\":\"provider_receiver_demo_packet\",\"available_documents\":[\"intake_form\",\"identity_attestation\",\"packet_summary\"],\"expected_documents\":[\"intake_form\",\"identity_attestation\",\"packet_summary\",\"authorization_form\"]}' | python3 -m json.tool","boundary":"Receiver examples are for accepting proof. They do not receive Stripe secrets, Wever Labs service-role keys, or raw agent credentials."}