Get from zero to your first transactions in 5 minutes. By the end, you'll have funded an account, split a payment, and checked balances — all using Numscript.
This guide assumes you have fctl installed and a sandbox running. If not, start with the Platform Quick Start.
Your First Transaction#
Create a ledger
POST/api/ledger/v2/main
This creates a ledger named main. All accounts and transactions will live here.
Fund a user account
Split a payment
Check balances
GET/api/ledger/v2/main/accounts
You should see:
| Account | Balance (USD/2) | Meaning |
|---|---|---|
user:alice | 7000 | $70.00 remaining |
merchant:bob | 2700 | $27.00 (90% of $30) |
platform:fees | 300 | $3.00 (10% of $30) |
Every cent is accounted for. The sum of all non-world balances equals the total funded.
What Just Happened#
- Double-entry: every
sendcreates balanced movements — what leaves one account enters another @world: a special infinite source/sink for money entering and exiting the ledgerUSD/2: Universal Monetary Notation — the asset type and precision, no floating-point- Splits: Numscript natively handles percentage splits with
remainingcatching rounding - Scarcity: the ledger rejects transactions when the source account has insufficient funds