Environment ready
3 minYou will
- Install the Kit CLI entrypoint (npm/npx @paybond/kit)
- Pick offline mock or sandbox credentials
- Stay in one project directory for trace paths
T01 · Tutorial
Log in, run the local dev loop, smoke a paid tool, open :9477 — sandbox first, no production rails.
Outcome: Complete authorize → execute → evidence offline or against sandbox Gateway.
Learning view: objectives and extras expanded. Switch for commands only.
Kit control loop is authorize → execute → evidence. Sandbox proves the loop before any live rail.
Before adapters or commerce providers, prove Kit's control loop locally: authorize → execute → evidence. No production payment rails required for this tutorial.
You will
You will
You will
Step 1 of 5
Scaffold a travel policy, validate tools, and run authorize → evidence with an in-process mock.
Goal: Prove the control loop on your laptop without credentials.
Run this
paybond dev loop --offlineExample response
✓ policy scaffolded (travel preset)
✓ tools validated
✓ authorize → evidence ok
wrote .paybond/dev-trace.jsonlYou should see: Exit 0, paybond.policy.yaml present, .paybond/dev-trace.jsonl written.
Note: Best first step with no sandbox key. Creates local policy and a trace file you can open later.
Step 2 of 5
Writes PAYBOND_API_KEY to .env.local (mode 0600). Tenant scope comes from the credential — never from agent args.
Goal: Attach a real sandbox key so later stages hit Gateway, not only the mock.
Run this
npx -p @paybond/kit paybond login
# or: npm i -g @paybond/kit && paybond loginExample response
Logged in to sandbox.
Wrote .env.local (mode 0600).You should see: .env.local exists with PAYBOND_API_KEY.
Note: Without a global install: npx -p @paybond/kit paybond login
Step 3 of 5
Same authorize → execute → evidence path against the Paybond sandbox Gateway after login.
Goal: Same steps as offline, now on the network against sandbox.
Run this
paybond dev loopExample response
✓ authorize travel.book_hotel ≤ $200.00
✓ execute ok
✓ evidence cost_cents=18700
captured $187.00 · released $13.00You should see: Smoke completes without spend_denied for the travel preset.
Step 4 of 5
Second terminal, same project directory. Serves a timeline at http://127.0.0.1:9477 from .paybond/dev-trace.jsonl.
Goal: Inspect the last smoke as a vertical timeline (CLI stays headless).
Run this
paybond dev traceExample response
Trace UI listening on http://127.0.0.1:9477
Serving .paybond/dev-trace.jsonlYou should see: Browser at :9477 shows authorize then evidence for your last smoke.
Note: Hosted replay (no local server): /demo/agent-trace. dev loop records events; it does not start the dashboard.
Step 5 of 5
Exercise one named operation with a spend ceiling and evidence body — useful when iterating a single tool.
Goal: You choose the operation and cents ceiling — same boundary middleware uses later.
Run this
paybond agent sandbox smoke --operation travel.book_hotel --requested-spend-cents 20000 --evidence-preset cost_and_completion --result-body '{"status":"ok","cost_cents":18700}' --format jsonExample response
{
"authorized": true,
"operation": "travel.book_hotel",
"requested_spend_cents": 20000,
"settled_cost_cents": 18700,
"status": "released"
}You should see: JSON shows authorized spend and validated cost_cents (not spend_denied).
Prefer a longer written walkthrough? See the Agent quickstart.
Check these off against your terminal or timeline output — progress stays on this device.
If you see
Trace dashboard refuses connections
Do this
dev loop only records events. Start paybond dev trace in a second terminal in the same directory.
If you see
Login works but tenant ID was passed in a tool arg
Do this
Drop tenant/intent from tool arguments — they are session-bound from credentials only.
If you see
Spend looks like $200 instead of 20000 cents
Do this
Use integer cents (20000 = $200.00). Floating dollar amounts are not accepted.
Answer without scrolling up — then reveal the model answer to compare.
In one sentence: why does offline mode still exercise the same authorize → evidence path as a sandbox key?
Pick a branch — not every path needs every tutorial.
Recipes are copy-paste production smokes — not repeated inside this tutorial.