Skip to main content

Mint tokens from bank credits and pay out redemptions through the API

The routes that connect a bank over FIX, link the reserve token, add clients, contain the rail wallet and explain reconciliation gaps.

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 /api/v2/bank-rail/connections and /api/v2/bank-rail/rail-wallet. 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 bankRail.access.MANAGER_REQUIRED to other callers.

Participant writes (POST /api/v2/users/me/bank-accounts and POST /api/v2/users/me/bank-cash-outs) 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/v2/users/me/bank-deposits and GET /api/v2/users/me/bank-cash-outs).

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/v2/operations/approval-policy 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/v2/bank-rail/connections/{connectionId}/cash-outs, POST /api/v2/users/me/bank-cash-outs, POST /api/v2/bank-rail/rail-wallet/rotations, and POST /api/v2/bank-rail/connections/{connectionId}/daily-reconciliations 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-rail --help). 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 activate
await 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.dalpApp.config.bankFix.enabled (BANK_FIX_ENABLED) is true (default false). bankFix.mode defaults to simulator listening on 127.0.0.1:9878 (bankFix.simulator.listenHost and listenPort). If that port is busy, the scheduler logs an error and /readyz returns 503 (bank-fix-simulator-unavailable) until you free the port and restart the pod.

Paths in the tables below are relative to /api/v2/bank-rail.

Step
Route
What it does
Create a connection
POST /connections
Stores a draft with the FIX CompIDs, reserve account, currency, and matching mode (reference or virtual-iban). These fields are immutable.
Change timing
PATCH /connections/{connectionId}
Updates bank name, allowed messages, payout deadline, and settlement window when expectedRowVersion matches.
Set logon password
PUT /connections/{connectionId}/credential
Stores the tag 554 password when expectedCredentialVersion matches. Ends any live session and never returns the password.
Activate or suspend
POST /connections/{connectionId}/transitions
Sends {"transition": "activate"} or {"transition": "suspend"}. Activation requires a stored password.
Read or list
GET /connections, GET /connections/{connectionId}
Lists connections with filter[q], filter[state] (draft, active, suspended), sorting (createdAt, bankName), and pagination.

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:

Setting
Variable
Default
What it controls
bankFix.external.host
BANK_FIX_EXTERNAL_HOST
none
Bank FIX acceptor host
bankFix.external.port
BANK_FIX_EXTERNAL_PORT
none
Bank FIX acceptor port
bankFix.external.tls
BANK_FIX_EXTERNAL_TLS
true
Enables TLS for the FIX session
bankFix.external.tlsServerName
BANK_FIX_EXTERNAL_TLS_SERVER_NAME
the host
Expected TLS certificate hostname when different from host
bankFix.external.openTimeoutMs
BANK_FIX_EXTERNAL_OPEN_TIMEOUT_MS
10000
TCP and TLS handshake timeout
bankFix.external.reconnectMinMs
BANK_FIX_EXTERNAL_RECONNECT_MIN_MS
1000
Initial reconnect backoff delay
bankFix.external.reconnectMaxMs
BANK_FIX_EXTERNAL_RECONNECT_MAX_MS
60000
Maximum reconnect backoff delay

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

  1. The scheduler sends Logon (49=senderCompId, 56=targetCompId, 108=30, password in 554) without requesting a sequence reset.
  2. The bank replies with Logon (49 and 56 swapped, no 554). A sequence number below expected without 43=Y is rejected with Logout, while 141=Y resets both sequences. Missing Logon closes the socket after 30 seconds.
  3. The scheduler sends a Heartbeat after 30 seconds of silence, responds to TestRequest, and logs out after 90 seconds of bank silence.
  4. Reconnect backoff doubles from reconnectMinMs up to reconnectMaxMs, resetting once a session lasts at least reconnectMaxMs.
  5. 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=Y and 122, and sends gap fills (35=4, 123=Y) for session messages or older entries.
  6. Updating the logon password drops the active session within about 10 seconds so the next Logon uses the new credential.

