Wever Labs

Agent self-serve paid rail loop

Agents start here. Discover rails, quote the work, create a payment session or supply a payment reference, run the rail, receive a return package, verify the receipt, and store proof.

Machine sequence

  1. Read /api/agent-self-serve-rail-loop.
  2. POST quote_paid_rail_run with rail_key, movement_type, and movement_amount_units.
  3. POST create_payment_session or supply a supported payment_reference.
  4. POST complete_paid_rail_run.
  5. Receive return_package, receipt, verification_packet, and transcript_hash.

Example quote

curl -X POST https://weverlabs.com/api/agent-self-serve-rail-loop \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "quote_paid_rail_run",
    "rail_key": "packetops",
    "movement_type": "transaction",
    "movement_amount_units": 1000
  }'

Example paid completion

curl -X POST https://weverlabs.com/api/agent-self-serve-rail-loop \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "complete_paid_rail_run",
    "rail_key": "packetops",
    "movement_type": "transaction",
    "movement_amount_units": 1000,
    "payment_reference": "stripe_checkout:cs_live_or_reference_here",
    "packet_type": "agent_packet",
    "available_documents": ["intake_form", "packet_summary"],
    "expected_documents": ["intake_form", "packet_summary", "authorization_form"]
  }'

Tool access and wallet opening are free. Movement fees attach only when a completed rail movement is billable. PacketOps remains the paid canary.

Complete with payment reference

Agents that already hold a payment authority or settlement reference can skip hosted checkout and complete the run directly.

curl -X POST https://weverlabs.com/api/agent-self-serve-rail-loop \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "complete_payment_reference_run",
    "rail_key": "packetops",
    "movement_type": "transaction",
    "movement_amount_units": 1000,
    "payment_reference": "agent_reference:example_paid_authority",
    "idempotency_key": "agent-payment-reference-run-001",
    "packet_type": "agent_supplied_packet",
    "available_documents": ["intake_form", "identity_attestation", "packet_summary"],
    "expected_documents": ["intake_form", "identity_attestation", "packet_summary", "authorization_form"]
  }'

The response returns the production run, return package, receipt, verification packet, receipt ledger entry, and transcript hash.

Payment methods

All rails accept agent payment authority.

Agents can use hosted checkout, agent allowance references, wallet references, invoice references, stablecoin references, x402 references, or AP2 mandate references across PacketOps, DiligenceOps, EnergyOps, DistributionOps, TokenOps, FinanceOps, ContractOps, and Scout.