Most institutions use scheduled downloads — see Statements. This page is for institutions wiring Musubi into a TMS/ERP (Kyriba, SAP, Oracle) or with real-time reconciliation needs that can’t wait for batch exports.
When to use this
- You’re wiring Musubi into a TMS or ERP (Kyriba, SAP S/4HANA, Oracle TRM, etc.)
- Your accounting posts trades to the GL in real time
- Your treasury automation initiates orders based on internal rules (payment schedules, sweep triggers)
- You’re building a custom treasury dashboard
Authentication
JWT bearer token, typically refreshed every hour. Full details: Authentication. Cache the token, refresh ~60 seconds before expiry, retry once on 401 after a forced refresh.Integration modes
- Webhook (recommended for TMS/ERP)
- SSE (streaming)
Status: webhook endpoint coming. In the interim, use SSE (next tab) or a scheduled poll of
GET /api/v1/orders?status=SETTLED&updated_after=... to pick up newly-settled orders.- Idempotency key =
intent_id + transaction_hash - On webhook receipt, post a journal entry to the GL and mark the payment complete in the TMS
- For
EXECUTINGevents, optionally update dashboard state without posting
REST — order initiation
For institutions automating order initiation (e.g., scheduled payments from a TMS):| Endpoint | Purpose |
|---|---|
POST /api/v1/orders | Create a new FX order |
GET /api/v1/orders/{intent_id}/quotes | List quotes for an order |
POST /api/v1/orders/{intent_id}/quotes/{quote_id}/accept | Accept a quote |
POST /api/v1/orders/{intent_id}/cancel | Cancel a PENDING or QUOTED order |
GET /api/v1/orders/{intent_id} | Get order by ID |
TMS/ERP integration notes
- Idempotency — key accounting posts by
intent_id + transaction_hash. Webhook retries or SSE reconnects can replay events. - Reconciliation — match
intent_idback to your internal payment reference (store it as amemoprefix or in your own ID mapping table). - FX posting — post the JPYSC0 out-leg at
source_amount_actual×fx_rateequivalent, and the USDCx in-leg attarget_amount. Thetransaction_hashis your settlement proof. - Cost-guard policy — set
source_amount_maxfrom your treasury risk rules, not from the UI. Orders exceeding the guard returnSLIPPAGEwithout settling.
Other stacks
Same patterns apply:- Node —
fetchfor REST;EventSource(native) oreventsourcepackage for SSE;express/fastifyHMAC-verifying webhook handler - Python —
httpxorrequestsfor REST;httpx-ssefor SSE;Flask/FastAPIwithhmac.compare_digestfor webhooks - Kotlin —
WebClient+ktor-client-cioworks
Next steps
- For institutions not automating, the Console + Statements path covers the same workflow without code — see Console and Statements.
- Full endpoint reference — API Reference.