Welcome to the rail Developer Guide!
- Retrieve Withdrawal Receipt
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.
The rail to be used for the withdrawal. The destination counterparty must have the appropriate rail configuration.
- ACH
- FEDWIRE
- SEPA_CT
- SWIFT
- CRYPTO
- CHAPS
- FPS
- IMPS
- SPEI
- UAEFTS
Purpose of the withdrawal. (Note: The purpose "PERSONAL_ACCOUNT" is only valid with counterparties that have profile.relationship_to_customer set as "SELF".)
Destination counterparty where funds will be sent. This counterparty must be configured with the required rail information.
- Mock server
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/withdrawals
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/withdrawals
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/withdrawals
- 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/withdrawals \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-l2f-idempotency-id: string' \
-H 'x-l2f-request-id: string' \
-d '{
"withdrawal_rail": "ACH",
"description": "string",
"source_account_id": "string",
"purpose": "PERSONAL_ACCOUNT",
"amount": 0,
"destination_counterparty_id": "string",
"memo": "string"
}'Success
Status of the withdrawal.
REQUESTED- Withdrawal request is created and has passed validation. It must be accepted at which point it will be executed.ACCEPTED- Withdrawal request has been accepted and is waiting execution. At this point it cannot be cancelled.EXPIRED- Occurs when a withdrawal request was not accepted within a reasonable time frame. The request cannot be replayed from this state.CANCELLED- Withdrawal request was cancelled. Only available prior to acceptance. The request cannot be replayed from this state.CANCELLING- Withdrawal request is being cancelled.EXECUTED- Withdrawal request has been executed, it is completed with all ledger entries performed.REJECTED- Withdrawal 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/withdrawals/{withdrawal_id}/cancel
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/withdrawals/{withdrawal_id}/cancel
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/withdrawals/{withdrawal_id}/cancel
- 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/withdrawals/{withdrawal_id}/cancel' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-l2f-request-id: string'{ "data": { "id": "string", "status": "REQUESTED" } }
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/withdrawals/{withdrawal_id}/accept
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/withdrawals/{withdrawal_id}/accept
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/withdrawals/{withdrawal_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/withdrawals/{withdrawal_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
Status of the withdrawal.
REQUESTED- Withdrawal request is created and has passed validation. It must be accepted at which point it will be executed.ACCEPTED- Withdrawal request has been accepted and is waiting execution. At this point it cannot be cancelled.EXPIRED- Occurs when a withdrawal request was not accepted within a reasonable time frame. The request cannot be replayed from this state.CANCELLED- Withdrawal request was cancelled. Only available prior to acceptance. The request cannot be replayed from this state.CANCELLING- Withdrawal request is being cancelled.EXECUTED- Withdrawal request has been executed, it is completed with all ledger entries performed.REJECTED- Withdrawal 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/withdrawals/{withdrawal_id}
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/withdrawals/{withdrawal_id}
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/withdrawals/{withdrawal_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/withdrawals/{withdrawal_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-l2f-request-id: string'Success
Status of the withdrawal.
REQUESTED- Withdrawal request is created and has passed validation. It must be accepted at which point it will be executed.ACCEPTED- Withdrawal request has been accepted and is waiting execution. At this point it cannot be cancelled.EXPIRED- Occurs when a withdrawal request was not accepted within a reasonable time frame. The request cannot be replayed from this state.CANCELLED- Withdrawal request was cancelled. Only available prior to acceptance. The request cannot be replayed from this state.CANCELLING- Withdrawal request is being cancelled.EXECUTED- Withdrawal request has been executed, it is completed with all ledger entries performed.REJECTED- Withdrawal request was rejected and cannot be executed.
Time when the withdrawal request was generated
The rail to be used for the withdrawal. The destination counterparty must have the appropriate rail configuration.
Purpose of the withdrawal. (Note: The purpose "PERSONAL_ACCOUNT" is only valid with counterparties that have profile.relationship_to_customer set as "SELF".)
{ "data": { "id": "string", "status": "REQUESTED", "created_timestamp": "2019-08-24T14:15:22Z", "withdrawal_rail": "ACH", "description": "string", "source_account_id": "string", "purpose": "PERSONAL_ACCOUNT", "amount": 0, "destination_counterparty_id": "string" } }
- Mock server
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/withdrawals/{withdrawal_id}/status
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/withdrawals/{withdrawal_id}/status
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/withdrawals/{withdrawal_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/withdrawals/{withdrawal_id}/status' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-l2f-request-id: string'Success
Status of the withdrawal.
REQUESTED- Withdrawal request is created and has passed validation. It must be accepted at which point it will be executed.ACCEPTED- Withdrawal request has been accepted and is waiting execution. At this point it cannot be cancelled.EXPIRED- Occurs when a withdrawal request was not accepted within a reasonable time frame. The request cannot be replayed from this state.CANCELLED- Withdrawal request was cancelled. Only available prior to acceptance. The request cannot be replayed from this state.CANCELLING- Withdrawal request is being cancelled.EXECUTED- Withdrawal request has been executed, it is completed with all ledger entries performed.REJECTED- Withdrawal request was rejected and cannot be executed.
{ "data": { "id": "string", "status": "REQUESTED", "document_errors": [ … ] } }
- Mock server
https://docs.rail.io/_mock/api-docs/openapi/rail-spec/v1/withdrawals/{withdrawal_id}/receipt
- Sandbox - Stable API Instance
https://sandbox.layer2financial.com/api/v1/withdrawals/{withdrawal_id}/receipt
- Production - Stable API Instance
https://platform.layer2financial.com/api/v1/withdrawals/{withdrawal_id}/receipt
- 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/withdrawals/{withdrawal_id}/receipt' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-l2f-request-id: string'