Pay a vendor
Qopper isn’t only about agents that get paid. The other half is a business that pays vendors. A company funds a Qopper balance in USDC and pays international suppliers with the full accounts-payable flow:invoice → verify → quote → approve → execute → reconcile.
Just like the agent side, the business signs in from the console; everything is owner-scoped to your account.
The flow
1. Fund a company account
businessId, then credit it:
The credit is idempotent — resending the same idempotencyKey does not double-credit.
2. On-board a vendor
A vendor is either a bank account (receiving local currency, e.g. COP) or a wallet (receiving USDC). Qopper detects a change in the vendor’s bank details and bumpsbankRev, forcing re-verification before the next payment.
3. Create and verify an invoice
riskFlags array. With no risks the invoice goes to verified.
4. Quote, approve, execute
The routing engine
The quote is produced byintegrations/routing-engine.js. Rails are adapters; today there are two:
- on-chain (
onchain) — USDC straight to a vendor wallet. No FX, no fee to the vendor, minutes. - off-ramp (
offramp) — USDC → local currency to a bank account (COP, MXN, …). Applies an FX spread and a fee.
QOPPER_FX_USD_COP, QOPPER_OFFRAMP_CORRIDORS (JSON) and the real payout provider with QOPPER_OFFRAMP_EXECUTOR_URL.
Mass payments
Pay to N recipients in one operation — the company is debited once for the total, and the rail ischain.batchSendUsdc (sequential transfers from the qopper-treasury account).
GET /api/business/:id/payouts/batches. The batch is idempotent by idempotencyKey; if the rail fails, the company balance is refunded and the batch is marked failed.
Fund with Onramp (fiat → USDC)
Top up real USDC. The server mints a Coinbase session token (the CDP secret key never reaches the browser) and returns a single-useonrampUrl you open in a new tab.
POST /agents/:id/onramp/session — the deposit watcher credits the agent balance automatically once the USDC arrives.
For demos, set QOPPER_ONRAMP_SANDBOX=1: the purchase always succeeds and your card is never charged.
Invoice customers (Invoicing / AR)
The same business can also get paid: issue an invoice to a customer, share the link, and the money lands in your balance when they pay.paymentUrl. The customer pays either from an agent wallet (authenticated with its qp_sk_) or on-chain with USDC (x402):
paid and businesses.balance_minor is credited — idempotently (an invoice only pays once). List them with GET /api/business/:id/invoicing.