Skip to main content
Deposits add real capital to the Treasury through Stripe Checkout. Both calls require Stripe to be connected; otherwise they fail honestly.

Start a deposit

Creates a real Stripe Checkout session for the amount and returns the URL to redirect to.
number
required
The amount to deposit. Minimum $1.
string
default:"demo"
The workspace to credit on return.
The response is the Checkout session (including its url). The success URL returns to /command?deposit_session={CHECKOUT_SESSION_ID} and the cancel URL to /command?deposit_cancelled=1.

Confirm a deposit

Confirms a returned Checkout session and credits the Treasury. Crediting is idempotent on the Stripe session id, so a refresh or double return cannot double-count.
string
required
The Stripe Checkout session id returned to the success URL.
string
default:"demo"
The workspace to credit. Must match the workspace the deposit was started for.
boolean
Whether Stripe confirms the session was paid.
boolean
True if this session was already credited.
number
The confirmed amount.
TreasuryState
The Treasury state after crediting.

Errors