curl --request POST \
--url https://api.globalstack.io/v1/wallet_transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_wallet_id": "<string>",
"to_wallet_id": "<string>",
"amount": "<string>",
"reference": "<string>",
"metadata": {}
}
'import requests
url = "https://api.globalstack.io/v1/wallet_transfers"
payload = {
"from_wallet_id": "<string>",
"to_wallet_id": "<string>",
"amount": "<string>",
"reference": "<string>",
"metadata": {}
}
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({
from_wallet_id: '<string>',
to_wallet_id: '<string>',
amount: '<string>',
reference: '<string>',
metadata: {}
})
};
fetch('https://api.globalstack.io/v1/wallet_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.globalstack.io/v1/wallet_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([
'from_wallet_id' => '<string>',
'to_wallet_id' => '<string>',
'amount' => '<string>',
'reference' => '<string>',
'metadata' => [
]
]),
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.globalstack.io/v1/wallet_transfers"
payload := strings.NewReader("{\n \"from_wallet_id\": \"<string>\",\n \"to_wallet_id\": \"<string>\",\n \"amount\": \"<string>\",\n \"reference\": \"<string>\",\n \"metadata\": {}\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.globalstack.io/v1/wallet_transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_wallet_id\": \"<string>\",\n \"to_wallet_id\": \"<string>\",\n \"amount\": \"<string>\",\n \"reference\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalstack.io/v1/wallet_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 \"from_wallet_id\": \"<string>\",\n \"to_wallet_id\": \"<string>\",\n \"amount\": \"<string>\",\n \"reference\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Wallet transfer completed",
"code": "ok",
"data": {
"id": "wtr_01HXYZABC1234567890ABCDEFG",
"reference": "INV-2026-001",
"status": "success",
"amount": "10.000000",
"currency": "USDC",
"from_wallet": {
"id": "wal_01HXYZ",
"currency": "USDC",
"customer": {
"id": "cust_01HXYZ",
"type": "individual",
"name": "Alice Johnson",
"email": "alice@example.com",
"tier": "tier_2",
"created_at": "2026-10-31T07:00:00.000Z",
"updated_at": "2026-10-31T07:00:00.000Z"
},
"label": "USDC Wallet"
},
"to_wallet": {
"id": "wal_01HXYZ",
"currency": "USDC",
"customer": {
"id": "cust_01HXYZ",
"type": "individual",
"name": "Alice Johnson",
"email": "alice@example.com",
"tier": "tier_2",
"created_at": "2026-10-31T07:00:00.000Z",
"updated_at": "2026-10-31T07:00:00.000Z"
},
"label": "USDC Wallet"
},
"created_at": "2026-10-31T07:00:00.000Z",
"terminal_at": "2026-10-31T07:00:00.000Z",
"metadata": {},
"failure_reason": null,
"failure_reason_message": null
},
"meta": {
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}Execute a wallet-to-wallet transfer
Move funds between two custodial wallets you own, in the same currency. This is an
intra-ledger move: a single ledger entry, no external payout rail, no FX leg. The move settles
in-request and the response carries the terminal status directly.
Both wallets must:
- belong to the API key’s integration,
- be of type
custodial(forwarding wallets hold no balance), - share the same
currency, - hold customers approved for on-ledger activity in that currency.
Different customers under the same integration are allowed — Alice’s wallet can send to Bob’s as long as both belong to your merchant and are KYC-approved for the currency.
The currency must be explicitly enabled for wallet-to-wallet transfers (can_wallet_transfer on
GET /v1/currencies). The flag is independent of can_transfer, which gates outbound
beneficiary payouts via POST /v1/transfers.
Body
| Field | Required | Description |
|---|---|---|
from_wallet_id | Yes | The source wallet (wal_…). Must be custodial, must belong to your integration, and must have enough available balance. |
to_wallet_id | Yes | The destination wallet (wal_…). Must be custodial, same currency, same integration. |
amount | Yes | Decimal string, strictly positive, with at most the currency’s decimal places. |
reference | Yes | Your id, unique per integration. A reused one returns 409 duplicate_resource. |
metadata | No | Record<string, string>. Echoed back verbatim on the response and the webhook. |
Send an Idempotency-Key header so retries are safe.
Status model
The move is synchronous — there is no processing phase. A 200 response always carries
status: "success": the ledger write committed, funds moved atomically. Bounded failures surface
as 4xx without persisting a row, so the merchant reference stays free for retry.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_input | Validation (same wallet, forwarding wallet, mismatched currency, currency not enabled for wallet transfer, amount zero / too many decimals). |
| 400 | invalid_amount_precision | Amount exceeds the currency’s decimal places. |
| 409 | duplicate_resource | reference already used by another wallet transfer for this integration. |
| 422 | ledger_insufficient_funds | The source wallet’s available balance is below the amount. No row is persisted and no webhook fires — retry safely once the balance is topped up. |
| 422 | ledger_overdraft_exceeded | A race against a concurrent debit drained the balance between the pre-flight check and the ledger call. Same recovery as ledger_insufficient_funds: no row, retry when funds are available. |
| 500 | configuration_error | Either wallet is not fully provisioned, or the service hit internal drift (an orphaned ledger write under this reference whose shape disagrees with the retry). The merchant action is to contact support — the row either did not land or requires manual reconciliation. |
| 502 | ledger_unavailable / external_service_unavailable | The ledger is unreachable or returned an unparseable response. Retry safely with the same reference: the service pre-flights the reference and, if a prior attempt committed the move but failed to persist, recovers it on retry instead of moving funds twice. |
An unreachable ledger on the short-balance recovery path also surfaces as 502 rather than a 422. The service consults the ledger to distinguish a genuine short balance from the drained residue of a prior committed move; when that lookup cannot complete, the service refuses to classify until it can, so the merchant retries safely.
Webhook
Subscribe to the wallet_transfer category on POST /v1/webhooks/endpoints to receive
wallet_transfer.success deliveries. The payload mirrors this response plus the usual webhook
envelope. There is no wallet_transfer.failed topic — insufficient-funds attempts throw 422
without persisting a row, so no failure event is emitted.
curl --request POST \
--url https://api.globalstack.io/v1/wallet_transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_wallet_id": "<string>",
"to_wallet_id": "<string>",
"amount": "<string>",
"reference": "<string>",
"metadata": {}
}
'import requests
url = "https://api.globalstack.io/v1/wallet_transfers"
payload = {
"from_wallet_id": "<string>",
"to_wallet_id": "<string>",
"amount": "<string>",
"reference": "<string>",
"metadata": {}
}
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({
from_wallet_id: '<string>',
to_wallet_id: '<string>',
amount: '<string>',
reference: '<string>',
metadata: {}
})
};
fetch('https://api.globalstack.io/v1/wallet_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.globalstack.io/v1/wallet_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([
'from_wallet_id' => '<string>',
'to_wallet_id' => '<string>',
'amount' => '<string>',
'reference' => '<string>',
'metadata' => [
]
]),
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.globalstack.io/v1/wallet_transfers"
payload := strings.NewReader("{\n \"from_wallet_id\": \"<string>\",\n \"to_wallet_id\": \"<string>\",\n \"amount\": \"<string>\",\n \"reference\": \"<string>\",\n \"metadata\": {}\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.globalstack.io/v1/wallet_transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_wallet_id\": \"<string>\",\n \"to_wallet_id\": \"<string>\",\n \"amount\": \"<string>\",\n \"reference\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalstack.io/v1/wallet_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 \"from_wallet_id\": \"<string>\",\n \"to_wallet_id\": \"<string>\",\n \"amount\": \"<string>\",\n \"reference\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Wallet transfer completed",
"code": "ok",
"data": {
"id": "wtr_01HXYZABC1234567890ABCDEFG",
"reference": "INV-2026-001",
"status": "success",
"amount": "10.000000",
"currency": "USDC",
"from_wallet": {
"id": "wal_01HXYZ",
"currency": "USDC",
"customer": {
"id": "cust_01HXYZ",
"type": "individual",
"name": "Alice Johnson",
"email": "alice@example.com",
"tier": "tier_2",
"created_at": "2026-10-31T07:00:00.000Z",
"updated_at": "2026-10-31T07:00:00.000Z"
},
"label": "USDC Wallet"
},
"to_wallet": {
"id": "wal_01HXYZ",
"currency": "USDC",
"customer": {
"id": "cust_01HXYZ",
"type": "individual",
"name": "Alice Johnson",
"email": "alice@example.com",
"tier": "tier_2",
"created_at": "2026-10-31T07:00:00.000Z",
"updated_at": "2026-10-31T07:00:00.000Z"
},
"label": "USDC Wallet"
},
"created_at": "2026-10-31T07:00:00.000Z",
"terminal_at": "2026-10-31T07:00:00.000Z",
"metadata": {},
"failure_reason": null,
"failure_reason_message": null
},
"meta": {
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}Headers
Optional client-supplied key. Identical key + identical body within 24h replays the original response. Identical key + different body returns 409 idempotency_conflict. The hash is over raw bytes — clients retrying must send the byte-identical body; a re-serialised JSON payload will produce a different hash and a 409. Strongly recommended for retry-safe clients.
^[A-Za-z0-9_\-]{8,255}$Body
CreateWalletTransferDto
Response
Wallet transfer completed