Retry a settlement

POST/settlements/{id}/retry

Send a settlement's deposit out again now, to the destination its deposit address resolves to at the moment of the retry. It is the one move on this family a client can drive: every other state a settlement reaches is Stridge's.

  • It is legal out of retrying and out of failed.

    Out of retrying it runs ahead of the next automatic attempt, which retry.next_automatic_attempt_at names. Out of failed it runs past the automatic limit, after Stridge has stopped trying on its own. Either way it counts as an attempt, and retry.attempts says how many there have been.

  • It answers 202 with the attempt it started, the way a webhook event's resend answers with the delivery it created: pending, or awaiting_credit when the workspace's gas credit cannot pay for the move, which runs once credit arrives and spends no retry meanwhile. Its outcome is read back from GET /settlements/{id}/attempts.

Show 6 more details
  • Every retry that goes out sends the uda.settlement.retrying webhook, with the settlement as the retry found it: retrying, the failure being retried, and the attempts made before this one. A retry waiting for credit sends uda.settlement.awaiting_credit instead.

  • One manual retry per settlement every five minutes.

    A retry inside that window answers 429 settlement_retry_too_soon, with Retry-After in seconds and error.retry_after, the instant the next one is accepted. A settlement's own read says the same as retry.available_at before anyone asks. The window is the settlement's: retrying one does not hold any other back.

  • A settlement in any other state answers 409 settlement_not_retryable, and one whose deposit is being refunded answers 409 settlement_refund_in_flight. A settlement of another environment answers 404 resource_missing naming id, identical to one that exists nowhere.

  • Retrying the request.

    Send an Idempotency-Key and a retry with the same key within 24 hours answers the first 202 again and spends nothing. A 409 or a 429 is a refusal made before the retry began, which is not remembered, so the same key runs afresh once its cause has passed. The same key with a different request answers 400 idempotency_key_reused, and a retry while the first is still running answers 409 idempotency_key_in_use.

  • Who may.

    In live it is an owner's alone: a developer or a viewer answers 403 permission_denied. In a sandbox an owner and a developer may, and a viewer answers 403 permission_denied. A retry chooses neither the destination nor the amount, so it asks no step-up. A secret key of the environment may too when it holds uda.settlement_retry; one without it answers 403 permission_denied.

  • A resetting sandbox.

    While a sandbox's reset runs it answers 409 environment_resetting.

Parameters

Path

  • idstring <uuid>required

    The settlement being retried. A value that is not a UUID answers 422 parameter_invalid naming id.

Headers

  • X-Stridge-Environmentstring <uuid>optional

    Which environment the request acts inside, on an operation a session and an API key both call. Learn more

    Show full description

    It is required under a person's session, exactly as EnvironmentHeader describes: a session request that omits it answers 400 with environment required, and one naming an environment the caller holds no membership of answers 404.

    An API key names its own environment, so a request made with one omits this header. A key request that sends it answers 400 with environment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it.

  • Idempotency-Keystringoptional

    A caller-chosen key making this request safe to retry. Sent, the server remembers what the first request with it produced; omitted, every request is a new one. Learn more

    Show full description

    The same key with the same parameters returns the first result, status and body both, and does nothing a second time. So a retry after a dropped connection is safe whether or not the first attempt landed. The parameters are compared as parsed, not as bytes: the query with its names sorted and the JSON body decoded, so member order, spacing and escaping never make two requests differ, while any changed value does.

    What is remembered is the answer of an attempt that began execution, success or failure, a 500 included. A refusal made before execution is not remembered, so a retry with the same key runs afresh once its cause is fixed: a validation error (400, 422), a 409 conflict, a 429, a 403 step_up_required, and any answer carrying Retry-After. An answer whose body is larger than 64 KiB is not remembered either, and an operation may say that its 500 is not; a retry of either runs the request again. What the first attempt did stands, so a create that took a unique value answers that value's conflict on the retry: a payout whose first attempt took its reference_id answers 409 payout_reference_taken.

    The same key with different parameters answers 400 with idempotency key replayed with a different body: a key names one request, and reusing it for another is a client bug rather than a retry. A replay while the first request is still in flight answers 409 at once with a request with this idempotency key is still in flight, and the remedy is to retry once the first has answered.

    Keys are scoped to the environment the request acts inside, and to its reset: one environment's key never answers another environment's request, and a key used before a sandbox reset runs afresh after it.

    An operation that acts on a workspace or on the account rather than inside an environment, such as creating a workspace or requesting go-live in the dashboard, scopes its keys to the caller and to its path, so the same key sent for another workspace is a separate request and never a replay.

Responses

The retry was accepted. The answer is the attempt it started; its outcome is read back from the settlement's attempts.

  • objectstringrequired

    The object's type, always settlement_attempt.

  • settlement_idstring <uuid>required

    The settlement this attempt was carrying.

  • environment_idstring <uuid>required

    The environment the settlement belongs to.

  • livemodebooleanrequired

    true when environment_id names a live environment and false in a sandbox. It is carried on the object itself, so a payload read on its own still says which side of the boundary it came from.

  • attempt_numberinteger <int32>required

    Which attempt this was, counting from one, the original dispatch.

  • automaticbooleanrequired

    true for an attempt Stridge made on its own, false for one a person made with POST /settlements/{id}/retry.

Show 4 more fields
  • statusstringrequiredenum pending · success · failed · awaiting_credit

    How the attempt went. pending has not ended; success carried the deposit to its destination, which a completion arriving after a failure also reports; failed did not, which is what a retry exists to fix, and is also how an attempt a refund interrupted ends.

    Show full description

    awaiting_credit is a retry waiting for the workspace's gas credit: it runs once credit arrives, and spends no retry meanwhile.

  • errorstring | nullrequired

    Why a failed attempt failed, or null on every attempt that has not. Developer documentation, not user copy.

  • created_atstring <date-time>required

    When the attempt started. RFC3339 UTC, Z suffixed.

  • updated_atstring <date-time>required

    When the attempt's status last changed. It equals created_at on an attempt that has not moved.

Errors

The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.

Request
curl "https://api.stridge.com/v2/settlements/string/retry" \
  -X POST \
  -H "Authorization: Bearer $STRIDGE_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Set your secret key as STRIDGE_SECRET_KEY (sent as Authorization: Bearer).

Response202
"object": "settlement_attempt",
"settlement_id": "4c81d3f6-7a92-4b0e-9d1f-2e6a8c05b743",
"environment_id": "3f2a6d7e-6b1c-4f2a-9a11-0b53f8d6b2c1",
"livemode": false,
"attempt_number": 2,
"automatic": false,
"status": "failed",
"error": "destination poll timeout",
"created_at": "2026-01-14T10:02:11Z",
"updated_at": "2026-01-14T10:02:40Z"
}