HTTP API
Reference
Base URL http://127.0.0.1:43120·Authorization: Bearer pk_...
Conventions
| Rule | Detail |
|---|---|
Auth | Bearer pk_ on every /v1 call. Portal cookies cannot call the API. |
Amounts | Decimal strings. Do not send JSON numbers. |
Create | HTTP 201 on a new order_id or payout_id, 200 if that id already exists. |
Query | POST /v1/orders/info or POST /v1/payouts/info. |
Webhooks | HMAC of the raw body. Reply with the plain text success. |
Error codes: 40000, 40100, 40400, 40900. Statuses: orders and payouts.
Orders
Create OrderCreate a payment order from your CRM. On success the API returns cid and checkout_url. The same order_id for a workspace returns the existing order (idempotent create).POST/v1/ordersQuery OrderLook up an order by cid or order_id. If both are sent, cid wins. Open orders past expiry are marked expired on this read and emit order.expired.POST/v1/orders/info
Payouts
Create PayoutSend a customer withdrawal from available USD. Same payout_id for a workspace returns the stored payout (idempotent create). There is no checkout URL.POST/v1/payoutsQuery PayoutLook up a payout by payout_id or id. If both are sent, id wins.POST/v1/payouts/infoAvailable BalanceUSD available to withdraw. Paid orders credit this balance; payouts debit it.GET/v1/balance
Assets
Webhooks
Order Payment NotificationWe POST when order status changes. Your server must return HTTP 2xx and a body strictly equal to success (trimmed, case-insensitive).WEBHOOKcallback_urlPayout NotificationWe POST when a withdrawal status changes. Your server must return HTTP 2xx and a body strictly equal to success (trimmed, case-insensitive).WEBHOOKcallback_url