Skip to content

Burn self-serve test-mode funds off a programme float

POST/v1/simulated-withdrawals

Requires an API client bearer token.

Self-serve TEST-MODE programme defunding: burns test money off the named programme's float via the ledger's issuance path. Exactly one of `amount` or `drain: true` (drain requires `currency` — it reads the float's current available balance and burns exactly that, deliberately non-atomic against a racing top-up). Live-mode funding stays operator-only — this route is 403 in live mode regardless of caller role. Requires an Idempotency-Key header.

Parameters

Header parameters

NameRequiredDescription
Idempotency-Keyrequired

Client-chosen. An identical retry with the same key returns the stored response; reusing the key with a different payload returns 409.

Request body

program_idstring (uuid)required
amountobject
+ show properties
amountstringrequired
currency"EUR" | "GBP" | "USD"required
draintrue
currency"EUR" | "GBP" | "USD"
referencestring

Example

curl -X POST https://api.rigid.fi/v1/simulated-withdrawals \
  -H "Authorization: Bearer $RIGID_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "program_id": "uuid"
}'

Responses

200

Result of the withdrawal.

idstring (uuid)required
program_idstring (uuid)required
amountobjectrequired
+ show properties
amountstringrequired
currency"EUR" | "GBP" | "USD"required
actor_user_idstring | nullrequired
transfer_idstringrequired
float_account_idstringrequired
referencestring | nullrequired
created_atstringrequired
float_availableobjectrequired
+ show properties
amountstringrequired
currency"EUR" | "GBP" | "USD"required
replayedbooleanrequired
400

Validation error — including float_insufficient (posted-basis: the float cannot cover this burn), no_float (never minted into), nothing_to_drain (drain against a zero/absent balance), or a missing/blank Idempotency-Key header

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
401

Authentication required

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
403

Live mode, or caller is not a programme admin for this programme

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
409

Idempotency-Key reused with a different payload, or the ledger module is definitely not enabled

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
500

Internal server error

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
503

This programme's module configuration has not been received yet (code `config_cold`) — retry

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring