Contracts
Fund Existing Milestone with Admin Balance
Apply restricted admin-balance funding to an existing eligible unfunded milestone without creating a duplicate.
POST
Applies OpenTrain’s restricted
No funding-source field is accepted.
ADMIN_BALANCE funding marker to one existing eligible NOT_FUNDED milestone. The operation updates that milestone in place; it never creates a replacement contract or milestone.
This endpoint is available only to eligible OpenTrain platform administrators in the canonical admin organization. It is deliberately separate from ordinary employer milestone funding, and it does not accept a client-controlled funding source.
Success transitions the existing milestone to ACTIVE_FUNDED, moves $0, and creates no Stripe charge or PaymentIntent. Releasing payment later remains a separate human-authorized action.
Authorization and validation
The server independently verifies every restricted platform-admin condition described on Create Admin-Balance Milestone. It also verifies that:- the milestone belongs to the named contract and authorized organization;
- the milestone is still eligible and
NOT_FUNDED; - its amount, contract rate, and volume are internally consistent; and
- sequencing and unresolved-payment rules allow funding.
Request
string
required
Contract that must own the milestone.
string
required
Existing eligible
NOT_FUNDED milestone.string
required
Stable request key, 1–128 characters. Identical retries return the original result; conflicting reuse fails closed.
Response
Returns200. The result includes the contract and job IDs, the existing milestone ID and new status, fundingSource: "ADMIN_BALANCE", moneyMoved: false, releaseRequiresHumanApproval: true, and idempotentReplay.
TypeScript SDK
@opentrain-ai/sdk 0.22.0 or later exposes the same operation: