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.
| The request | Returns | Why |
|---|---|---|
| A body over 1 MiB | 413body_too_large | An operation reads at most 1 MiB (1,048,576 bytes) of body. |
| A body that is not JSON | 415media_type_unsupported | Only JSON bodies are accepted. |
| An unknown member | 400parameter_unknown | The operation does not declare that query parameter or body member. A misspelling counts. |
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:
{
"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:
| Member or value | What 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 |
|
| Field names |
|
| Enumerations | Strings, such as |
| Timestamps | RFC 3339 (opens in a new tab) in UTC with a |
| 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:
{
"amount": "12500000",
"amount_decimal": "12.5",
"decimals": 6,
"asset": "USDC"
}| Member | Type | What it holds |
|---|---|---|
amount | string | The 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_decimal | string | The 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"). |
decimals | integer (int32) | The asset's decimals on its network, which amount_decimal is scaled by. |
asset | string | The 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
amountdoes not fit in a uint256.
Response headers
Every response carries Request-Id and Stridge-Contract-Version. Some carry more, depending on what they return.
| Header | On | What it says |
|---|---|---|
Request-Id | Every response, success or failure |
|
Stridge-Contract-Version | Every response | The exact version of the API that handled the request. |
RateLimit-LimitRateLimit-RemainingRateLimit-Reset | Responses counted against your rate budget | Where your rate budget stands. See Rate limits. |
Retry-AfterStridge-Rate-Limited-Reason | 429 responses | Added to a |
Cache-Control: no-store | Responses 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, noterror.message; - accept, in your webhook receiver, an event type it does not recognise.
The earlier API stays at /v1. See Legacy v1.