Skip to content

rail API Specification (1.1.2)

Welcome to the rail Developer Guide!

Download OpenAPI description
Languages
Servers
Mock server

https://docs.rail.io/_mock/api-docs/openapi/rail-spec/

Sandbox - Stable API Instance

https://sandbox.layer2financial.com/api/

Production - Stable API Instance

https://platform.layer2financial.com/api/

Applications

Applications represent the onboarding journey for your customers. They are used to collect KYC information and documents required to open accounts on the platform. Visit our guides for a detailed understanding on how to use these APIs.

Operations

Accounts

Accounts are used to hold funds on the platform. Once a customer is onboarded via the application process, you can create accounts for them in various currencies.

Operations

Counterparties

Counterparties represent external entities that you may wish to send or receive funds from. All counterparties are verified to ensure compliance with regulatory requirements prior to being available for use for withdrawals.

Operations

Customers

Customers can only be created via the application process. Once created, customers can have multiple accounts associated with them.

Operations

Deposits

Deposits are used to request instructions for funding platform managed accounts from external sources. A given account may have many deposits associated with it depending on the supported rails and configurations.

Operations

Documents

Document uploading and management functions.

Operations

Exchanges

Exchanges are used to convert funds from one currency to another. This is achieved by moving money between 2 platform accounts that are denominated in different currencies. We have eliminated the complexity of traditional currency trading.

Operations

Payments

Payments are used to orchestrate end to end payment flows from external parties or from within the platform.

Operations

Transactions

Transactions are created to record the movement of funds between accounts. The transactions endpoint allows the bulk retrieval of transaction data for reconciliation and reporting purposes.

Operations

Transfers

Transfer are used to move funds between two platform managed accounts that are denominated in the same currency.

Operations

Withdrawals

Move funds from a platform managed account to an external counterparty via supported rails.

Operations

Settlements

Settlement services for funds confirmation and reconciliation. Settlements are a deprecated concept and will be removed in future versions of the API. Please use Payments for all new integrations.

Operations

Request

Returns a detailed breakdown of an outbound settlement by account and customer. Filterable by source and destination accounts.

Security
OAuth2Flow
Path
idstringrequired

Settlement ID

Query
source_account_idstring

Source Account ID to filter settlement on

destination_account_idstring

Destination Account ID to filter settlement on

Headers
Authorizationstring

OAuth bearer token (see authentication flows)

x-l2f-request-idstring

Optional Unique ID per request, useful for fault resolution/diagnosis and audit.

curl -i -X GET \
  'https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/settlements/{settlement_id}?source_account_id=string&destination_account_id=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'x-l2f-request-id: string'

Responses

Success

Bodyapplication/json
dataobject(Settlement)required
data.​idstring

Settlement ID

data.​settlement_statusstring

Status of this settlement. Processed settlements are complete and funds dispersed

Enum"INITIALIZED""DELIVERING""CONVERTING""SETTLED"
data.​settlement_executed_timestampstring(date-time)

Time when this settlement was executed (when funds were dispersed)

data.​settlement_asset_typestring

Asset type of the settlement

Enum"FIAT""BITCOIN""ETHEREUM""POLYGON"
data.​settlement_currencystring

Currency of the settlement

data.​settlement_amountnumber

Full amount of the settlement that was performed (prior to any fee deductions by the receiving institution)

data.​settlement_detailsArray of objects(SettlementDetails)

Breakdown of the transactions that were included in this settlement

Response
application/json
{ "data": { "id": "string", "settlement_status": "INITIALIZED", "settlement_executed_timestamp": "2019-08-24T14:15:22Z", "settlement_asset_type": "FIAT", "settlement_currency": "string", "settlement_amount": 0, "settlement_details": [] } }

Subscriptions (Webhooks)

Manage your callback (webhook) subscriptions. Subscriptions allow you to receive real-time notifications of events that occur within your platform instance. Visit the guides for a full breakdown of all available events.

Operations