Requests and objects

Every operation follows the same conventions. Once you have called one, you know how the others behave.

Requests

Send every request to https://api.stridge.com/v2 over HTTPS. Send a request body as a JSON object with Content-Type: application/json. A charset parameter is fine.

Every POST takes an Idempotency-Key header, so you can retry it safely. See Idempotency.

Requests that are refused

If the API cannot read a request the way you meant it, the request fails. It never goes on to do something else.

Requests the API refuses before acting on them
The requestReturnsWhy
A body over 1 MiB413body_too_large

An operation reads at most 1 MiB (1,048,576 bytes) of body.

A body that is not JSON415media_type_unsupported

Only JSON bodies are accepted.

An unknown member400parameter_unknown

The operation does not declare that query parameter or body member. A misspelling counts. error.param names it.

The size and type checks run before anything else, the key check included. A body sent to an operation that takes none is ignored.

Objects

Every resource comes back as itself, with no wrapper around it:

A webhook endpoint
{
  "id": "sub_00000000000000000000000001",
  "object": "webhook_endpoint",
  "environment_id": "3f2a6d7e-6b1c-4f2a-9a11-0b53f8d6b2c1",
  "livemode": false,
  "url": "https://example.com/hooks/stridge",
  "name": "Production receiver",
  "enabled_events": ["payout.confirmed", "payout.failed"],
  "event_payload": "thin",
  "is_active": true,
  "status": "enabled",
  "disabled_reason": null,
  "failing_since": null,
  "disable_at": null,
  "created_at": "2026-10-28T09:41:07Z",
  "updated_at": "2026-10-28T09:41:07Z"
}

Every object shares a few members, and every value follows the same format:

The members every object shares, and how its values are written
Member or valueWhat it is
id

An opaque string. Store it as given, and never parse it.

object

The object's type. A payload read on its own, in a log or a webhook body, still says what it is.

livemode

true in live, false in a sandbox. See Environments.

Field names

snake_case.

Enumerations

Strings, such as status. New values can appear, so handle a value you do not recognise.

Timestamps

RFC 3339 (opens in a new tab) in UTC with a Z suffix, such as 2026-10-28T09:41:07Z.

Amounts

Exact decimal strings, never JSON numbers. See Amounts.

A list returns { object: "list", data, has_more, url }, and a search returns { object: "search_result", data, has_more, next_page, url }. See Lists and search.

Amounts

Amounts are exact decimal strings, never JSON numbers, so no precision is lost to floating point. Compare them with decimal arithmetic, never as floats.

When an amount counts a token's smallest unit, amount_decimal sits beside it with the same amount in human units. A TokenAmount carries both, along with the asset's decimals and symbol:

A TokenAmount
{
  "amount": "12500000",
  "amount_decimal": "12.5",
  "decimals": 6,
  "asset": "USDC"
}
The members of a TokenAmount
MemberTypeWhat it holds
amountstringThe amount in the asset's base units: digits only, no sign, no exponent and no leading zero ("0" for zero). At most a uint256, the widest on-chain amount.
amount_decimalstringThe exact human amount, amount / 10^decimals: no sign, no exponent, no leading zero before the point other than a lone 0, and no trailing zero after it ("12.5", "0.000001", "3").
decimalsinteger (int32)The asset's decimals on its network, which amount_decimal is scaled by.
assetstringThe symbol of the asset the amount is in (USDC), so a fee or a total never mixes units.

amount and amount_decimal always agree exactly. If you send a TokenAmount, the request returns 422 parameter_invalid, with error.param naming it, when:

  • its members disagree, or
  • its amount does not fit in a uint256.

Response headers

Every response carries Request-Id and Stridge-Contract-Version. Some carry more, depending on what they return.

The headers a response carries
HeaderOnWhat it says
Request-IdEvery response, success or failure

req_ followed by 24 lowercase letters and digits. Log it next to the call it belongs to, and quote it when you ask Stridge about a request. A failed request's error.request_log_url ends in this id. It is null when the key was missing or refused.

Stridge-Contract-VersionEvery response

The exact version of the API that handled the request.

RateLimit-LimitRateLimit-RemainingRateLimit-ResetResponses counted against your rate budget

Where your rate budget stands. See Rate limits.

Retry-AfterStridge-Rate-Limited-Reason429 responses

Added to a 429. See Rate limits.

Cache-Control: no-storeResponses that carry a secret

Sent with any response that contains a secret, such as a webhook endpoint's signing secret.

Versioning

The base path carries the API's major version, /v2. Within /v2 the API only grows, and a client written to expect that growth keeps working:

Within /v2 the API can grow by

  • new operations and resources;
  • new optional request parameters;
  • new members in a response, or a new order of members;
  • new values in an enumeration;
  • a new length or format for an opaque string, such as an id;
  • new wording for an error message;
  • new event types.

So write your client to

  • accept a response member or enumeration value it does not recognise;
  • branch on error.code, not error.message;
  • accept, in your webhook receiver, an event type it does not recognise.

The earlier API stays at /v1. See Legacy v1.