TheWavlyDocs
DocsAPI reference

API overview

The TheWavly API is organised around resources, uses JSON for requests and responses, and standard HTTP verbs and status codes. Every endpoint is described in /v1/openapi.json (OpenAPI 3.1), and this reference is generated from that same document.

Base URL
https://thewavly.com/v1

Authentication

Authenticate with a secret key in the Authorization header. Keys are created in the dashboard under Developers → API keys.

Shell
curl https://thewavly.com/v1/mandates -H "Authorization: Bearer sk_test_…"
PrefixModeNotes
sk_test_TestFree. Sees only test data.
sk_live_LiveNeeds a confirmed email. Live checks are billed.

Keep secret keys on your servers. A few endpoints are public and need no key: payment token inspect, redeem and release; the registry's verify call and public profiles; signature verification; organisation keys; health; and the OpenAPI document. Each reference entry says which it is.

Restricted keys and scopes

Give each system the narrowest key it needs. A restricted key carries scopes, and a call outside them is refused with 403 insufficient_scope, naming the scope it needs. Each operation in the reference lists its scope.

PresetScopesFor
Agentmandates:read, checks:read, checks:write, approvals:readThe agent itself
Paymentschecks:read, payments:read, payments:writeReconciliation jobs
Disputeschecks:read, mandates:read, disputes:read, disputes:writeA disputes team's tools
Read onlyEvery :read scopeDashboards and audits

All scopes: mandates:read, mandates:write, checks:read, checks:write, approvals:read, disputes:read, disputes:write, payments:read, payments:write, agents:read, agents:write, webhooks:read, webhooks:write, events:read, end_users:erase, billing:read.

Idempotency

Send an Idempotency-Key header on every write. Repeating the request with the same key and body returns the first answer instead of applying it twice. The same key with a different body is refused with 409 idempotency_mismatch. The SDKs generate a key for each write and reuse it on retries.

Shell
curl https://thewavly.com/v1/checks -H "Authorization: Bearer $WAVLY_API_KEY" \
  -H "Idempotency-Key: order-1042" -H "Content-Type: application/json" -d '{ … }'

Tip: Use your own order or attempt id as the key. A network failure then never creates a second check for the same purchase.

Errors

Errors use HTTP status codes and a JSON body:

JSON
{ "error": { "code": "invalid_field", "message": "rules.items must list at least one item", "field": "rules.items", "request_id": "req_JFLIImMGkRYl" } }
StatusMeaning
400The request is malformed, for example invalid JSON.
401No key, or an invalid or revoked key.
403The key lacks the scope, or the role lacks permission.
404No such object, or it belongs to the other mode.
409A conflict: an idempotency mismatch, a token already used, or an object in the wrong state.
410Expired: an approval link or payment token past its time.
413 / 415The body is too large, or not application/json.
422A field is missing or invalid; field names it.
429Rate limited. Retry after the time in Retry-After.
5xxSomething failed on our side. Nothing was applied, so retry with the same Idempotency-Key.

Request ids

Every response carries a Request-Id header, and error bodies repeat it as error.request_id. Quote it when you contact us; it finds the exact call in our logs.

Pagination

List endpoints return up to limit objects (default 25, at most 100), newest first:

JSON
{ "object": "list", "data": [ … ], "has_more": true }

To get the next page, pass the last object's id as starting_after.

Shell
curl "https://thewavly.com/v1/checks?limit=100&starting_after=chk_…" -H "Authorization: Bearer $WAVLY_API_KEY"

Rate limits

Each key may make 100 requests per 10 seconds. Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, the Unix time the window resets. A 429 includes Retry-After. The SDKs wait and retry automatically.

Amounts and currency

Amounts are whole numbers of paise: ₹1 is 100, ₹2,499 is 249900. Fields that hold amounts end in _paise. The currency is INR.

Versioning

The current API version is 2026-11-22, reported by /v1/health. Every change is in the changelog.

Changes and deprecation

Additive changes come without notice. Within /v1 these are:

  • new endpoints;
  • new optional request fields;
  • new response fields;
  • new event types;
  • new values in fields documented as open-ended, such as a reason code.

Write your code to ignore fields and event types it does not know, and verify webhook signatures rather than the shape of a payload.

Breaking changes come with notice. These are:

  • removing or renaming a field or endpoint;
  • changing a field's type or meaning;
  • making an optional field required;
  • changing a decision rule so that the same purchase gets a different answer.

What we commit to for a breaking change:

  • Six months' notice at least, and twelve months for organisations with an enterprise order form.
  • Notice in three places: in the changelog, by email to every organisation's owners and admins, and on the affected endpoints themselves. Those endpoints carry the standard Deprecation and Sunset response headers and a Link to the announcement, so you can find every affected call in your logs.
  • A new path, such as /v2/…, or an opt-in. The old behaviour keeps working until the sunset date.
  • Signed records stay verifiable for good. Mandates, receipts, findings and fulfilment reports issued under an old version verify with the published keys and the open format, whatever changes later.

The one exception is security. If keeping an old behaviour would put customers or their users at risk, we may change it sooner. We would say why in the changelog and email affected organisations at once.

Webhooks

Instead of polling, receive signed events at your endpoint. See Webhooks.