latestOpenAPI 3.1.02026-08-218667571.2 MB

a8ca30023371

User APIs
ledger-platform

Apply S3 Tokens

Apply tokens to one upcoming invoice.

Synchronous on purpose: the client has to learn now that an invoice is no longer editable, rather than discovering later that their application silently did nothing.

Applying reserves the tokens; it writes no ledger transaction. The CONSUME lands only when the invoice finalizes, which is what makes editing and un-applying free.

Returns 409 invoice_no_longer_editable once the credit line is on the Stripe draft.

post/api/v1/ledger/s3/apply

Request body

block_contract_idstring uuid required
period_seqinteger required
idempotency_keystring nullable

Response

Successful Response

reservation_idstring uuid required
block_contract_idstring uuid required
period_seqinteger required
applied_tokensstring required
invoice_amountstring required
net_duestring required
availablestring required
reservedstring required
remainingstring required