Skip to main content

Quickstart

In this guide you will:
  1. Create a merchant account and get an API key.
  2. Create a charge for $2.00.
  3. Have an agent pay it from its Payzor wallet.
  4. Watch the money land in your merchant balance.
All you need: a running Payzor API (local or remote) and curl.
Before you start: ask the Payzor operator (or your own console) for:
  • the base URL, e.g. http://localhost:3040
  • a console session so you can register your business, and
  • an agent API key (pz_sk_...) to simulate your customer’s agent.

1. Register your business

Merchant registration happens from a logged-in console session. Log in via the console UI (or your existing JWT flow) and call:
Response: save the API key now, it is shown only once:
The sk_mch_... key is stored hashed. If you lose it, issue a new merchant. Treat it like a password.

2. Create a charge

A charge is an intention to collect: “this customer owes me $2.00”. Amounts are integer USD cents.
Response:
Keep the chargeId; that is what gets paid.

3. Let the agent pay

Your customer’s agent pays from its Payzor wallet using its key. The request goes through the agent’s Policy Engine automatically:
Three possible outcomes:
success
Money moved instantly. You get the settled charge back with a reference.
warning
The amount exceeded the agent’s human-approval threshold. Nothing has been charged yet; a human must approve. Your webhook approval.required fires at the same time.
error
The policy blocked it (limit, category not allowed, insufficient balance). The agent spent nothing.

4. Confirm the money arrived

That’s it: an autonomous agent just paid you, within rules a human defined.

What happened behind the scenes

Every step above emitted events. If you had registered a webhook endpoint first (one POST), you would have received charge.created, payment.succeeded, and charge.succeeded, each signed with HMAC-SHA256. See Webhooks.

Where to go next

Get paid repeatedly

Use PayLinks to pre-authorize a budget once, then charge against it all month.

Full API reference

Every endpoint, parameter, and response field.