Overview
The bank rail keeps a reserve token aligned with cash at a bank. It mints tokens when a bank transfer credits the organisation's reserve account, and pays redemptions back to a client's bank account over FIX (Financial Information eXchange). The counterparty is either the built-in FIX simulator or, in external mode, your bank's FIX acceptor.
Bank rail routes live under / and /. Self-service participant routes live under /api/v2/users/me. For screen walkthroughs, see the Console guide.
Two companion guides cover money movement:
- Bank rail credits covers listing, approving, screening, resolving, and recalling inbound bank credits.
- Bank rail cash-outs covers paying out client redemptions in booked and delegate modes.
Access, approvals and idempotency
Every /api/v2/bank-rail route requires the Bank rail manager role on the acting wallet. Read routes also admit the Auditor role and write sensitive-read entries to the audit trail. Write-time checks (token-link-candidates, activation preflight, and delivery checks) stay manager-only, returning 403 bank to other callers.
Participant writes (POST /api/ and POST /api/) require the participant's signed-in session and refuse API keys. In the Investor portal, clients use Deposit → By bank transfer, Transfers, and Account → Bank accounts (backed by GET /api/ and GET /api/).
In the Console, each bank rail token displays Payments (recalls and credit sheets), Cash-outs (returned payouts and re-credits), and Settings (credit threshold, mint cap, and pending limit requests with Approve and Reject).
Some decisions always require maker-checker approval regardless of policy: bank accounts, cash-outs above the redemption threshold, and executing or abandoning a recall (Approvals). Other decisions wait for a second manager only when the bank-rail approval family (off by default, configured via PUT /api/ or Approvals) is enabled:
- Credits over the credit threshold, parked-credit resolutions, and reserve adjustments.
- Raised credit thresholds, raised mint caps, and allowing other accounts to manage a booked token's supply.
- Completing or abandoning a rail wallet rotation.
When the bank-rail family is off, these proceed with a waived record (threshold, cap, and supply-manager changes still require wallet verification on session calls). When it is on, proposers cannot decide their own requests, impersonated sessions are refused (impersonated-session), and when the policy's requiredApprovals exceeds 1 that many distinct approvers must approve.
Setup writes (connections, the logon password, token and client links, client accounts, escrows, and rail wallet rotations) fall under the Custody administration approval group. While the approval policy protects that group, each change waits until another organisation owner or a platform administrator approves it (General settings).
POST /api/, POST /api/, POST /api/, and POST /api/ honour Idempotency-Key, which is required for delegate cash-outs (Idempotency and async settlement).
Surfaces and error codes
Routes belong to the bankRail operation group in the SDK (dalp.api.bankRail) and CLI (dalp get bank-). Bank rail refusals use DALP-14113 to DALP-14123, DALP-14126 to DALP-14140, DALP-14391, DALP-14422 to DALP-14424, and DALP-9701 to DALP-9703 for escrows (error index).
Activating a connection across cURL, CLI, and SDK:
curl -sS -X POST "$DALP_API_URL/api/v2/bank-rail/connections/$CONNECTION_ID/transitions" \
-H "X-Api-Key: $DALP_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "transition": "activate" }'
dalp create bank-rail connections transitions "$CONNECTION_ID" --transition activateawait dalp.api.bankRail.connectionTransition({
connectionId,
transition: "activate",
});
const connections = await dalp.api.bankRail.connectionsList();Activation returns 200 with the updated connection:
{
"id": "0b7f5c1e-3d2a-4c8e-9f61-5a2e7d4b8c90",
"organizationId": "org_7Hq2kWm9",
"senderCompId": "DALP-ISSUER",
"targetCompId": "RESERVEBANK",
"reserveAccount": { "accountId": "AE070331234567890123456", "currency": "AED" },
"matchingMode": "reference",
"bankName": "Reserve Bank",
"allowedMessages": {
"inbound": ["credit", "balance-report", "execution-report"],
"outbound": ["payment-instruction"]
},
"payoutDeadlineSeconds": 604800,
"settlementWindowSeconds": 86400,
"holidayCalendarId": "adgm",
"paymentTimeZone": "Asia/Dubai",
"paymentCutOffTime": null,
"state": "active",
"credentialVersion": 1,
"rowVersion": 3,
"createdBy": "usr_4Fp8nQx2",
"createdAt": "2026-11-02T08:14:05.000Z",
"updatedAt": "2026-11-02T09:02:41.000Z"
}Set up a connection
Bank rail routes are served only when global. (BANK_FIX_ENABLED) is true (default false). bankFix.mode defaults to simulator listening on 127.0.0.1:9878 (bank and listenPort). If that port is busy, the scheduler logs an error and /readyz returns 503 (bank-) until you free the port and restart the pod.
Paths in the tables below are relative to /api/v2/bank-rail.
POST /connections requires payoutDeadlineSeconds and settlementWindowSeconds (60 to 31,536,000 seconds each, with window shorter than deadline). The Console defaults to 604800 (7 business days) and 86400 (1 business day). Instructions are sent only while remaining deadline time covers the settlement window.
In external mode, the scheduler dials your bank's FIX acceptor once per active connection, distinguishing sessions by their CompIDs:
Startup fails (never falling back to the simulator) if host or port is missing, if tls is false for a non-loopback host, or if reconnectMinMs exceeds reconnectMaxMs.
The active scheduler pod validates the bank's TLS certificate against default CAs without a client certificate. Its /readyz response includes a bankFix object (sessions, loggedOn, and status: logged-on or not-logged-on) while keeping HTTP 200 ok so Kubernetes does not restart pods during bank outages.
Suspended connections send Logout within about 10 seconds, and newly activated connections dial within about 10 seconds.
Bank FIX session
- The scheduler sends Logon (
49=senderCompId,56=targetCompId,108=30, password in554) without requesting a sequence reset. - The bank replies with Logon (
49and56swapped, no554). A sequence number below expected without43=Yis rejected with Logout, while141=Yresets both sequences. Missing Logon closes the socket after 30 seconds. - The scheduler sends a Heartbeat after 30 seconds of silence, responds to TestRequest, and logs out after 90 seconds of bank silence.
- Reconnect backoff doubles from
reconnectMinMsup toreconnectMaxMs, resetting once a session lasts at leastreconnectMaxMs. - Sequence numbers persist in both directions. Sequence gaps trigger ResendRequest. On bank resend requests, the scheduler replays stored business messages (up to the newest 4,096 messages or 16 MiB per connection) with
43=Yand122, and sends gap fills (35=4,123=Y) for session messages or older entries. - Updating the logon password drops the active session within about 10 seconds so the next Logon uses the new credential.
Link the reserve token
Each connection links one reserve token, and each token links to one connection. Call GET /connections/ to list eligible zero-supply tokens whose decimals cover the reserve currency.
- Create the link:
POST /connections/with{connection Id}/ token- links token,checkerThreshold(currency minor units over a rolling 24-hour non-released cash-out window), and optionalcreditCheckerThreshold. Startspending-roleand refuses tokens with existing supply. - Preflight (optional):
POST /connections/runs activation checks without signing or wallet verification. Returns{connection Id}/ token- links/ {token Link Id}/ activation/ preflights 200with nextaction(grant-supply-role,add-supply-delegate,activate,reinstate, ornone) or422 bankwithRail. token Link. REFUSED data.reasonanddata.accounts. - Activate:
POST /connections/(with wallet verification on session calls) grants supply authority from your token admin ({connection Id}/ token- links/ {token Link Id}/ activation booked) or governor (delegate) wallet. Once the grant is indexed, call activation again to move the link toactive. Refusals name the first failing check (supply-role-heldorsupply-delegate-heldlist the accounts to revoke). - Delete:
DELETE /connections/deletes a{connection Id}/ token- links/ {token Link Id} pending-rolelink that has no clients and no open limit or supply-manager requests.
Supply mode is fixed at creation from the token's features:
Tokens must be organisation-issued DALP custodian tokens whose decimals cover the currency's minor units (not-custodian, not-issued, needs-hold, redemption-, needs-supply-delegate, decimals, token-linked, currency-linked, supply-not-zero).
On a booked link, POST /connections/ with {"transition": "update- allows other supply-role holders to book movements (subject to bank- maker-checker approval when the bank-rail family is on). Reconciliation labels booked-mode payouts booked ahead of bank settlement (whether booked by the rail before instructing or by another supply manager) as bookedAheadOfPayment. Externally booked lines also record bookedBy on the cash-out and raise a critical case if the bank fails to pay.
Add clients and bank accounts
POST /connections/links a participant and wallet (generating a payment reference in{connection Id}/ client- links referencemode, or acceptingvirtualIbaninvirtual-ibanmode).DELETEremoves a client link unless live accounts (accounts-live) or open gateway deliveries (deliveries-open) exist.POST /connections/(or{connection Id}/ client- links/ {client Link Id}/ accounts POST /api/for self-service) proposes a payout account.v2/ users/ me/ bank- accounts POST /connections/takes{connection Id}/ client- accounts/ {account Id}/ decisions {"action": "approve"}, orrefuse/revokewithreason. The proposer cannot approve. Revoking releases uninstructed cash-outs.- List routes:
GET /connections/,{connection Id}/ client- links GET /connections/,{connection Id}/ client- accounts GET /connections/, and{connection Id}/ client- accounts/ {account Id} GET /api/.v2/ users/ me/ bank- accounts
Cash-outs pay only to active bank accounts.
Bank rail managers (and auditors for reads) can read setup prerequisites without extra system roles: GET /api/, GET /api/ (person participants only), and GET /api/ for the rail wallet. Registering the rail wallet's identity remains an identity-manager task (POST /api/ and POST /api/, or Register rail wallet identity on the token's Settings tab).
Contain the rail wallet
The rail wallet signs mints and burns automatically for every bank connection on a network. If the key is lost or compromised, contain it immediately to halt signing and stage a replacement wallet. See the rail wallet incident runbook.
While contained, incoming credits park as supply-authority, uninstructed cash-outs release as link-inactive, and token link activation or deletion returns rail-wallet-contained.
Revoke and grant are signed by your own wallet (with walletVerification on session calls) and are safe to retry. On a compromised rotation, granting also waits until every token link is revoked (409 revoke-) and the old escrow is empty (409 old-). Once the first revoke or grant queues (handoverStartedAt is set), abandon is refused with 409 authority-.
Completion is refused with 409 completion- while any blocker remains:
- Old wallet has unsettled transactions, still holds supply authority on any linked token (including
pending-rolelinks), or holds unfrozen token balances. - An authority grant or delegate re-delegation to the old wallet is still in flight (also opens a
securityoperations case). - Staged wallet does not exclusively hold supply authority, lacks a delegate escrow, or holds less balance than connection suspense.
- Old delegate escrow still holds tokens, or the indexer lags behind the chain.
When approved (or on the next rotation read if the bank-rail approval family is off), the rail switches atomically: the staged wallet becomes active, the old wallet becomes retired, links reinstate, and supply-authority credits re-admit. If the switch hits a transient error while approved (409 state), trigger another read rather than deciding again.
Empty an escrow the old wallet controls
In delegate mode, a token custodian evacuates locks from the old wallet's escrow using POST /api/ with an Idempotency-Key header (and walletVerification on session calls):
curl -sS -X POST "$DALP_API_URL/api/v2/addons/escrows/$ESCROW_ADDRESS/forced-transfers" \
-H "X-Api-Key: $DALP_API_KEY" \
-H "Idempotency-Key: evacuate-escrow-001" \
-H "Content-Type: application/json" \
-d '{
"token": "0x8a791620dd6260079bf849dc5567adc3f2fdc318",
"from": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"to": "0x4F1bE7dB9d2c3aA85f6C1E0b7D9a2C4e6F8b0A1c",
"amount": "1000000",
"lockIds": ["0x3f1c5a7e9b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a"]
}'The destination to depends on the cash-out's state:
Refusals return 409 ESCROW_ with data.reason (or 403 ESCROW_). Separate paid and unpaid locks into distinct requests. Always call this route rather than the contract directly so cash-out guards apply.
recover burns finalised forced transfers into the rail wallet until the cash-out returns to paid. Sending recover while transfers are unfinalised returns reason recovery. Resend once finalised.
Follow payment statuses with webhooks
Subscribe an endpoint on the link's System and network explicitly to bank-rail.credit.* and bank-rail.cash-out.* to track committed milestones (default state subscriptions skip them).
- Credits emit admission, completed mint, hold and resolution, and full cancellation or recall. Approvals and intermediate submissions emit no events.
- Cash-outs emit requested, instructed, paid, returned, and released milestones.
See the event catalogue for exact triggers and Accounting feed events for decimal amounts and posting rules.
Reconcile the reserve
GET /connections/ (with X-Chain-Id) compares the latest bank balance report against token supply, and the rail wallet's balance against suspense credits. Token facts must come from an unchanged drained block at or beyond the chain's finalised block.
When a block is indexed during the read, the platform reads the facts again at the new block. Facts stay unavailable if the watermark is missing, unfinalised, or moves during each of three reads. Unreadable values return null, never 0, and pending reports retry once facts become available.
Live reconciliation terms
An inTransit transfer settling on chain can briefly reduce the rail wallet balance before leaving inTransit, clearing on the next report. Daily reconciliation CSV exports include inGateway, inGatewayCount, deliveredCoins, deliveredReceipts, deliveredCount, returnedElsewhere, returnedElsewhereCount, inRedemption, inRedemptionCount, and delivery.<state> / delivery.<state>Count (older versions display unavailable).
During a rail wallet rotation, railWallets lists every relevant wallet oldest first (pinned, current, staged, and retired) with state, balance, and supply authority, while rotation names any open rotation. The suspense line sums listed balances excluding frozen retired wallets. The line breaks if an external account holds supply authority, if zero or multiple wallets hold it, or if an unfrozen retired wallet still holds tokens.
Daily reconciliation
A daily version freezes both reconciliation lines for audit and CSV export (omitting live-only consecutiveBreaks and breakSince). Configure reportCutoff (time in HH:MM:SS and IANA timeZone, defaulting to 23:59:59 UTC). The first run for a date pins that cutoff.
POST /connections/with{connection Id}/ daily- reconciliations {"date": "2026-creates a run for a closed date, pinning10- 24"} pins.balanceReportAsOfandpins.indexedBlock.GET /connections/lists the latest version per date ({connection Id}/ daily- reconciliations filter[from],filter[through],sort=dateor-date,page[limit],page[offset]).GET /connections/reads the latest version, a specific{connection Id}/ daily- reconciliations/ {date} version=1, or exports immutable CSV bytes withformat=csv(filename,contentType,csv).
Each version stores runAt, trigger, line, unavailableReasons, and openCaseCount (unresolved connection, token link, and daily report cases, exported as openReconciliationCases).
When your accounting rules map inbound bank credits in the connection's currency, ledger adds the third leg of three-way reconciliation by reading that client-money account from the Xero Balance Sheet as of date. It reports ledger.balance, ledger.accountCode, ledger.unexplained, and ledger.status (clear, break, or unavailable), or null when unmapped. CSV adds ledgerStatus, ledgerAccountCode, ledgerBalance, and ledger.unexplained.
If Xero is disconnected, uses another currency, or lacks the accounting. scope, unavailableReasons names why and the worker retries automatically.
All inputs are read together at a stable drained finalised block. Equal pins return the existing version, higher pins create the next version, and older pins return 409 evidence-. Unclosed dates return date-not-closed, ambiguous DST cutoffs return cutoff-unavailable, and missing dates return 404.
Every five minutes, the background worker evaluates the last three closed days for active and suspended connections, skipping complete versions and retrying incomplete ones. Days leaving that window still incomplete open a warning reconciliation case.
Reserve adjustments
Use reserve adjustments to explain bank balance movements that have no credit or cash-out (bank fees, interest, payer refunds, or opening balances):
POST /connections/takes{connection Id}/ reserve- adjustments reason(bank-fee,interest,refund-to-payer,opening-balance), signedamount(non-zero, in token units),bankReference, andeffectiveAt. Refusals return409withdata.reason(no-token-link,amount-precision,amount-too-large,future-posting,bank-reference-used).POST /connections/takes{connection Id}/ reserve- adjustments/ {adjustment Id}/ decisions {"action": "approve"}or"reject". The proposer cannot approve (409 proposer-). When thecannot- approve bank-railapproval family is off, adjustments auto-approve immediately.GET /connections/lists stored adjustments.{connection Id}/ reserve- adjustments
Only approved adjustments with effectiveAt at or before a balance report's timestamp explain that report. Later approvals apply from the next report onward.
Next steps
- The Console guide shows the same flows on screen.
- The error index lists every bank rail refusal code.
- Idempotency and async settlement explains the
Idempotency-KeyandPrefercontracts.