Credit Billing
FirstHandAPI uses a pre-funded credit model. Deposit credits upfront, and they are consumed as worker submissions are approved.
How Credits Work
- Deposit credits via Stripe Checkout
- Credits are held when a job is posted (files_needed x price_per_file)
- Credits are paid out to workers when submissions are approved
- Remaining held credits are released when a job completes or is cancelled
Checking Your Balance
const balance = await client.getCreditBalance();
console.log(balance.available_cents); // 45000 ($450.00)
console.log(balance.held_cents); // 2500 ($25.00 held for open jobs)balance = client.get_credit_balance()
print(balance["available_cents"]) # 45000Purchasing Credits
const purchase = await client.purchaseCredits({
amount_cents: 10000, // $100.00
});
// Redirect user to purchase.checkout_urlpurchase = client.purchase_credits({"amount_cents": 10000})
# Redirect user to purchase["checkout_url"]Cost Per File
You set the price per file when creating a job. The platform split is:
| Recipient | Share |
|---|---|
| Worker | 80% |
| FirstHandAPI | 20% |
Example: If you set price_per_file_cents: 100 ($1.00), the worker receives $0.80 and the platform takes $0.20.
Auto Top-Up
Enable automatic credit replenishment:
await client.updateSettings({
auto_topup_enabled: true,
auto_topup_threshold_cents: 5000, // Top up when below $50
auto_topup_amount_cents: 25000, // Purchase $250
});Credit Expiration
Credits expire 12 months after purchase. Expiring credits are consumed first (FIFO).