curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/orders \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"recipient": {
"paymentMethodId": "d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc"
},
"payment": {
"method": "base-sepolia",
"currency": "usdc",
"payerAddress": "0xAa266270cf90FEEA9760617d9c7B5083e9f08984",
"receiptEmail": "jsmith@example.com"
},
"lineItems": {
"currencyLocator": "fiat:usd",
"executionParameters": {
"mode": "exact-in",
"amount": "1"
}
}
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/orders"
payload = {
"recipient": { "paymentMethodId": "d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc" },
"payment": {
"method": "base-sepolia",
"currency": "usdc",
"payerAddress": "0xAa266270cf90FEEA9760617d9c7B5083e9f08984",
"receiptEmail": "jsmith@example.com"
},
"lineItems": {
"currencyLocator": "fiat:usd",
"executionParameters": {
"mode": "exact-in",
"amount": "1"
}
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipient: {paymentMethodId: 'd5e5c48a-7dec-44b1-8cf4-4615bf00c8fc'},
payment: {
method: 'base-sepolia',
currency: 'usdc',
payerAddress: '0xAa266270cf90FEEA9760617d9c7B5083e9f08984',
receiptEmail: 'jsmith@example.com'
},
lineItems: {
currencyLocator: 'fiat:usd',
executionParameters: {mode: 'exact-in', amount: '1'}
}
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/orders', 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://staging.crossmint.com/api/2022-06-09/orders",
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([
'recipient' => [
'paymentMethodId' => 'd5e5c48a-7dec-44b1-8cf4-4615bf00c8fc'
],
'payment' => [
'method' => 'base-sepolia',
'currency' => 'usdc',
'payerAddress' => '0xAa266270cf90FEEA9760617d9c7B5083e9f08984',
'receiptEmail' => 'jsmith@example.com'
],
'lineItems' => [
'currencyLocator' => 'fiat:usd',
'executionParameters' => [
'mode' => 'exact-in',
'amount' => '1'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-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://staging.crossmint.com/api/2022-06-09/orders"
payload := strings.NewReader("{\n \"recipient\": {\n \"paymentMethodId\": \"d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc\"\n },\n \"payment\": {\n \"method\": \"base-sepolia\",\n \"currency\": \"usdc\",\n \"payerAddress\": \"0xAa266270cf90FEEA9760617d9c7B5083e9f08984\",\n \"receiptEmail\": \"jsmith@example.com\"\n },\n \"lineItems\": {\n \"currencyLocator\": \"fiat:usd\",\n \"executionParameters\": {\n \"mode\": \"exact-in\",\n \"amount\": \"1\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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://staging.crossmint.com/api/2022-06-09/orders")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recipient\": {\n \"paymentMethodId\": \"d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc\"\n },\n \"payment\": {\n \"method\": \"base-sepolia\",\n \"currency\": \"usdc\",\n \"payerAddress\": \"0xAa266270cf90FEEA9760617d9c7B5083e9f08984\",\n \"receiptEmail\": \"jsmith@example.com\"\n },\n \"lineItems\": {\n \"currencyLocator\": \"fiat:usd\",\n \"executionParameters\": {\n \"mode\": \"exact-in\",\n \"amount\": \"1\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipient\": {\n \"paymentMethodId\": \"d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc\"\n },\n \"payment\": {\n \"method\": \"base-sepolia\",\n \"currency\": \"usdc\",\n \"payerAddress\": \"0xAa266270cf90FEEA9760617d9c7B5083e9f08984\",\n \"receiptEmail\": \"jsmith@example.com\"\n },\n \"lineItems\": {\n \"currencyLocator\": \"fiat:usd\",\n \"executionParameters\": {\n \"mode\": \"exact-in\",\n \"amount\": \"1\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"clientSecret": "_removed_",
"order": {
"orderId": "40f49812-123b-4d10-bdae-561e4ed2b990",
"phase": "payment",
"lineItems": [
{
"metadata": {
"name": "USD",
"description": "United States Dollar",
"imageUrl": "https://www.crossmint.com/assets/ui/flags/us.svg"
},
"quote": {
"status": "valid",
"charges": {
"unit": {
"amount": "1",
"currency": "usdc"
},
"fees": {
"type": "exact",
"amount": "0.002",
"currency": "usdc"
}
},
"totalPrice": {
"amount": "1",
"currency": "usdc"
}
},
"delivery": {
"status": "awaiting-payment",
"recipient": {
"locator": "paymentMethodId:d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc",
"paymentMethodId": "d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc"
}
},
"executionMode": "exact-in"
}
],
"quote": {
"status": "valid",
"quotedAt": "2026-06-17T21:48:49.059Z",
"expiresAt": "2026-06-17T21:58:49.059Z",
"totalPrice": {
"amount": "1",
"currency": "usdc"
}
},
"payment": {
"status": "awaiting-payment",
"method": "base-sepolia",
"currency": "usdc",
"preparation": {
"chain": "base-sepolia",
"payerAddress": "0xAa266270cf90FEEA9760617d9c7B5083e9f08984",
"serializedTransaction": "0x02f9018e83014a34...",
"transactionParameters": {
"amount": "1000000",
"memo": "------BEGIN MEMO------...------END MEMO------"
}
},
"received": {
"chain": "base-sepolia",
"txId": "0xc9537a0e4ee4794101514d30418bd20f09cf66c3ce86b82b0be916489a338e85",
"amount": "1",
"currency": "usdc"
},
"receiptEmail": "alice@example.com"
}
}
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "Malformed API key. / API key provided doesn't have required scopes."
}{
"error": true,
"message": "Not found"
}{
"error": true,
"message": "Service temporarily unavailable. Try again in a few minutes. If the issue still persists, contact Crossmint support."
}{
"error": true,
"message": "A timeout occurred."
}Create Order
Creates an offramp order to cash out stablecoins to fiat. The order returns on-chain deposit instructions that the payer wallet broadcasts to fund the fiat payout.
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/orders \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"recipient": {
"paymentMethodId": "d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc"
},
"payment": {
"method": "base-sepolia",
"currency": "usdc",
"payerAddress": "0xAa266270cf90FEEA9760617d9c7B5083e9f08984",
"receiptEmail": "jsmith@example.com"
},
"lineItems": {
"currencyLocator": "fiat:usd",
"executionParameters": {
"mode": "exact-in",
"amount": "1"
}
}
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/orders"
payload = {
"recipient": { "paymentMethodId": "d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc" },
"payment": {
"method": "base-sepolia",
"currency": "usdc",
"payerAddress": "0xAa266270cf90FEEA9760617d9c7B5083e9f08984",
"receiptEmail": "jsmith@example.com"
},
"lineItems": {
"currencyLocator": "fiat:usd",
"executionParameters": {
"mode": "exact-in",
"amount": "1"
}
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipient: {paymentMethodId: 'd5e5c48a-7dec-44b1-8cf4-4615bf00c8fc'},
payment: {
method: 'base-sepolia',
currency: 'usdc',
payerAddress: '0xAa266270cf90FEEA9760617d9c7B5083e9f08984',
receiptEmail: 'jsmith@example.com'
},
lineItems: {
currencyLocator: 'fiat:usd',
executionParameters: {mode: 'exact-in', amount: '1'}
}
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/orders', 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://staging.crossmint.com/api/2022-06-09/orders",
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([
'recipient' => [
'paymentMethodId' => 'd5e5c48a-7dec-44b1-8cf4-4615bf00c8fc'
],
'payment' => [
'method' => 'base-sepolia',
'currency' => 'usdc',
'payerAddress' => '0xAa266270cf90FEEA9760617d9c7B5083e9f08984',
'receiptEmail' => 'jsmith@example.com'
],
'lineItems' => [
'currencyLocator' => 'fiat:usd',
'executionParameters' => [
'mode' => 'exact-in',
'amount' => '1'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-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://staging.crossmint.com/api/2022-06-09/orders"
payload := strings.NewReader("{\n \"recipient\": {\n \"paymentMethodId\": \"d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc\"\n },\n \"payment\": {\n \"method\": \"base-sepolia\",\n \"currency\": \"usdc\",\n \"payerAddress\": \"0xAa266270cf90FEEA9760617d9c7B5083e9f08984\",\n \"receiptEmail\": \"jsmith@example.com\"\n },\n \"lineItems\": {\n \"currencyLocator\": \"fiat:usd\",\n \"executionParameters\": {\n \"mode\": \"exact-in\",\n \"amount\": \"1\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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://staging.crossmint.com/api/2022-06-09/orders")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recipient\": {\n \"paymentMethodId\": \"d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc\"\n },\n \"payment\": {\n \"method\": \"base-sepolia\",\n \"currency\": \"usdc\",\n \"payerAddress\": \"0xAa266270cf90FEEA9760617d9c7B5083e9f08984\",\n \"receiptEmail\": \"jsmith@example.com\"\n },\n \"lineItems\": {\n \"currencyLocator\": \"fiat:usd\",\n \"executionParameters\": {\n \"mode\": \"exact-in\",\n \"amount\": \"1\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipient\": {\n \"paymentMethodId\": \"d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc\"\n },\n \"payment\": {\n \"method\": \"base-sepolia\",\n \"currency\": \"usdc\",\n \"payerAddress\": \"0xAa266270cf90FEEA9760617d9c7B5083e9f08984\",\n \"receiptEmail\": \"jsmith@example.com\"\n },\n \"lineItems\": {\n \"currencyLocator\": \"fiat:usd\",\n \"executionParameters\": {\n \"mode\": \"exact-in\",\n \"amount\": \"1\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"clientSecret": "_removed_",
"order": {
"orderId": "40f49812-123b-4d10-bdae-561e4ed2b990",
"phase": "payment",
"lineItems": [
{
"metadata": {
"name": "USD",
"description": "United States Dollar",
"imageUrl": "https://www.crossmint.com/assets/ui/flags/us.svg"
},
"quote": {
"status": "valid",
"charges": {
"unit": {
"amount": "1",
"currency": "usdc"
},
"fees": {
"type": "exact",
"amount": "0.002",
"currency": "usdc"
}
},
"totalPrice": {
"amount": "1",
"currency": "usdc"
}
},
"delivery": {
"status": "awaiting-payment",
"recipient": {
"locator": "paymentMethodId:d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc",
"paymentMethodId": "d5e5c48a-7dec-44b1-8cf4-4615bf00c8fc"
}
},
"executionMode": "exact-in"
}
],
"quote": {
"status": "valid",
"quotedAt": "2026-06-17T21:48:49.059Z",
"expiresAt": "2026-06-17T21:58:49.059Z",
"totalPrice": {
"amount": "1",
"currency": "usdc"
}
},
"payment": {
"status": "awaiting-payment",
"method": "base-sepolia",
"currency": "usdc",
"preparation": {
"chain": "base-sepolia",
"payerAddress": "0xAa266270cf90FEEA9760617d9c7B5083e9f08984",
"serializedTransaction": "0x02f9018e83014a34...",
"transactionParameters": {
"amount": "1000000",
"memo": "------BEGIN MEMO------...------END MEMO------"
}
},
"received": {
"chain": "base-sepolia",
"txId": "0xc9537a0e4ee4794101514d30418bd20f09cf66c3ce86b82b0be916489a338e85",
"amount": "1",
"currency": "usdc"
},
"receiptEmail": "alice@example.com"
}
}
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "Malformed API key. / API key provided doesn't have required scopes."
}{
"error": true,
"message": "Not found"
}{
"error": true,
"message": "Service temporarily unavailable. Try again in a few minutes. If the issue still persists, contact Crossmint support."
}{
"error": true,
"message": "A timeout occurred."
}Authorizations
Body
Recipient of the fiat payout. For offramp, this is the saved payout method (for example a bank account) that the funds are sent to. Save the payout method beforehand with the Create Payment Method endpoint and pass its identifier here.
Show child attributes
Show child attributes
Configuration for the on-chain stablecoin deposit that funds the offramp. The buyer sends the stablecoin from payerAddress on the chain given by method, and Crossmint pays out the equivalent fiat to the recipient payout method.
Show child attributes
Show child attributes
The fiat to receive, identifying the fiat currency and the amount.
Show child attributes
Show child attributes
Was this page helpful?

