Banking & fintech
Modern Treasury mock API
Modern Treasury API: counterparties, external and internal accounts, payment orders, expected payments, ledger accounts and transactions with signed webhooks.
At a glance
- Operations
- 191
- Stateful operations
- 32
- Stateful resources
- 7
- Webhook events
- 7
- Vendor API version
- v1
- Verification
- Spec-verified
How it works
Use Modern Treasury without calling Modern Treasury Corp.
- Install the mock from the library into a workspace. It runs as a virtual service.
- Point your client's base URL at the virtual service instead of the vendor.
- Authenticate the way you already do. The mock accepts the same credential shape:
Authorization: Basic b3JnLWlkOnNlY3JldC10ZXN0LWtleQ== State
Resources that remember
Writes persist per caller, so a create followed by a read returns what you created.
| Resource | Operations |
|---|---|
| Counterparties | 5 |
| External accounts | 5 |
| Internal accounts | 3 |
| Payment orders | 4 |
| Expected payments | 5 |
| Ledger accounts | 5 |
| Ledger transactions | 4 |
Webhooks
Events your handlers can receive
- payment_order.created
- payment_order.completed
- payment_order.updated
- payment_order.returned
- expected_payment.reconciled
- ledger_transaction.created
- ledger_transaction.posted
Deliveries are signed with the hmac scheme, so your verification code runs unchanged.
Coverage
191 operations
32 of them are stateful. The largest groups:
| Group | Operations |
|---|---|
| Other operations | 160 |
| Counterparties | 5 |
| Expected payments | 5 |
| External accounts | 5 |
| Ledger accounts | 5 |
| Ledger transactions | 4 |
Verification
Spec-verified
Generated operations are checked against the vendor OpenAPI description, which proves shape and routing. Stateful operations and scenario suites prove behaviour. Responses are not yet compared with a live vendor sandbox.
9 operations cannot be checked against the specification.
Source and limits
License, source and limits
- Generated from the Modern Treasury Corp. API description, licensed under MIT.
- Modern Treasury Corp. API documentation
- Source specification
Each collection holds up to 1 MiB of objects per API key (organization); writes beyond that are dropped (x-maxoperf-vs-state: capacity). Stateful: counterparties, external accounts, internal accounts (2 seeded USD accounts; update only, creation answers a sample), payment orders, expected payments, ledger accounts and ledger transactions; every other operation answers a schema-valid sample. The seeded object id 00000000-0000-4000-8000-000000000001 exists in every collection (and 000...0002 for counterparties, internal and ledger accounts). Payment orders start approved and progress approved, processing, completed (about 0.5 s and 1.5 s after creation) when read; a read stores the observed status; cancel/approve/return checks use the status derived from the elapsed time (no prior read needed). PATCH status needs_approval stops the progression; PATCH status returned is a mock extension (from processing/completed) that emits payment_order.returned; payment_order.completed is scheduled 1.5 s after creation and is not recalled by a cancellation. Lists are newest first with the cursor in the X-After-Cursor response header (empty on the last page); filters are exact-match on the documented fields (name, email, counterparty_id, status, type, direction, ...), the status filter on payment orders matches the last stored status (the time-derived status is stored only when that order is read or patched; the engine cannot derive it per list item), and metadata[...] and created_at filters are not implemented. Ledger balances are static zeros (entries do not move balances), counterparty accounts[] is always empty, current_hold and current_return are null. Idempotency-Key replays return the original object on counterparty, payment order and ledger transaction creates, scoped per API key; a different body with the same key is not distinguished. Webhooks are registered in the dashboard in the real service: here they go to the Virtual Service webhook setting and are signed with HMAC-SHA256 hex in X-Signature over the raw body.
MaxoPerf is not affiliated with, endorsed by, or sponsored by Modern Treasury Corp. Modern Treasury is a trademark of its owner.