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/payments
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/payments
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/payments
- 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/payments \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-l2f-idempotency-id: string' \
-H 'x-l2f-request-id: string' \
-d '{
"payment_source": {
"source_counterparty_id": "string",
"asset_type": [
"string"
]
},
"payment_destination": {
"account_id": "string"
},
"payment_info": {
"description": "string",
"amount": "string"
}
}'Success
Unique ID of the payment, to be used to lookup payment details and status
Status of the payment
REQUESTED- Payment request is created and has passed validation. It must be accepted before it can be usedACCEPTED- Payment request has been accepted and is waiting execution. At this point it cannot be cancelled.INPROGRESS- Payment is in progress.EXECUTED- Payment Processing have been completed.FAILURE- There is a problem or failure with the payment. View payment details for more information.
{ "data": { "id": "string", "status": "ACCEPTED" } }
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/payments/{payment_id}/accept
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/payments/{payment_id}/accept
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/payments/{payment_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/payments/{payment_id}/accept' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-l2f-idempotency-id: string' \
-H 'x-l2f-request-id: string'Success
Unique ID of the payment, to be used to lookup payment details and status
Status of the payment
REQUESTED- Payment request is created and has passed validation. It must be accepted before it can be usedACCEPTED- Payment request has been accepted and is waiting execution. At this point it cannot be cancelled.INPROGRESS- Payment is in progress.EXECUTED- Payment Processing have been completed.FAILURE- There is a problem or failure with the payment. View payment details for more information.
{ "data": { "id": "string", "status": "ACCEPTED" } }
- Mock server
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/payments/{payment_id}
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/payments/{payment_id}
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/payments/{payment_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/payments/{payment_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-l2f-request-id: string'Success
Unique ID of the payment, to be used to lookup payment details and status
Status of the payment
REQUESTED- Payment request is created and has passed validation. It must be accepted before it can be usedACCEPTED- Payment request has been accepted and is waiting execution. At this point it cannot be cancelled.INPROGRESS- Payment is in progress.EXECUTED- Payment Processing have been completed.FAILURE- There is a problem or failure with the payment. View payment details for more information.
Counterparty ID from which funds will be collected (received) from.
The asset types you wish to make available for receiving the payment on.
Deposit instructions for different asset types
Deposit instructions for different asset types
{ "data": { "id": "string", "status": "ACCEPTED", "payment_source": { … }, "payment_destination": { … }, "payment_info": { … } } }
- Mock server
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/payments/{payment_id}/status
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/payments/{payment_id}/status
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/payments/{payment_id}/status
- 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/payments/{payment_id}/status' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-l2f-request-id: string'{ "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "status": "REQUESTED", "document_errors": [ … ] } }