Create a transfer
curl --request POST \
--url https://api.ledger.so/v1/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "<string>",
"walletId": "<string>",
"amount": "<string>",
"destinationCurrency": "<string>",
"destinationPaymentRail": "<string>",
"destinationAddress": "<string>",
"reference": "<string>",
"clientReferenceId": "<string>"
}
'import requests
url = "https://api.ledger.so/v1/transfers"
payload = {
"customerId": "<string>",
"walletId": "<string>",
"amount": "<string>",
"destinationCurrency": "<string>",
"destinationPaymentRail": "<string>",
"destinationAddress": "<string>",
"reference": "<string>",
"clientReferenceId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '<string>',
walletId: '<string>',
amount: '<string>',
destinationCurrency: '<string>',
destinationPaymentRail: '<string>',
destinationAddress: '<string>',
reference: '<string>',
clientReferenceId: '<string>'
})
};
fetch('https://api.ledger.so/v1/transfers', 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.ledger.so/v1/transfers",
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([
'customerId' => '<string>',
'walletId' => '<string>',
'amount' => '<string>',
'destinationCurrency' => '<string>',
'destinationPaymentRail' => '<string>',
'destinationAddress' => '<string>',
'reference' => '<string>',
'clientReferenceId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.ledger.so/v1/transfers"
payload := strings.NewReader("{\n \"customerId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"amount\": \"<string>\",\n \"destinationCurrency\": \"<string>\",\n \"destinationPaymentRail\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"reference\": \"<string>\",\n \"clientReferenceId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.ledger.so/v1/transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"amount\": \"<string>\",\n \"destinationCurrency\": \"<string>\",\n \"destinationPaymentRail\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"reference\": \"<string>\",\n \"clientReferenceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ledger.so/v1/transfers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"amount\": \"<string>\",\n \"destinationCurrency\": \"<string>\",\n \"destinationPaymentRail\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"reference\": \"<string>\",\n \"clientReferenceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"id": "<string>",
"customerId": "<string>",
"type": "<string>",
"status": "<string>",
"amount": "<string>",
"sourceCurrency": "<string>",
"destinationCurrency": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"destinationAddress": "<string>",
"payoutAccountId": "<string>",
"finalAmount": "<string>",
"destinationTxHash": "<string>",
"gasFee": "<string>",
"exchangeFee": "<string>"
}
}{
"ok": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Validation failed"
}
}{
"ok": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}{
"ok": false,
"error": {
"code": "CONFLICT",
"message": "Resource already exists"
}
}{
"ok": false,
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests"
}
}{
"ok": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}Transfers
Create a transfer
Initiates a transfer to move funds to a destination address via a specified payment rail.
POST
/
v1
/
transfers
Create a transfer
curl --request POST \
--url https://api.ledger.so/v1/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "<string>",
"walletId": "<string>",
"amount": "<string>",
"destinationCurrency": "<string>",
"destinationPaymentRail": "<string>",
"destinationAddress": "<string>",
"reference": "<string>",
"clientReferenceId": "<string>"
}
'import requests
url = "https://api.ledger.so/v1/transfers"
payload = {
"customerId": "<string>",
"walletId": "<string>",
"amount": "<string>",
"destinationCurrency": "<string>",
"destinationPaymentRail": "<string>",
"destinationAddress": "<string>",
"reference": "<string>",
"clientReferenceId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '<string>',
walletId: '<string>',
amount: '<string>',
destinationCurrency: '<string>',
destinationPaymentRail: '<string>',
destinationAddress: '<string>',
reference: '<string>',
clientReferenceId: '<string>'
})
};
fetch('https://api.ledger.so/v1/transfers', 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.ledger.so/v1/transfers",
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([
'customerId' => '<string>',
'walletId' => '<string>',
'amount' => '<string>',
'destinationCurrency' => '<string>',
'destinationPaymentRail' => '<string>',
'destinationAddress' => '<string>',
'reference' => '<string>',
'clientReferenceId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.ledger.so/v1/transfers"
payload := strings.NewReader("{\n \"customerId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"amount\": \"<string>\",\n \"destinationCurrency\": \"<string>\",\n \"destinationPaymentRail\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"reference\": \"<string>\",\n \"clientReferenceId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.ledger.so/v1/transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"amount\": \"<string>\",\n \"destinationCurrency\": \"<string>\",\n \"destinationPaymentRail\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"reference\": \"<string>\",\n \"clientReferenceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ledger.so/v1/transfers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"amount\": \"<string>\",\n \"destinationCurrency\": \"<string>\",\n \"destinationPaymentRail\": \"<string>\",\n \"destinationAddress\": \"<string>\",\n \"reference\": \"<string>\",\n \"clientReferenceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"id": "<string>",
"customerId": "<string>",
"type": "<string>",
"status": "<string>",
"amount": "<string>",
"sourceCurrency": "<string>",
"destinationCurrency": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"destinationAddress": "<string>",
"payoutAccountId": "<string>",
"finalAmount": "<string>",
"destinationTxHash": "<string>",
"gasFee": "<string>",
"exchangeFee": "<string>"
}
}{
"ok": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Validation failed"
}
}{
"ok": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}{
"ok": false,
"error": {
"code": "CONFLICT",
"message": "Resource already exists"
}
}{
"ok": false,
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests"
}
}{
"ok": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}Authorizations
BearerAuthApiKeyAuth
Pass your API key as a Bearer token: Authorization: Bearer ld_live_...
Body
application/json
Ledger customer ID (cus_...)
Wallet to transfer from (wal_...). Can be a crypto wallet or a virtual account wallet.
Transfer amount
Destination currency code (e.g. "usdc", "gbp", "eur")
Payment rail (crypto: "solana", "ethereum", etc. | fiat: "ach", "wire", "sepa", "faster_payments", "spei", "pix")
Onchain address for crypto transfers, or payout account ID (pa_...) for fiat transfers
Payment reference sent to the recipient's bank. Max 10 chars for ACH, 140 for wire/SEPA.
Your own reference ID for idempotency or tracking (not sent to recipient)
⌘I