Each connection links one reserve token, and each token links to one connection. Call GET /connections/{connectionId}/token-link-candidates to list eligible zero-supply tokens whose decimals cover the reserve currency.

  1. Create the link: POST /connections/{connectionId}/token-links with token, checkerThreshold (currency minor units over a rolling 24-hour non-released cash-out window), and optional creditCheckerThreshold. Starts pending-role and refuses tokens with existing supply.
  2. Preflight (optional): POST /connections/{connectionId}/token-links/{tokenLinkId}/activation/preflights runs activation checks without signing or wallet verification. Returns 200 with next action (grant-supply-role, add-supply-delegate, activate, reinstate, or none) or 422 bankRail.tokenLink.REFUSED with data.reason and data.accounts.
  3. Activate: POST /connections/{connectionId}/token-links/{tokenLinkId}/activation (with wallet verification on session calls) grants supply authority from your token admin (booked) or governor (delegate) wallet. Once the grant is indexed, call activation again to move the link to active. Refusals name the first failing check (supply-role-held or supply-delegate-held list the accounts to revoke).
  4. Delete: DELETE /connections/{connectionId}/token-links/{tokenLinkId} deletes a pending-role link that has no clients and no open limit or supply-manager requests.

Supply mode is fixed at creation from the token's features:

Token features
Supply mode
Activation grants
Cash-outs use
Booked movements (Hold) with holder-requestable redemptions
booked
Supply management role
Client redemption line
Supply delegate feature, no booked movements
delegate
Sole supply delegate (capped at expectedMintCap if set)
Rail-controlled escrow

Tokens must be organisation-issued DALP custodian tokens whose decimals cover the currency's minor units (not-custodian, not-issued, needs-hold, redemption-not-requestable, needs-supply-delegate, decimals, token-linked, currency-linked, supply-not-zero).

On a booked link, POST /connections/{connectionId}/token-links/{tokenLinkId}/transitions with {"transition": "update-supply-managers", "allowOtherSupplyManagers": true} allows other supply-role holders to book movements (subject to bank-rail-supply-managers 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/{connectionId}/client-links links a participant and wallet (generating a payment reference in reference mode, or accepting virtualIban in virtual-iban mode). DELETE removes a client link unless live accounts (accounts-live) or open gateway deliveries (deliveries-open) exist.
  • POST /connections/{connectionId}/client-links/{clientLinkId}/accounts (or POST /api/v2/users/me/bank-accounts for self-service) proposes a payout account.
  • POST /connections/{connectionId}/client-accounts/{accountId}/decisions takes {"action": "approve"}, or refuse/revoke with reason. The proposer cannot approve. Revoking releases uninstructed cash-outs.
  • List routes: GET /connections/{connectionId}/client-links, GET /connections/{connectionId}/client-accounts, GET /connections/{connectionId}/client-accounts/{accountId}, and 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/v2/participants, GET /api/v2/participants/{participantId}/wallets (person participants only), and GET /api/v2/system/wallets/{wallet}/identity for the rail wallet. Registering the rail wallet's identity remains an identity-manager task (POST /api/v2/identities and POST /api/v2/system/identity-registrations, 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.

Step
Route
What it does
Read wallet
GET /rail-wallet
Returns address, generation, state (active or contained), and any open rotation.
Contain wallet
POST /rail-wallet/rotations
Takes {"reason": "lost"} or "compromised" and optional note. Suspends every token link on the network. Resending with "compromised" upgrades a lost rotation and cancels pending abandon requests.
Read rotation
GET /rail-wallet/rotations/{rotationId}
Returns state, contained wallet, supply-authority holders, old-wallet balances, inTransit credits, and plain-text completionBlockers.
Revoke old key
POST /rail-wallet/rotations/{rotationId}/transitions
{"transition": "revoke-old", "tokenLinkId": "..."} revokes the old wallet's supply authority on that token.
Grant new key
POST /rail-wallet/rotations/{rotationId}/transitions
{"transition": "grant-new", "tokenLinkId": "..."} grants supply authority to the staged wallet once no other account holds it.
Ask to abandon
POST /rail-wallet/rotations/{rotationId}/transitions
{"transition": "abandon"} restores a lost wallet if no authority has moved (compromised returns 409 compromised).
Ask to complete
POST /rail-wallet/rotations/{rotationId}/transitions
{"transition": "complete"} switches to the staged wallet once completionBlockers is empty.
Decide request
POST /rail-wallet/rotations/{rotationId}/decisions
{"decision": "approve"} or {"decision": "reject", "reason": "..."} by a different manager.

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-pending) and the old escrow is empty (409 old-escrow-funded). Once the first revoke or grant queues (handoverStartedAt is set), abandon is refused with 409 authority-moved.

