Create a transfer request (on-ramp or off-ramp)
curl --request POST \
--url https://api.staging.railsfromthecrypt.com/v1/transfer-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"type": "onramp",
"amount": 10000,
"from_currency": "NGN",
"to_currency": "USDC",
"recipient_id": "rec_01J8V9ZP3A7"
}
'import requests
url = "https://api.staging.railsfromthecrypt.com/v1/transfer-requests"
payload = {
"type": "onramp",
"amount": 10000,
"from_currency": "NGN",
"to_currency": "USDC",
"recipient_id": "rec_01J8V9ZP3A7"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'onramp',
amount: 10000,
from_currency: 'NGN',
to_currency: 'USDC',
recipient_id: 'rec_01J8V9ZP3A7'
})
};
fetch('https://api.staging.railsfromthecrypt.com/v1/transfer-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.railsfromthecrypt.com/v1/transfer-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'onramp',
'amount' => 10000,
'from_currency' => 'NGN',
'to_currency' => 'USDC',
'recipient_id' => 'rec_01J8V9ZP3A7'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.staging.railsfromthecrypt.com/v1/transfer-requests"
payload := strings.NewReader("{\n \"type\": \"onramp\",\n \"amount\": 10000,\n \"from_currency\": \"NGN\",\n \"to_currency\": \"USDC\",\n \"recipient_id\": \"rec_01J8V9ZP3A7\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.staging.railsfromthecrypt.com/v1/transfer-requests")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"onramp\",\n \"amount\": 10000,\n \"from_currency\": \"NGN\",\n \"to_currency\": \"USDC\",\n \"recipient_id\": \"rec_01J8V9ZP3A7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.railsfromthecrypt.com/v1/transfer-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"onramp\",\n \"amount\": 10000,\n \"from_currency\": \"NGN\",\n \"to_currency\": \"USDC\",\n \"recipient_id\": \"rec_01J8V9ZP3A7\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Transfer created successfully",
"data": {
"id": "c17d2777-e604-45e2-b6d5-7743652eadf1",
"type": "onramp",
"status": "fetching_rates",
"source": {
"amount": 10000,
"currency": "NGN"
},
"destination": {
"amount": 0,
"currency": "USDC"
},
"events": [
{
"status": "pending",
"timestamp": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
],
"payments": [],
"created_at": "2025-10-10T09:15:21Z",
"reference": "TXN-2Z82FVYO6BW22RC7",
"rate": {
"value": 0,
"expires_at": null
},
"recipient": {
"id": "rec_01J8V9ZP3A7",
"type": "crypto",
"name": "My USDT Wallet",
"details": {
"network": "Ethereum",
"wallet_address": "0xABC123DEF456...",
"symbol": "USDT"
}
},
"payment_instructions": {
"type": "bank_transfer",
"bank_transfer": {
"account_number": "1234567890",
"account_name": "HashRails Ltd",
"bank_name": "Wema Bank",
"bank_code": "035"
}
}
}
}{
"success": false,
"message": "network is required for offramp transfers"
}Transfer Request
Create Transfer Request
POST
/
v1
/
transfer-requests
Create a transfer request (on-ramp or off-ramp)
curl --request POST \
--url https://api.staging.railsfromthecrypt.com/v1/transfer-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"type": "onramp",
"amount": 10000,
"from_currency": "NGN",
"to_currency": "USDC",
"recipient_id": "rec_01J8V9ZP3A7"
}
'import requests
url = "https://api.staging.railsfromthecrypt.com/v1/transfer-requests"
payload = {
"type": "onramp",
"amount": 10000,
"from_currency": "NGN",
"to_currency": "USDC",
"recipient_id": "rec_01J8V9ZP3A7"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'onramp',
amount: 10000,
from_currency: 'NGN',
to_currency: 'USDC',
recipient_id: 'rec_01J8V9ZP3A7'
})
};
fetch('https://api.staging.railsfromthecrypt.com/v1/transfer-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.railsfromthecrypt.com/v1/transfer-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'onramp',
'amount' => 10000,
'from_currency' => 'NGN',
'to_currency' => 'USDC',
'recipient_id' => 'rec_01J8V9ZP3A7'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.staging.railsfromthecrypt.com/v1/transfer-requests"
payload := strings.NewReader("{\n \"type\": \"onramp\",\n \"amount\": 10000,\n \"from_currency\": \"NGN\",\n \"to_currency\": \"USDC\",\n \"recipient_id\": \"rec_01J8V9ZP3A7\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.staging.railsfromthecrypt.com/v1/transfer-requests")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"onramp\",\n \"amount\": 10000,\n \"from_currency\": \"NGN\",\n \"to_currency\": \"USDC\",\n \"recipient_id\": \"rec_01J8V9ZP3A7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.railsfromthecrypt.com/v1/transfer-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"onramp\",\n \"amount\": 10000,\n \"from_currency\": \"NGN\",\n \"to_currency\": \"USDC\",\n \"recipient_id\": \"rec_01J8V9ZP3A7\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Transfer created successfully",
"data": {
"id": "c17d2777-e604-45e2-b6d5-7743652eadf1",
"type": "onramp",
"status": "fetching_rates",
"source": {
"amount": 10000,
"currency": "NGN"
},
"destination": {
"amount": 0,
"currency": "USDC"
},
"events": [
{
"status": "pending",
"timestamp": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
],
"payments": [],
"created_at": "2025-10-10T09:15:21Z",
"reference": "TXN-2Z82FVYO6BW22RC7",
"rate": {
"value": 0,
"expires_at": null
},
"recipient": {
"id": "rec_01J8V9ZP3A7",
"type": "crypto",
"name": "My USDT Wallet",
"details": {
"network": "Ethereum",
"wallet_address": "0xABC123DEF456...",
"symbol": "USDT"
}
},
"payment_instructions": {
"type": "bank_transfer",
"bank_transfer": {
"account_number": "1234567890",
"account_name": "HashRails Ltd",
"bank_name": "Wema Bank",
"bank_code": "035"
}
}
}
}{
"success": false,
"message": "network is required for offramp transfers"
}Create a new transfer request to move funds between Fiat and Crypto. This endpoint supports both:
- On-ramp (Fiat → Crypto): You pay in fiat (e.g., NGN), and your recipient receives cryptocurrency.
- Off-ramp (Crypto → Fiat): You send crypto (e.g., USDT) over a specified network, and your recipient receives fiat in their bank account.
Authorizations
JWT access token from POST /v1/auth/token/issue. Send as: Authorization: Bearer <access_token>
Headers
UUID v4 idempotency key to prevent duplicate transfers.
Example:
"550e8400-e29b-41d4-a716-446655440000"
Body
application/json
- On-ramp (Fiat → Crypto)
- Off-ramp (Crypto → Fiat)
Convert fiat currency to crypto. You pay in fiat and your recipient receives crypto.
Transfer direction.
Available options:
onramp Example:
"onramp"
Amount to send in the source currency.
Example:
10000
Source fiat currency.
Available options:
NGN Example:
"NGN"
Destination crypto currency.
Available options:
USDC, USDT Example:
"USDC"
Crypto recipient ID where settlement will be sent.
Example:
"rec_01J8V9ZP3A7"