Get an onramp order by ID
curl --request GET \
--url https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}', 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.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"order": {
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"paymentTotal": "100.75",
"paymentSubtotal": "100",
"paymentCurrency": "USD",
"paymentMethod": "GUEST_CHECKOUT_APPLE_PAY",
"purchaseAmount": "100.000000",
"purchaseCurrency": "USDC",
"fees": [
{
"type": "FEE_TYPE_EXCHANGE",
"amount": "0.5",
"currency": "USD"
},
{
"type": "FEE_TYPE_NETWORK",
"amount": "0.25",
"currency": "USD"
}
],
"exchangeRate": "1",
"destinationAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"destinationNetwork": "base",
"status": "ONRAMP_ORDER_STATUS_COMPLETED",
"createdAt": "2025-04-24T00:00:00Z",
"updatedAt": "2025-04-24T00:00:00Z",
"txHash": "0x363cd3b3d4f49497cf5076150cd709307b90e9fc897fdd623546ea7b9313cecb",
"partnerUserRef": "user123"
}
}{
"errorType": "unauthorized",
"errorMessage": "The request is not properly authenticated."
}{
"errorType": "not_found",
"errorMessage": "Order with the given ID does not exist."
}{
"errorType": "rate_limit_exceeded",
"errorMessage": "Rate limit exceeded."
}Onramp
Get an onramp order by ID
Get an onramp order by ID.
GET
/
v2
/
onramp
/
orders
/
{orderId}
Get an onramp order by ID
curl --request GET \
--url https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}', 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.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cdp.coinbase.com/platform/v2/onramp/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"order": {
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"paymentTotal": "100.75",
"paymentSubtotal": "100",
"paymentCurrency": "USD",
"paymentMethod": "GUEST_CHECKOUT_APPLE_PAY",
"purchaseAmount": "100.000000",
"purchaseCurrency": "USDC",
"fees": [
{
"type": "FEE_TYPE_EXCHANGE",
"amount": "0.5",
"currency": "USD"
},
{
"type": "FEE_TYPE_NETWORK",
"amount": "0.25",
"currency": "USD"
}
],
"exchangeRate": "1",
"destinationAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"destinationNetwork": "base",
"status": "ONRAMP_ORDER_STATUS_COMPLETED",
"createdAt": "2025-04-24T00:00:00Z",
"updatedAt": "2025-04-24T00:00:00Z",
"txHash": "0x363cd3b3d4f49497cf5076150cd709307b90e9fc897fdd623546ea7b9313cecb",
"partnerUserRef": "user123"
}
}{
"errorType": "unauthorized",
"errorMessage": "The request is not properly authenticated."
}{
"errorType": "not_found",
"errorMessage": "Order with the given ID does not exist."
}{
"errorType": "rate_limit_exceeded",
"errorMessage": "Rate limit exceeded."
}Authorizations
A JWT signed using your CDP API Key Secret, encoded in base64. Refer to the Generate Bearer Token section of our Authentication docs for information on how to generate your Bearer Token.
Path Parameters
The ID of the onramp order to retrieve.
Pattern:
^[a-f0-9\-]{36}$Response
Successfully retrieved an onramp order.
An Onramp order.
Show child attributes
Show child attributes
Was this page helpful?
⌘I