Completion is refused with 409 completion-blocked while any blocker remains:

  • Old wallet has unsettled transactions, still holds supply authority on any linked token (including pending-role links), or holds unfrozen token balances.
  • An authority grant or delegate re-delegation to the old wallet is still in flight (also opens a security operations 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/v2/addons/escrows/{escrowAddress}/forced-transfers 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:

Cash-out state
Required to
Next step
Before instruction, or released
Holder (from), allowed only during a compromised rotation
Cash-out releases with reason escrow-evacuated
Instructed, awaiting bank report
Refused with 409 cash-out-in-flight
Retry after the bank reports
Paid by bank (unbooked)
Staged (or active) rail wallet
Send {"action": "recover"} to POST /api/v2/bank-rail/connections/{connectionId}/cash-outs/{cashOutId}/transitions

Refusals return 409 ESCROW_FORCED_TRANSFER_REFUSED with data.reason (or 403 ESCROW_CUSTODIAN_REQUIRED). 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/{connectionId}/reconciliation (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

Term
Line
Meaning
recalledNotBurnt
Reserve
Open recalls received by report time, within the settlement window.
overdueRecalls
Reserve (break)
Open recalls past the settlement window. Raises a critical case and no longer explains the gap.
recallBurntAfterReport
Reserve
Recalls received after report time and already completed (net of write-down).
awaitingBurn
Suspense
Clawed tokens in the rail wallet awaiting burn or excess return to the client.
inTransit
Suspense
Credits minted to the rail wallet for a custody gateway client that await delivery.
inGateway
Informational
Coins held inside a custody gateway (including refused deposits in escrow).
delivered
Informational
coins accepted by gateways and the receipts minted for them.
returnedElsewhere
Informational
Gateway returns paid to a retired rail wallet (also shown on its railWallets row).
inRedemption
Informational
Recalled receipts in the rail wallet awaiting gateway coin payout (which then joins awaitingBurn).
deliveryBreakdown
Informational
Count and coin totals grouped by gateway delivery state.

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/{connectionId}/daily-reconciliations with {"date": "2026-10-24"} creates a run for a closed date, pinning pins.balanceReportAsOf and pins.indexedBlock.
  • GET /connections/{connectionId}/daily-reconciliations lists the latest version per date (filter[from], filter[through], sort=date or -date, page[limit], page[offset]).
  • GET /connections/{connectionId}/daily-reconciliations/{date} reads the latest version, a specific version=1, or exports immutable CSV bytes with format=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.reports.balancesheet.read 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-older. 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/{connectionId}/reserve-adjustments takes reason (bank-fee, interest, refund-to-payer, opening-balance), signed amount (non-zero, in token units), bankReference, and effectiveAt. Refusals return 409 with data.reason (no-token-link, amount-precision, amount-too-large, future-posting, bank-reference-used).
  • POST /connections/{connectionId}/reserve-adjustments/{adjustmentId}/decisions takes {"action": "approve"} or "reject". The proposer cannot approve (409 proposer-cannot-approve). When the bank-rail approval family is off, adjustments auto-approve immediately.
  • GET /connections/{connectionId}/reserve-adjustments lists stored 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

Was this page helpful?