Welcome to the rail Developer Guide!
rail API Specification (1.1.2)
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/
https://sandbox.layer2financial.com/api/
https://platform.layer2financial.com/api/
Optional Unique ID per request, useful for fault resolution/diagnosis and audit.
Unique ID used to safely retry an operation. See idempotency section for more details.
How should the deposit be made. PUSH (manually sent by customer) or PULL (automatically pulled via a linked counterparty using a supported rail). If performing a PULL, several conditions apply.
Conditions:
The destination account must be for an asset type that supports pull deposits (e.g. USD, CAD)
The source counterparty must be linked and have an available rail that supports ones of the deposit mechanisms on the destination account (e.g. ACH, EFT).
The deposit request MUST be accepted using the /deposit/accept endpoint to initiate the pull deposit
Destination account on platform into which funds will be deposited
- Mock server
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/deposits
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/deposits
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/deposits
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/deposits \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-l2f-idempotency-id: string' \
-H 'x-l2f-request-id: string' \
-d '{
"deposit_type": "PUSH",
"deposit_destination": {
"destination_account_id": "string"
},
"customer_name": "string"
}'Success
Unique ID of the deposit instance, to be used to lookup deposit status and historical deposits
Status of the deposit.
REQUESTED- Deposit request is created and deposits can be made.EXECUTED- At least 1 deposit was received and successfully processed.FAILURE- There is a problem or failure with an incoming deposit. View deposit details for more information.
Time when the deposit request was generated
How should the deposit be made. PUSH (manually sent by customer) or PULL (automatically pulled via a linked counterparty using a supported rail). If performing a PULL, several conditions apply.
Conditions:
The destination account must be for an asset type that supports pull deposits (e.g. USD, CAD)
The source counterparty must be linked and have an available rail that supports ones of the deposit mechanisms on the destination account (e.g. ACH, EFT).
The deposit request MUST be accepted using the /deposit/accept endpoint to initiate the pull deposit
Destination account on platform into which funds will be deposited
Asset type IDs follow a simple structure as follows: {$BLOCKCHAIN}_{$NETWORK}_{$CURRENCY_CODE} Simple asset type to test with include
ETHEREUM_SEPOLIA_ETHETHEREUM_SEPOLIA_USDCSOLANA_DEVNET_SOLBITCOIN_TESTNET_BTCFIAT_TESTNET_USDFIAT_TESTNET_USDFIAT_MAINNET_USDFIAT_TESTNET_EUR
Instructions of where to send (push) deposits.
List of all available deposit instructions for this account. For crypto accounts typically expect a single entry. For FIAT accounts, there may be several entries for each of the supported rails on that account type.
Type of Instruction
Issued address for the receipt of funds.
Blockchain the address is issued for use on
Network (on the target blockchain) that the address is issued for use on
Asset type IDs follow a simple structure as follows: {$BLOCKCHAIN}_{$NETWORK}_{$CURRENCY_CODE} Simple asset type to test with include.
ETHEREUM_SEPOLIA_ETHETHEREUM_SEPOLIA_USDCSOLANA_DEVNET_SOLBITCOIN_TESTNET_BTCFIAT_TESTNET_USDFIAT_TESTNET_USDFIAT_MAINNET_USDFIAT_TESTNET_EUR
{ "data": { "id": "string", "status": "REQUESTED", "created_timestamp": "2019-08-24T14:15:22Z", "deposit_type": "PUSH", "deposit_destination": { … }, "customer_name": "string", "deposit_source": { … } } }
Optional Unique ID per request, useful for fault resolution/diagnosis and audit.
Unique ID used to safely retry an operation. See idempotency section for more details.
Client signature to validate the provence of the API request. See signing section for more details.
- Mock server
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/deposits/{deposit_id}/accept
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/deposits/{deposit_id}/accept
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/deposits/{deposit_id}/accept
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/deposits/{deposit_id}/accept' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-l2f-idempotency-id: string' \
-H 'x-l2f-request-id: string' \
-H 'x-signature: string' \
-H 'x-timestamp: string'Success
Unique ID of the deposit instance, to be used to lookup deposit status and historical deposits
Status of the deposit.
REQUESTED- Deposit request is created and deposits can be made.EXECUTED- At least 1 deposit was received and successfully processed.FAILURE- There is a problem or failure with an incoming deposit. View deposit details for more information.
{ "data": { "id": "string", "status": "REQUESTED" } }
- Mock server
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/deposits/{deposit_id}
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/deposits/{deposit_id}
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/deposits/{deposit_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/deposits/{deposit_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-l2f-request-id: string'Success
Unique ID of the deposit instance, to be used to lookup deposit status and historical deposits
Status of the deposit.
REQUESTED- Deposit request is created and deposits can be made.EXECUTED- At least 1 deposit was received and successfully processed.FAILURE- There is a problem or failure with an incoming deposit. View deposit details for more information.
Time when the deposit request was generated
How should the deposit be made. PUSH (manually sent by customer) or PULL (automatically pulled via a linked counterparty using a supported rail). If performing a PULL, several conditions apply.
Conditions:
The destination account must be for an asset type that supports pull deposits (e.g. USD, CAD)
The source counterparty must be linked and have an available rail that supports ones of the deposit mechanisms on the destination account (e.g. ACH, EFT).
The deposit request MUST be accepted using the /deposit/accept endpoint to initiate the pull deposit
Destination account on platform into which funds will be deposited
Asset type IDs follow a simple structure as follows: {$BLOCKCHAIN}_{$NETWORK}_{$CURRENCY_CODE} Simple asset type to test with include
ETHEREUM_SEPOLIA_ETHETHEREUM_SEPOLIA_USDCSOLANA_DEVNET_SOLBITCOIN_TESTNET_BTCFIAT_TESTNET_USDFIAT_TESTNET_USDFIAT_MAINNET_USDFIAT_TESTNET_EUR
Instructions of where to send (push) deposits.
List of all available deposit instructions for this account. For crypto accounts typically expect a single entry. For FIAT accounts, there may be several entries for each of the supported rails on that account type.
Type of Instruction
Issued address for the receipt of funds.
Blockchain the address is issued for use on
Network (on the target blockchain) that the address is issued for use on
Asset type IDs follow a simple structure as follows: {$BLOCKCHAIN}_{$NETWORK}_{$CURRENCY_CODE} Simple asset type to test with include.
ETHEREUM_SEPOLIA_ETHETHEREUM_SEPOLIA_USDCSOLANA_DEVNET_SOLBITCOIN_TESTNET_BTCFIAT_TESTNET_USDFIAT_TESTNET_USDFIAT_MAINNET_USDFIAT_TESTNET_EUR
{ "data": { "id": "string", "status": "REQUESTED", "created_timestamp": "2019-08-24T14:15:22Z", "deposit_type": "PUSH", "deposit_destination": { … }, "customer_name": "string", "deposit_source": { … } } }