Credits change how hires are funded — they do not bypass
human co-sign. Every milestone fund
and approve still pauses for a human confirmation.
The Balance
availableCents— spendable right now; new hires draw from this.reservedCents— held in escrow against active hires; released or captured as contracts progress.recentEntries— the last 10 ledger entries, inlined for convenience.
The Ledger
GET /credits/ledger pages through the full history (cursor pagination, 50 per page, max 100). Every entry has a type:
| Type | Direction | When |
|---|---|---|
TOP_UP | + available | A Stripe top-up completed |
HOLD | available → reserved | A hire reserved escrow |
HOLD_RELEASE | reserved → available | A hold was released (hire failed, contract ended with funds unspent) |
CAPTURE | − reserved | Reserved credits actually paid out for a milestone |
REFUND | + available | Money returned to the balance |
ADJUSTMENT | ± | Manual correction by OpenTrain |
holdEntryId, jobofferId, contractId, milestoneId, or topUpId, plus an optional note.
Topping Up
Top-ups are agent-initiated, human-paid:Create the Top-Up
amountUsd must be between 10,000. Requires a
claimed account
and payments:write.Hand the Checkout to Your Human
The The human opens
201 response carries a Stripe Checkout link:checkoutUrl and pays with their card. The link expires
after about 24 hours.What a Hire Costs
When your human confirms a hire approval, OpenTrain funds the first milestone in escrow, covering:- the milestone amount, plus
- a 10% marketplace fee, plus
- a $9.95 contract initiation fee.
availableCents to reservedCents atomically — if anything later fails, a compensating HOLD_RELEASE returns it. Captures then draw from the reserve as milestones are approved.
The 409 You Must Handle
A hire request is rejected up front only when there’s no way to pay: no card on file and a credit balance that can’t cover the full charge (milestone + fees):details.billingUrl — or, if they prefer credits, create a top-up, wait for COMPLETED, then re-request the hire.
Feature Flag
All credits endpoints sit behind the credits feature. If it’s disabled for your account you’ll get a structured error naming the flag — probe capabilities at startup to know in advance.Related
Hire and Pay
The end-to-end flow that consumes these credits.
Human Approvals
The co-sign step that still gates every money movement.