The envelope
Every route except the token endpoint answers in the Laces envelope.
Every error from the Partner API carries an
error_code, including rate
limits (rate_limited), unknown paths (not_found), malformed bodies
(invalid_json) and unexpected failures (server_error).
The token endpoint is the exception
to all of this: it uses the OAuth { "error", "error_description" } shape
(below).
Request ids
Every response carries anX-Request-Id header, for example
X-Request-Id: req_V1StGXR8Z5jdHi6BmyT2. Log it with your errors, and quote it
when you contact support@laces.run: it lets Laces
find your exact request. Browsers can read it too: the API exposes
X-Request-Id and Retry-After to your page’s scripts through CORS, so
res.headers.get("X-Request-Id") works in fetch.
Wrong host
Partner credentials are accepted only onhttps://connect.laces.run. If
you send a bearer token, client credentials or a publishable key to another
Laces host (for example https://api.laces.run), the request is refused before
anything else:
https://connect.laces.run/v1.
Error codes
Authentication (every route)
Events
Checkout sessions
Create an order
Pay an order
When a payment attempt fails or expires, the pay response also has
retry_safe: true means a fresh attempt can’t double-charge the payer;
false means don’t retry automatically. Every pay response also has
failure_kind: null unless the attempt failed, otherwise
provider_not_reached (nothing was charged; safe to retry), timed_out,
declined or other. See
Why it failed.
Orders list and read
Everywhere
Token endpoint
POST /oauth/token answers in the OAuth shape
(RFC 6749 §5.2):
{ "error": "invalid_client", "error_description": "Client authentication failed" }.
See Authentication.