Settlement API
Endpoint path /api/v1/escrow — legacy name kept for compatibility.
Successful orders are held (payment held) until the goods are delivered. Advance the lifecycle server-to-server as you fulfil the order; releasing the order settles your QOOP-Pay settlement balance (amount minus your commission) and fires the escrow.released webhook.
POST /api/v1/escrow
Content-Type: application/json
{
"live_api_key": "qpk_live_…",
"transaction_ref": "QP-ABC123", // or "order_id": "ORD-77" — one is required
"event": "dispatched" // dispatched | delivered | release
}Events
| event | Order state | Meaning |
|---|---|---|
dispatched | DISPATCHED | Order handed to the delivery channel |
delivered | DELIVERED_CONFIRMED | Delivery confirmed |
release | ESCROW_RELEASED | Funds released to your settlement balance (amount − commission) |
Transitions move forward one step at a time — successful payments start held (ESCROW_HOLD) when the checkout completes. Repeating an event whose state already applies succeeds idempotently with "replayed": true.
Responses
// 200 — transition applied
{ "ok": true, "transaction_ref": "QP-ABC123", "order_id": "ORD-77",
"escrow_state": "ESCROW_RELEASED", "replayed": false,
"settlement": { "gross": "50000.00", "commission": "2500.00", "net": "47500.00" } } // release only
// 200 — idempotent replay
{ "ok": true, "transaction_ref": "QP-ABC123", "order_id": "ORD-77",
"escrow_state": "DISPATCHED", "replayed": true }
// errors — { "ok": false, "error": "…" }
400 bad request (missing fields, unknown event) · 401 invalid live_api_key
404 transaction not found (or not yours) · 409 invalid transition / ambiguous order_idAuto-release
Members confirm delivery from their transactions page, which settles the order instantly and credits your balance the same way as a release call. Orders that wait past the auto-release window (7 days from the last state movement, configurable in QOOP-Pay) are settled automatically by the platform on the same terms. If the buyer reports a problem with the delivery, the order is excluded from auto-release until QOOP-Pay ops resolves the report — you will see it stay in the held state until then.
payout.paid.