ochk.app · HTTP API
The hosted me.ochk.io substrate exposes the contracts the SDK calls into. The SDK is the canonical integration path; this page is the raw HTTP surface for clients that aren't TypeScript or that want to bypass the SDK.
Every endpoint is at https://me.ochk.io/api/... unless noted. Auth is by
cross-subdomain oc_session cookie (Domain=.ochk.io, HttpOnly, SameSite=None,
Secure) issued by the auth host at https://ochk.io, OR by an
Authorization: Bearer <jwt> header (cross-domain integrators that captured the
session token from the popup-signin postMessage). Mutating endpoints are
rate-limited per IP per bucket; limits are returned in X-RateLimit-* headers.
Sign-in endpoints (auth host · https://ochk.io)Link to this section
The session cookie is issued by the family auth host, not by me.ochk.io
directly. The sign-in popup at me.ochk.io/popup/signin calls these endpoints
cross-origin with credentials — they are CORS-allowed for any *.ochk.io
browser origin. ochk.app, on its own domain, calls them without credentials and
keeps the token they return in its own cookie.
| Method | Path | Purpose |
|---|---|---|
POST | / | issue a stateless OTP token + email a 6-digit code (rate-limited 5/hr) |
POST | / | verify {email, code, token}, upsert account, set oc_ cookie |
GET | / | issue a fresh BIP-322 challenge to sign |
POST | / | verify a signed BIP-322 challenge, upsert account, set oc_ |
POST | / | end the session, clear oc_; 503 sign_ keeps it |
GET | / | crypto-only identity lookup; 401 otherwise |
The sign-in popup at me.ochk.io/popup/signin is the client for these
endpoints; signInWithOc() from @orangecheck/me-client/popup opens it.
A sign-out that cannot finish answers 503 sign_out_failed and keeps the
cookie, so a retry ends the same session; it never reads as signed out.
Public endpointsLink to this section
| Method | Path | Purpose |
|---|---|---|
GET | / | liveness probe |
GET | / | dependency probe |
GET | / | canonical envelope JSON for a billable event |
GET | / | canonical envelope for a payment |
GET | / | published PLATFORM_ |
GET | / | published per-class abuse rate limits |
GET | / | the project's live IntegratorPriceConfig, or 404 |
GET | / | sats earned and event counts, last 7d and lifetime |
GET | / | every federation: seats, invite, custody state |
POST | / | validate an IntegratorPriceConfig (echoes on success) |
POST | / | contact form; 500 when the mail provider refuses it |
/api/health/deep includes an escrow debits · outcome known row, degraded
while any escrow debit's outcome is unknown, or while a recorded event's queued
debit waits for its project to top up ("N waiting on funds"); it gives counts
only. The platform owner lists the debits with no known outcome at
GET /api/admin/unresolved-debits. A contact message the mail provider refuses
gives the day's slot back.
/api/stats/earned reads every event in full about once a minute, across all
instances, and its answer carries computed_at. It counts only the events a
live project was billed for against live escrow: test projects' events and
preview events are left out, so while escrow runs in simulation every figure is
0. While one instance recomputes, or a recompute fails, the others answer the
last totals kept, which can be up to a day old. A query string answers 308 to
the bare path.
/api/federations answers a query string with 308 to the bare path too, and
allows 60 reads a minute per IP.
/api/platform-fee-policy and /api/abuse-limits answer
503 policy_unavailable, not cached, when me.ochk.io cannot read its policy
store. Treat that as "try again later", never as the defaults.
AnchoringLink to this section
These signed records are anchored to a Bitcoin block with OpenTimestamps:
- the receipt of each event a live project was billed for from its live balance;
- payment receipts;
- statements;
- payouts (distributions), a payout's void, and the address payouts go to (payout bindings);
- rebinds, the record of a change in how your sats are held. Moving to your own keys is not open, so none is written today;
- each release batch's manifest (drops).
Test events, events a project was not billed for, preview events and a deleted account's payment receipt, whose account id is erased, are not anchored.
A calendar receives only the SHA-256 of a record's canonical bytes, its
digest_sha256. An hourly job submits new digests, then upgrades each pending
proof once a calendar has committed it to a block. The calendars are trust
anchors, so they are named here.
Where digests are submitted. In this order; the first calendar that answers takes the digest:
https://a.pool.opentimestamps.orghttps://bob.btc.calendar.opentimestamps.orghttps://finney.calendar.eternitywall.comhttps://btc.calendar.catallaxy.comhttps://alice.btc.calendar.opentimestamps.org
Which calendars an upgrade asks. A pending proof names the calendar that holds its commitment, which can differ from the one it was submitted to: a.pool hands its proofs to alice. The upgrade asks the calendar the proof names, and only if it is one of these:
https://alice.btc.calendar.opentimestamps.orghttps://bob.btc.calendar.opentimestamps.orghttps://finney.calendar.eternitywall.comhttps://a.pool.opentimestamps.orghttps://b.pool.opentimestamps.orghttps://btc.calendar.catallaxy.com
A proof naming any other calendar is not followed. A record reads anchored
only when its proof reaches the merkle root in the header of the block it names.
Verify a record offlineLink to this section
GET https://me.ochk.io/api/envelope/<id>?format=wrapped returns everything
needed. Event and payment receipts are the one exception to the family's rule
that a record's id is the SHA-256 of its bytes: their id is a routing id
(id_scheme is routing), and digest_sha256 is their content address. Every
other record's id is its digest.
- Base64-decode
canonical_b64. Its SHA-256 must equaldigest_sha256, andidtoo whenid_schemeissha256. - Check
signaturewith the Ed25519 key named by itskidinhttps://me.ochk.io/.well-known/oc-envelope-jwks.json. A statement is signed by the app that made it, not by orangecheck:signature.signerisissuer, and the key issignature.issuer_jwk, which the project's JWKS atsignature.issuer_jwks_urlcarries while that key is current. - When
ots.statusisanchored,ots.proof_b64is an OpenTimestamps proof that starts at the digest. Wrap it in the standard.otsheader and check it with the reference client,ots(opens in a new tab):
# bash; DIGEST is digest_sha256, PROOF_B64 is ots.proof_b64
{
printf '\x00OpenTimestamps\x00\x00Proof\x00\xbf\x89\xe2\xe8\x84\xe8\x92\x94\x01\x08'
printf '%s' "$DIGEST" | xxd -r -p
printf '%s' "$PROOF_B64" | base64 -d
} > receipt.ots
ots verify -d "$DIGEST" receipt.ots # against your own Bitcoin node
ots info receipt.ots # prints the merkle root the proof reaches
Without a node, compare the merkle root ots info prints with the merkleroot
of block ots.btc_block_height from any source you trust. The proof and the
block header are all it takes; orangecheck does not need to be online.
Authenticated endpoints (oc_session required)Link to this section
Integrator-facing endpoints (/api/integrator/event,
/api/integrator/event/batch, /api/payment/authorize) additionally accept
an Authorization: Bearer <token> header — a cross-domain integrator's
backend is on a different eTLD+1 and never receives the Domain=.ochk.io
oc_session cookie, so it forwards the popup-issued JWT instead. The
remaining endpoints in this section require the cookie.
| Method | Path | Purpose |
|---|---|---|
GET | / | crypto-only identity lookup; 401 otherwise |
GET | / | sat balance + last-7d aggregate + by-class breakdown |
GET | / | notifications feed |
POST | / | mark read ({ id }, or { mark_) |
GET | / | GDPR-style account dump · downloadable JSON |
Authenticated · sessions (Per session)Link to this section
| Method | Path | Purpose |
|---|---|---|
POST | / | open a session — records no charge |
POST | / | refresh inside the policy window — free |
POST | / | tear down — free, needs no session |
Authenticated · payment authorization (Per action)Link to this section
| Method | Path | Purpose |
|---|---|---|
POST | / | authorize a payment, at most 20 per account a UTC day · moves no sats yet |
The body takes amount_sats (or usd_cents) and a description of up to 280
characters of text. The description is yours: it stays on the record, and is
never signed, published or served by GET /api/payment/[id]. A 21st
authorization in a UTC day answers 429 payment_daily_cap.
Authenticated · integrator event ingestionLink to this section
project_key (in the body) identifies the billing project. The earner is either
user_address — the user's did_oc, inside the body you sign, which is how a
backend fires — or, from a browser, the signed-in user's cookie or
Authorization: Bearer token (see the note above). Sign the request with the
project signing secret (X-OC-Signature) — in both test and live mode. A
user session proves a user, never the paying project, so an unsigned POST is
admitted only when the session belongs to the project's own owner (the CLI
test-fire path). Anything else gets 401 project_auth_required.
The header is t=<unix-seconds>,v1=<hex>, where v1 is
hmac_sha256(signing_secret, "${t}.${body}") over the exact bytes you send. t
must be within the last 300 seconds and at most 60 seconds ahead of me.ochk.io's
clock. The same signed bytes are processed once: POSTing them again, with or
without an Idempotency-Key, returns the first event
(idempotent_replay: true, or duplicate per event in a batch) and bills
nothing. To retry, resend the same bytes, or sign again with the same
Idempotency-Key. Two identical bodies signed in the same second are one
request.
A live project names only someone who has acted toward it as its earner. That
means a person who signed in on your verified domain with orangecheck, signed in
from your app, granted your project a scope, or agreed to earn on an account
your site made for them through Connect (consent: true). It also means the
project's owner. A user_address naming anyone else answers
403 earner_not_member and records nothing, and charges nothing. The person
becomes one the first time they sign in on your site, so name people who have
signed in there. Someone who signed in before 25 October 2026 becomes one at
their next sign-in. A request carrying the person's own sign-in token for your
origin needs nothing more.
| Method | Path | Purpose |
|---|---|---|
POST | / | fire a billable event under a project_key (live mode requires domain verification) |
POST | / | fire 1–100 billable events in one call · per-event idempotency keys |
Outside the project's pay periods both answer 200 with
earned: false (not_paying per event in a batch) and record nothing. Paying
users is optional.
A test project records events for the account that owns it and nobody else, so
you can try your integration on yourself. An event or batch naming anyone else,
by user_address or by session, answers 403 earner_not_project_owner and
records nothing. Your test projects record at most 500 events a UTC day between
them, across /event, /event/batch and the test-fire button, then
429 test_project_daily_cap. Each test project records at most 5,000 in all,
then 429 test_project_event_cap. Every test project together records at most
2,000 events a UTC day, then 429 test_events_ceiling until midnight UTC; live
projects never count toward it. A refused event records nothing and counts
toward none of these. To record events for your users, verify your domain and go
live. A test project's events are never billed against live escrow, whatever
mode the platform runs in: that is decided when each event comes in. Its live
top-up stays open, because going live needs a funded live balance, which the
project spends once it is live.
/event/batch takes the person's own session, not user_address: the cookie,
or the token from the sign-in popup as Authorization: Bearer. Every event in a
batch earns for that person. A backend that names who earns fires
/api/integrator/event once per event.
A batch answers { ok, results }, one entry per event with its index.
status is recorded or duplicate (with the event), not_paying, or
rejected. A rejected entry carries a code and the same in words in reason.
The codes are the single endpoint's (subtype_required, invalid_note,
invalid_action_label, event_not_enabled, event_class_invalid,
payment_amount_sats_required, agent_refused, earning_below_one_sat,
site_cap_exceeded, idempotency_key_too_long, idempotency_key_in_flight,
identity_cap_reached, escrow_depleted), plus three of the batch's own:
duplicate_idempotency_key (the same key twice in one batch; the earlier entry
counts), write_failed (nothing was recorded; send it again) and
outcome_unknown (it may have been recorded; retry with the same key).
Signing an eventLink to this section
The request body is JSON. The fields, in any order:
| Field | Required | Meaning |
|---|---|---|
project_ | yes | Your project, pk_ or pk_ |
subtype | yes | An event your project defined and enabled, built-in or your own |
user_ | backend | Who earns: the person's did_ from their sign-in token. Accepted only when signed |
payment_ | some | The payment, for an event priced as a share of one |
action_ | no | A short label shown on the receipt: up to 280 characters of plain text |
note | no | A note shown to the person: up to 280 characters of plain text |
is_ | no | true when an AI agent acted for the person |
Sign the exact bytes you send, in one header:
X-OC-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(key, "<t>.<body>")>
The key is the signing secret as text, its characters as UTF-8 bytes: do not
hex-decode it. <body> is the raw request body, byte for byte. A t more than
300 seconds behind the server's clock, or more than 60 seconds ahead of it, is
refused. Send Idempotency-Key (up to 200 characters) to make a retry safe: a
repeat answers the first result with idempotent_replay: true.
In Python, with orangecheck 2.3 or later:
import json, os
import httpx
from orangecheck import sign_event
did_oc: str # from verify_session(...).did_oc
user_id: str # your own id for the same user
body = json.dumps({
"project_key": os.environ["OC_PROJECT_KEY"],
"subtype": "account_creation",
"user_address": did_oc,
})
r = httpx.post(
"https://me.ochk.io/api/integrator/event",
content=body, # the same string that was signed
headers={
"Content-Type": "application/json",
"X-OC-Signature": sign_event(os.environ["OC_SIGNING_SECRET"], body),
"Idempotency-Key": f"signup-{user_id}",
},
)
Without the SDK, the header is
f"t={t},v1=" + hmac.new(secret.encode(), f"{t}.".encode() + body_bytes, hashlib.sha256).hexdigest().
What the event endpoint answersLink to this section
| Status | error / reason | Meaning |
|---|---|---|
| 200 | earned: true | Recorded. event is the receipt; event. is the person's pairwise id for your project |
| 200 | earned: false, reason: not_ | Outside your pay periods: nothing recorded or charged |
| 400 | invalid_ | user_ is not a did: |
| 400 | project_, subtype_ | A required field is missing |
| 400 | payment_ | The event is priced as a share of a payment and payment_ is missing |
| 400 | idempotency_ | Idempotency- is longer than 200 characters |
| 401 | invalid_ | The header is there but does not verify (stale_, future_, bad_, invalid_) |
| 401 | signature_ | A live project, or one requiring signed events, got an unsigned request |
| 401 | project_ | Unsigned, and not from the project owner's own session |
| 401 | earner_ | user_ on an unsigned request |
| 402 | escrow_ | Your balance cannot cover the event; sign-in is unaffected |
| 403 | domain_ | A live project whose domain is not verified |
| 403 | earner_ | A test project's event names someone other than its owner |
| 403 | earner_ | A live project's event names someone who never signed in to it or granted it anything |
| 503 | membership_ | Whether the person may be named could not be read; nothing was recorded, send it again |
| 403 | project_ | Frozen by the platform |
| 404 | project_ | No project has this key. Only a signed-in caller is told; anyone else gets 401 project_ |
| 409 | idempotency_ | The same Idempotency- is still being processed; retry after Retry- |
| 503 | event_ | May or may not be recorded: retry with the same Idempotency- after Retry- (below) |
| 422 | event_, event_ | Not a defined, enabled event, or one saved without class A, B or C |
| 422 | earning_ | It would pay the person nothing |
| 422 | invalid_, invalid_ | Longer than 280 characters, not text, or with a character that hides or reorders text |
| 429 | identity_, site_, rate limits | A per-person or per-site cap, or too many requests |
| 429 | test_ | Your test projects' 500 events for the UTC day are used |
| 429 | test_ | A test project's 5,000 events in all are used |
| 429 | test_ | Every test project together used the 2,000 test events of the UTC day |
A recorded event's answer from /api/integrator/event also carries
webhooks_queued: how many of your webhooks it was queued for, sent after the
answer. It does not say whether they got through; the project's webhooks page
and its retry queue show that. webhooks_fired is the same number under its old
name, deprecated.
A 503 event_outcome_unknown holds its Idempotency-Key: a retry with it
answers 409 idempotency_key_in_flight until the outcome is known, then returns
the recorded event. One that never landed gives the key back, and the next retry
records it once.
The per-person cap on class A events counts only events billed against live escrow. A preview event spends nobody's allowance.
Integrator · trust statementsLink to this section
A live project can say where someone stands on its site: good, caution or
block. The statement is yours, not orangecheck's. Your server signs it with
your project's Ed25519 key, and me.ochk.io checks that signature, records the
statement, anchors it and serves it, but never signs it. Anyone can check it
offline against the key that signed it.
It needs no user session: your project's two signatures are what authenticate it. You can attest only someone who has granted your project a scope, and only from a live project with a verified domain.
Before the first statement, make an Ed25519 key pair, keep the private half on
your server, and register the public half on your project
(POST /api/me/projects/[id]/jwk with { jwk }, or the keys page on ochk.app).
| Method | Path | Purpose |
|---|---|---|
POST | / | publish a statement your server signed · no session |
DELETE | / | revoke one, from the project owner's session |
GET | / | the statement's bytes, its signature and the key that signed it |
What you signLink to this section
The signature covers exactly these bytes: this object, with its keys in this
order, as JSON.stringify writes it.
{
"v": 1,
"kind": "oc-me-trust",
"issuer_project_key": "pk_live_…",
"subject_address": "did:oc:…",
"status": "good",
"note": null,
"expires_at": "2027-04-25T12:00:00.000Z",
"occurred_at": "2026-10-25T12:00:00.000Z"
}
| Field | Required | Meaning |
|---|---|---|
issuer_ | yes | Your live project. Sent as project_ in the body |
subject_ | yes | The person's did_, exactly as issued |
status | yes | good, caution or block |
note | no | Public text, trimmed, at most 280 characters; null for none |
expires_ | yes | When the statement lapses, at most a year ahead, exactly as toISOString( writes it |
occurred_ | yes | Now, as toISOString( writes it; it must arrive within 5 minutes |
The body is those fields plus sig: the Ed25519 signature over the bytes, as
128 lowercase hex characters. Sign the body too, with your signing secret in
X-OC-Signature, exactly as for events.
import { createHmac, createPrivateKey, sign } from 'node:crypto';
type Status = 'good' | 'caution' | 'block';
export async function attest(
projectKey: string,
subject: string,
status: Status
) {
const key = createPrivateKey({
key: JSON.parse(process.env.OC_TRUST_PRIVATE_JWK ?? ''),
format: 'jwk',
});
const statement = {
v: 1,
kind: 'oc-me-trust',
issuer_project_key: projectKey,
subject_address: subject,
status,
note: null,
expires_at: new Date(Date.now() + 90 * 86_400_000).toISOString(),
occurred_at: new Date().toISOString(),
};
// The keys stay in this order: the signature covers these exact bytes.
const sig = sign(
null,
Buffer.from(JSON.stringify(statement)),
key
).toString('hex');
const { subject_address, note, expires_at, occurred_at } = statement;
const body = JSON.stringify({
project_key: projectKey,
subject_address,
status,
note,
expires_at,
occurred_at,
sig,
});
const t = Math.floor(Date.now() / 1000);
const mac = createHmac('sha256', process.env.OC_SIGNING_SECRET ?? '')
.update(`${t}.${body}`)
.digest('hex');
return fetch('https://me.ochk.io/api/integrator/trust-attestation', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-OC-Signature': `t=${t},v1=${mac}`,
},
body, // the same string you signed, byte for byte
signal: AbortSignal.timeout(10_000),
});
}
Sending the same statement again answers the stored one with reused: true. A
revoked statement stays revoked.
What the trust endpoint answersLink to this section
| Status | error | Meaning |
|---|---|---|
| 200 | Recorded: { attestation, reused, verify_ | |
| 400 | expires_, expires_ | No expiry, or one in the past or more than a year ahead |
| 400 | project_, subject_ | A required field is missing |
| 400 | invalid_, invalid_, invalid_ | Not in the one form it is signed in |
| 400 | invalid_ | sig is not 128 lowercase hex characters |
| 400 | note_ | note is not a string |
| 401 | issuer_ | sig does not verify under your project's registered key over these fields |
| 401 | signature_, invalid_ | X- is missing or does not verify |
| 403 | test_ | A test project publishes no statements |
| 403 | domain_, project_ | Your domain is not verified, or the project is frozen |
| 403 | subject_ | That person never granted your project a scope |
| 404 | project_ | No project has this key |
| 409 | issuer_ | Your project has registered no public key |
| 422 | invalid_, note_, occurred_ | A status outside the three, a note breaking the rules, or a stale time |
| 429 | rate limits | Too many requests |
Revoking a statement that does not exist, or one another project published,
answers the same 404 trust_attestation_not_found.
The wrapped envelope names who signed (signature.signer: "issuer"), the key it
was signed with (signature.issuer_jwk, kept on the record so it still checks
after you rotate) and your project's key set (issuer_jwks_url).
Authenticated · integrator project lifecycleLink to this section
| Method | Path | Purpose |
|---|---|---|
GET | / | list every project owned by your identity |
POST | / | create a project, rate-limited 5/min, at most 25 per account. Pays nobody unless pay: { action: 'add', … } asks it to |
GET | / | per-project state · owner-gated |
POST | / | update IntegratorPriceConfig (prices only; a name or domain in the body is ignored) · owner-gated, validates |
PATCH | / | rename: { display_, 1–80 characters · owner-gated |
POST | / | change the domain: { domain }. Never verified: replaced at once. Verified: opens a move (see below) |
DELETE | / | cancel an open move · owner-gated |
DELETE | / | delete project; refused while it holds sats or owes a step (below) · owner-gated |
POST | / | when the project pays its users: add, end, set_, cancel (details) · owner-gated |
POST | / | run a domain-ownership check (DNS TXT, falls back to meta tag); during a move, checks the new domain · rate-limited 5/min |
DELETE | / | reissue the verification token; a verified domain stays verified until its next check · owner-gated |
POST | / | fire a real envelope under this project_key (same pipeline as production) · owner-gated · for the smoke-test sandbox |
GET | / | live event stream for this project · owner-gated |
GET | / | list registered webhooks · owner-gated |
POST | / | register a webhook URL · owner-gated |
A write that sets prices, creating a project with a price config or updating
one, answers 503 policy_unavailable with Retry-After: 30 and saves nothing
when the platform's price bounds can't be read. Send it again.
A project's name, a custom event's label, a drop's label and a directory tagline
are text people read. None may hold a character that hides or reorders text, or
be orangecheck's own name (orangecheck, ochk, ochk.io, ochk.app, in any
case, width or spacing). A project's name says who someone is, so it also may
not hold one of those as a word: "OrangeCheck Fans" is refused, "orangecheckers"
is not. A label or tagline may mention orangecheck. A name breaking the rule
answers 409 name_reserved at create and rename; a label, a 422 naming it. An
account holds at most 25 projects (409 project_limit_reached).
Moving a verified domainLink to this section
A verified domain is what consent screens name and what every receipt records,
so it never changes in one step. POST /api/me/projects/[id]/domain on a
verified project opens a move: the project gets a pending_domain with its own
token, and keeps running on its current domain. Publish that token at the new
domain, exactly as for a first verification, then call /verify. When the check
passes, the new domain becomes the project's domain and the old one is kept in
previous_domains, so receipts recorded under it still belong to the project. A
failed check changes nothing.
Opening a move needs a fresh identity check, as revealing the signing secret
does: without one the call answers 401 identity_reproof_required. A frozen
project answers 409 project_frozen.
Handing a project overLink to this section
POST /api/me/projects/[id]/transfer with { to_did } offers the project to
another account for 7 days, after a fresh identity check. Nothing moves until
that account answers at POST /api/me/project-transfers/[id], with its own
session: { action: 'decline' }, or { action: 'accept', keys }. Escrow and
users' payouts go with the project, and the old owner loses access at once.
The old owner holds copies of the project's signing secret and Connect key, so
an accept says what becomes of them, with no default. keys: 'keep' leaves both
working. keys: 'replace' needs a fresh identity check, since the new values
come back once: the new signing secret is written in the same write that moves
the project, so the project changes hands with it or not at all. The Connect key
is replaced after that, on the auth host. When that fails, the project is still
accepted, replaced.connect is null, the answer, the notice and the audit row
say the Connect key was not replaced, and the old owner stays listed as holding
it until the new owner replaces it on the project's sign-in page. A Connect key
cannot bill on its own.
An accept cut short by an error never leaves the project half-moved. Short of
the project's record moving, nothing moves: the offer stands, the old owner
keeps the project and its signing secret, and accepting again starts over. Once
the record has moved, the project is the new owner's, and the offer stays as
accepted but not finished until they accept again. That accept finishes it as
first chosen, with no second signing secret, and the audit row and each notice
land once; finishing a replace needs a fresh identity check. Until then the
transfer cannot be declined (404) or offered on (409 accept_in_progress),
and it stays in the new owner's incoming list.
Deleting a projectLink to this section
Deleting a project takes everything that only served it: its key, its webhooks and their queued deliveries, an open handover offer, its release schedules, its rate counters and its event index. What belongs to someone else stays: the receipts people earned, the escrow ledger, payouts and release records. Statements the project made about accounts stay too: a statement outlives the project that made it, and still names it.
A delete checks first and deletes nothing while the project holds sats or owes a
step: it answers 409 with a reason and a detail sentence saying what to do
first. Once the checks pass, the project is gone at once: events, top-ups and
handovers sent to it answer as for a deleted project, and what only served it is
removed after.
reason | What to do first |
|---|---|
escrow_ | The project holds sats in escrow (balance_). Refunds aren't self-serve yet: write to billing@ochk.io. |
escrow_ | An event is being charged right now. Wait a minute. |
escrow_ | An event's charge is still being settled, within the hour. |
topup_ | A top-up invoice can still be paid. Wait until it expires, a little over an hour after it was made. |
drop_ | A release schedule still holds what people earned. Turn it off, which releases what it holds at once. |
connect_ | Its Connect app is still being handed back after a handover. Try again in an hour. |
transfer_ | Someone is accepting the project right now. Reload in a minute: it may already be theirs. |
connect_ | A Connect app is linked to the project. Delete it first: Sign-in → Connect app → Delete. |
The same rules hold when orangecheck deletes a project.
Response shapesLink to this section
All authenticated 401s are { ok: false } with
Cache-Control: no-store, private and Vary: Cookie. Every endpoint on this
page except /api/integrator/config and /api/health, and outside /api/me/*,
/api/admin/*, /api/auth/* and /api/contact, refuses with a snake_case code
in error, such as project_key_required or method_not_allowed, and the same
in words in reason or detail when there is more to say: match on error.
/api/integrator/config has no error: it puts its code in reason and its
words in detail. /api/health answers a failed probe with 503 and
status: 'degraded'. The signed-in, admin and sign-in routes are not held to
this yet and may put a sentence in error; a refused price config answers
{ error: 'config invalid', details: [{ subtype?: string, message: string }] }.
All 429 rate-limit responses include a Retry-After header in seconds.
Rate limits per bucketLink to this section
| Bucket | Limit | Window |
|---|---|---|
integrator. | 120 | 60s |
payment. | 30 | 60s |
webhooks. | 10 | 60s |
projects. | 20 | 60s |
developer. | 5 | 60s |
verify- | 5 | 60s |
stats. | 60 | 60s |
public. | 60 | 60s |
Limits are per IP, per bucket (except verify-domain which is per-account so
DNS retries don't get throttled by a noisy neighbor). Headers
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Window are emitted
on every rate-limited response. v1 buckets reset on cold start (per-instance
in-memory); production fronts every endpoint with an edge-level limiter.