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.
- Mock server
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/transfers
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/transfers
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/transfers
- 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/transfers \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-l2f-idempotency-id: string' \
-H 'x-l2f-request-id: string' \
-d '{
"source_account_id": "string",
"destination_account_id": "string",
"amount": 0,
"description": "string"
}'Success
Unique ID of the transfer request, to be used to accept the transfer and lookup status
Status of the transfer. Cannot be modified directly by the client.
REQUESTED- Transfer request is created and has passed validation. It must be accepted at which point it will be executed.ACCEPTED- Transfer request has been accepted and is waiting execution. At this point it cannot be cancelled.EXPIRED- Occurs when a transfer request was not accepted within a reasonable time frame. The transfer cannot be replayed from this state.CANCELLED- Transfer request was cancelled. Only available prior to acceptance. The transfer request cannot be replayed from this state.EXECUTED- Transfer request has been executed, it is completed with all ledger entries performed.REJECTED- Transfer request was rejected and cannot be executed.
Time when the transfer request was generated
Time when this transfer request expires and can no longer be accepted. Upon expiry a new transfer must be requested
Details of transaction to be performed on the source account on acceptance
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
Details of transaction to be performed on the destination account on acceptance
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", "valid_until": "2019-08-24T14:15:22Z", "source_details": { … }, "destination_details": { … } } }
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/transfers/{transfer_id}/accept
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/transfers/{transfer_id}/accept
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/transfers/{transfer_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/transfers/{transfer_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 transfer request, to be used to accept the transfer and lookup status
Status of the transfer. Cannot be modified directly by the client.
REQUESTED- Transfer request is created and has passed validation. It must be accepted at which point it will be executed.ACCEPTED- Transfer request has been accepted and is waiting execution. At this point it cannot be cancelled.EXPIRED- Occurs when a transfer request was not accepted within a reasonable time frame. The transfer cannot be replayed from this state.CANCELLED- Transfer request was cancelled. Only available prior to acceptance. The transfer request cannot be replayed from this state.EXECUTED- Transfer request has been executed, it is completed with all ledger entries performed.REJECTED- Transfer request was rejected and cannot be executed.
{ "data": { "id": "string", "status": "REQUESTED" } }
- Mock server
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/transfers/{transfer_id}
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/transfers/{transfer_id}
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/transfers/{transfer_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/transfers/{transfer_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-l2f-request-id: string'Success
Unique ID of the transfer request, to be used to accept the transfer and lookup status
Status of the transfer. Cannot be modified directly by the client.
REQUESTED- Transfer request is created and has passed validation. It must be accepted at which point it will be executed.ACCEPTED- Transfer request has been accepted and is waiting execution. At this point it cannot be cancelled.EXPIRED- Occurs when a transfer request was not accepted within a reasonable time frame. The transfer cannot be replayed from this state.CANCELLED- Transfer request was cancelled. Only available prior to acceptance. The transfer request cannot be replayed from this state.EXECUTED- Transfer request has been executed, it is completed with all ledger entries performed.REJECTED- Transfer request was rejected and cannot be executed.
Time when the transfer request was generated
Time when this transfer request expires and can no longer be accepted. Upon expiry a new transfer must be requested
Details of transaction to be performed on the source account on acceptance
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
Details of transaction to be performed on the destination account on acceptance
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", "valid_until": "2019-08-24T14:15:22Z", "source_details": { … }, "destination_details": { … } } }