curl --request POST \
--url https://api.globalstack.io/v1/onramps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quote_id": "<string>",
"source_currency": "<string>",
"destination_currency": "<string>",
"reference": "<string>",
"metadata": {}
}
'import requests
url = "https://api.globalstack.io/v1/onramps"
payload = {
"quote_id": "<string>",
"source_currency": "<string>",
"destination_currency": "<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({
quote_id: '<string>',
source_currency: '<string>',
destination_currency: '<string>',
reference: '<string>',
metadata: {}
})
};
fetch('https://api.globalstack.io/v1/onramps', 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/onramps",
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([
'quote_id' => '<string>',
'source_currency' => '<string>',
'destination_currency' => '<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/onramps"
payload := strings.NewReader("{\n \"quote_id\": \"<string>\",\n \"source_currency\": \"<string>\",\n \"destination_currency\": \"<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/onramps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"<string>\",\n \"source_currency\": \"<string>\",\n \"destination_currency\": \"<string>\",\n \"reference\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalstack.io/v1/onramps")
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 \"quote_id\": \"<string>\",\n \"source_currency\": \"<string>\",\n \"destination_currency\": \"<string>\",\n \"reference\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Onramp executed successfully",
"code": "ok",
"data": {
"id": "onr_01KPBH802PXQQXT8ASJGE0QX2K",
"reference": "INV-2026-001",
"status": "awaiting_deposit",
"quote_id": "quo_01KPBK123456789ABCDEFG",
"rate_source": "quoted",
"customer": {
"id": "cust_seed_alice",
"type": "individual",
"name": "Alice Johnson",
"email": "alice.seed@globalstack.mock",
"tier": "tier_2",
"created_at": "2026-04-16T16:14:08.000Z",
"updated_at": "2026-04-16T16:14:08.000Z"
},
"wallet": {
"id": "wal_seed_alice_usdc",
"currency": "USDC",
"label": "USDC Wallet"
},
"source_amount": "10000.00",
"source_currency": "NGN",
"destination_currency": "USDC",
"rate": "0.000000",
"deposit_instruction": {
"version": 1,
"type": "fiat",
"accountName": "GLOBALSTACK / FX ENGINE",
"accountNumber": "0123456789",
"bankName": "Access Bank",
"bankCode": "000014",
"expiresAt": "2026-06-03T16:14:08.000Z",
"depositReference": "GSVRYTZ496CM",
"message": "Include the deposit_reference in the transfer narration/reference so funds are correctly allocated to this deposit."
},
"metadata": {
"order_id": "ord_demo_001"
},
"created_at": "2026-04-16T16:16:03.000Z",
"updated_at": "2026-04-16T16:16:03.000Z",
"payment_instrument": null,
"destination_amount": "0.000000",
"rate_locked_until": null,
"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"
}
}Execute an onramp
Execute an onramp from a previously created onramp quote to convert external fiat into crypto in a GlobalStack wallet.
Supply the quote_id returned by POST /v1/onramps/quotes. source_currency and
destination_currency are optional; when provided they must match the quoteβs
currencies exactly, otherwise the request is rejected with 400 invalid_input.
An expired quote returns 409 invalid_status.
Send an Idempotency-Key header to make retries safe: an identical key with an
identical body within 24h replays the original response.
curl --request POST \
--url https://api.globalstack.io/v1/onramps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quote_id": "<string>",
"source_currency": "<string>",
"destination_currency": "<string>",
"reference": "<string>",
"metadata": {}
}
'import requests
url = "https://api.globalstack.io/v1/onramps"
payload = {
"quote_id": "<string>",
"source_currency": "<string>",
"destination_currency": "<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({
quote_id: '<string>',
source_currency: '<string>',
destination_currency: '<string>',
reference: '<string>',
metadata: {}
})
};
fetch('https://api.globalstack.io/v1/onramps', 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/onramps",
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([
'quote_id' => '<string>',
'source_currency' => '<string>',
'destination_currency' => '<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/onramps"
payload := strings.NewReader("{\n \"quote_id\": \"<string>\",\n \"source_currency\": \"<string>\",\n \"destination_currency\": \"<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/onramps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"<string>\",\n \"source_currency\": \"<string>\",\n \"destination_currency\": \"<string>\",\n \"reference\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalstack.io/v1/onramps")
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 \"quote_id\": \"<string>\",\n \"source_currency\": \"<string>\",\n \"destination_currency\": \"<string>\",\n \"reference\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Onramp executed successfully",
"code": "ok",
"data": {
"id": "onr_01KPBH802PXQQXT8ASJGE0QX2K",
"reference": "INV-2026-001",
"status": "awaiting_deposit",
"quote_id": "quo_01KPBK123456789ABCDEFG",
"rate_source": "quoted",
"customer": {
"id": "cust_seed_alice",
"type": "individual",
"name": "Alice Johnson",
"email": "alice.seed@globalstack.mock",
"tier": "tier_2",
"created_at": "2026-04-16T16:14:08.000Z",
"updated_at": "2026-04-16T16:14:08.000Z"
},
"wallet": {
"id": "wal_seed_alice_usdc",
"currency": "USDC",
"label": "USDC Wallet"
},
"source_amount": "10000.00",
"source_currency": "NGN",
"destination_currency": "USDC",
"rate": "0.000000",
"deposit_instruction": {
"version": 1,
"type": "fiat",
"accountName": "GLOBALSTACK / FX ENGINE",
"accountNumber": "0123456789",
"bankName": "Access Bank",
"bankCode": "000014",
"expiresAt": "2026-06-03T16:14:08.000Z",
"depositReference": "GSVRYTZ496CM",
"message": "Include the deposit_reference in the transfer narration/reference so funds are correctly allocated to this deposit."
},
"metadata": {
"order_id": "ord_demo_001"
},
"created_at": "2026-04-16T16:16:03.000Z",
"updated_at": "2026-04-16T16:16:03.000Z",
"payment_instrument": null,
"destination_amount": "0.000000",
"rate_locked_until": null,
"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"
}
}Authorizations
API key issued during merchant onboarding.
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
ExecuteOnrampDto
Response
Onramp executed successfully