Railsr Transaction API.
Covers all money movements: outbound payments, inter-ledger transfers, FX conversions, and quarantine resolution.
Transaction Statuses
pending → processing → accepted | failed | quarantined → resolved
Payment Types
"faster-payment"— UK FPS (near-instant)"bacs"— UK BACS (3–5 days)"sepa"— European SEPA (same/next day)"swift"— International SWIFT
Summary
Functions
Approve a quarantined transaction.
Foreign exchange between two currency ledgers owned by the same enduser.
Retrieve a transaction by its ID.
Transfer funds between two Railsr ledgers (no external bank railsr).
List transactions for a ledger or across all ledgers.
List transactions currently in quarantine (held by compliance firewall).
Reject a quarantined transaction with a reason.
Resolve a quarantined transaction.
Retry a failed transaction.
Create an outbound payment to a beneficiary.
Poll a transaction until it reaches a terminal status (accepted, failed,
quarantined) or the timeout is exceeded.
Functions
@spec approve( String.t(), keyword() ) :: {:ok, Railsr.Types.Transaction.t()} | {:error, Railsr.Error.t()}
Approve a quarantined transaction.
@spec fx( map(), keyword() ) :: {:ok, Railsr.Types.Transaction.t()} | {:error, Railsr.Error.t()}
Foreign exchange between two currency ledgers owned by the same enduser.
Required params
:source_ledger_id:destination_ledger_id:amount:fixed_side—"source"|"destination"(which amount is fixed):reason
@spec get( String.t(), keyword() ) :: {:ok, Railsr.Types.Transaction.t()} | {:error, Railsr.Error.t()}
Retrieve a transaction by its ID.
@spec inter_ledger( map(), keyword() ) :: {:ok, Railsr.Types.Transaction.t()} | {:error, Railsr.Error.t()}
Transfer funds between two Railsr ledgers (no external bank railsr).
Required params
:source_ledger_id:destination_ledger_id:amount:currency:reason
@spec list( map(), keyword() ) :: {:ok, [Railsr.Types.Transaction.t()]} | {:error, Railsr.Error.t()}
List transactions for a ledger or across all ledgers.
Query params
:ledger_id— when present, uses the ledger-scoped endpoint:from/:to— ISO 8601 datetimes:transaction_type— filter by type:status— filter by status:limit/:offset— pagination
@spec list_quarantined(keyword()) :: {:ok, [Railsr.Types.Transaction.t()]} | {:error, Railsr.Error.t()}
List transactions currently in quarantine (held by compliance firewall).
@spec reject(String.t(), String.t(), keyword()) :: {:ok, Railsr.Types.Transaction.t()} | {:error, Railsr.Error.t()}
Reject a quarantined transaction with a reason.
@spec resolve_quarantine(String.t(), map(), keyword()) :: {:ok, Railsr.Types.Transaction.t()} | {:error, Railsr.Error.t()}
Resolve a quarantined transaction.
Params
:resolution—"approve"|"reject":reason— explanation string (required for rejections)
@spec retry( String.t(), keyword() ) :: {:ok, Railsr.Types.Transaction.t()} | {:error, Railsr.Error.t()}
Retry a failed transaction.
@spec send_money( map(), keyword() ) :: {:ok, Railsr.Types.Transaction.t()} | {:error, Railsr.Error.t()}
Create an outbound payment to a beneficiary.
Required params
:ledger_id:beneficiary_id:amount— integer in minor currency units (pence, cents):currency— ISO 4217 e.g."GBP":payment_type—"faster-payment"|"bacs"|"sepa"|"swift":reason— payment reference / description
Optional
:reference— beneficiary-visible reference:metadata— arbitrary map stored with the transaction
@spec wait_for_terminal( String.t(), keyword() ) :: {:ok, Railsr.Types.Transaction.t()} | {:error, :timeout | Railsr.Error.t()}
Poll a transaction until it reaches a terminal status (accepted, failed,
quarantined) or the timeout is exceeded.
Options
:timeout_ms— total wait timeout in ms (default: 120_000):poll_ms— polling interval in ms (default: 3_000)