Service twin · API + UI
Trolley
Test payout agents that onboard recipients, manage compliance, and coordinate global payment workflows.
$ uv tool install blobfish-cli
$ blobfish twin login
$ blobfish twin-runs create --twins trolley --ttl 60 --waitWhat’s inside
A deterministic, seeded, resettable replica: every operation below executes real state transitions against the twin’s own SQLite state — reads are hash-invariant, writes produce inspectable diffs, and reset restores the seed baseline.
Seeded entities
| Entity | Table | Fields | About |
|---|---|---|---|
| recipient | recipients | 8 | Payee (creator, freelancer, or vendor business) onboarded to receive global payouts. |
| recipient_account | recipient_accounts | 9 | Payout destination (bank account or PayPal wallet) attached to a recipient. |
| batch | batches | 7 | Payout batch that groups payments: assembled while open, then sent for processing until complete. |
| payment | payments | 8 | Single payout to a recipient inside a batch, tracked from pending through processing to settlement, failure, or bank return. |
| tax_form | tax_forms | 7 | Tax form / compliance record (W-9, W-8BEN) a recipient completes and the payer team reviews before payouts clear. |
Guarded lifecycles
These state machines are enforced, not decorative: an action whose fromstate doesn’t match is rejected the way the production service rejects it.
batch.status
start_processing: open → processingend_processing: processing → complete
payment.status
mark_processed: processing → processedmark_failed: processing → failed
tax_form.status
submit: incomplete → submittedreview: submitted → reviewed
Three surfaces, one state
Mount Trolley in a twin environment and the same seeded state serves vendor-shaped REST operations, an MCP endpoint for tool calling, and a generated bf-twin CLI — with copy-on-write sessions per rollout and a one-call reset to the seed baseline. Prefer raw HTTP? The same create works with curl:
$ curl -sS -X POST https://blobfish.ai/api/v1/twin/environments \
-H "X-API-Key: $BLOBFISH_API_KEY" -H "Content-Type: application/json" \
-d '{"services":["trolley"],"ttl_minutes":60}'Known limitations
- transcribed from https://docs.trolley.com/api; parameter and response schemas simplified
- nested recipient sub-resources (accounts, tax forms) flattened to top-level collections addressed by recipient_id filters; asynchronous batch and payment processing modeled as explicit actions
- synthetic seeded values