curl --request GET \
--url https://staging.crossmint.com/api/2022-06-09/orders/{orderId} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.crossmint.com/api/2022-06-09/orders/{orderId}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://staging.crossmint.com/api/2022-06-09/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://staging.crossmint.com/api/2022-06-09/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 => [
"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"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/2022-06-09/orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.crossmint.com/api/2022-06-09/orders/{orderId}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"lineItems": [
{
"chain": "base",
"delivery": {
"status": "failed",
"completedAt": "2024-01-15T10:30:00.000Z",
"failureReason": {
"code": "transfer-failed",
"message": "The delivery transaction reverted on chain."
},
"rail": "ach-us",
"recipient": {
"email": "buyer@example.com",
"locator": "email:buyer@example.com:base",
"walletAddress": "0x9fDA6b2C3e4d5e6F7a8B9c0D1e2F3a4B5c6D7e8F",
"physicalAddress": {
"city": "San Francisco",
"country": "US",
"line1": "123 Market St",
"name": "Jane Doe",
"postalCode": "94105",
"line2": "Apt 4B",
"state": "CA",
"stateOrRegion": "CA"
}
}
},
"executionMode": "exact-in",
"maxSlippageBps": "500",
"metadata": {
"description": "USDC Token",
"imageUrl": "https://cryptologos.cc/logos/usd-coin-usdc-logo.svg",
"name": "USDC",
"collection": {
"description": "Stablecoin issued by Circle, pegged 1:1 to the US dollar.",
"imageUrl": "https://cryptologos.cc/logos/usd-coin-usdc-logo.svg",
"name": "USD Coin"
}
},
"quote": {
"quantityRange": {
"lowerBound": "9.95",
"upperBound": "10.00"
},
"status": "valid",
"charges": {
"unit": {
"amount": "1.00",
"currency": "usd"
},
"crossmintFees": {
"amount": "0.37",
"currency": "usd"
},
"fees": {
"amount": "0.47",
"currency": "usd",
"type": "exact"
},
"gas": {
"amount": "0.10",
"currency": "usd"
},
"networkFee": {
"amount": "0.10",
"currency": "usd"
},
"salesTax": {
"amount": "0.84",
"currency": "usd"
},
"shipping": {
"amount": "4.99",
"currency": "usd"
},
"transferFee": {
"amount": "0.50",
"currency": "usdc"
}
},
"totalPrice": {
"amount": "10.47",
"currency": "usd"
},
"unavailabilityReason": {
"code": "to",
"message": "This item is sold out."
}
},
"callData": {},
"executionParams": {
"amount": "10.47",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"maxSlippageBps": "500",
"mode": "exact-in"
}
}
],
"locale": "en-US",
"orderId": "b2959ca5-65e4-466a-bd26-1bd05cb4f837",
"payment": {
"currency": "usd",
"method": "stripe-payment-element",
"status": "awaiting-payment",
"failureReason": {
"code": "issuer_decline",
"category": "authorization_decline",
"developerMessage": "Generic issuer decline (do_not_honor). Do not retry automatically; ask the buyer to contact their bank.",
"message": "Payment declined by your bank. Contact your bank or try a different payment method.",
"retryPolicy": "contact_payment_provider"
},
"payer": {
"deviceId": "8f3a1c2b9d4e5f60718293a4b5c6d7e8",
"paymentMethodId": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f"
},
"preparation": {
"chain": "base",
"payerAddress": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"serializedTransaction": "0x02f8b0…",
"transactionParameters": {
"amount": "10470000",
"memo": "b2959ca5-65e4-466a-bd26-1bd05cb4f837"
}
},
"receiptEmail": "buyer@example.com",
"received": {
"amount": "10.47",
"chain": "base",
"currency": "usd",
"txId": "0x33be4e2d636a22b56cb28b858f682dd428c7f468367072e2711c09cdd42cf826"
},
"refunded": {
"amount": "10.47",
"chain": "base",
"currency": "usd",
"txId": "0x7c0a4f9e2b1d8c3a6e5f4b2d1c0a9e8f7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c2d"
}
},
"phase": "payment",
"quote": {
"status": "valid",
"exchangeRate": {
"destinationCurrency": "mxn",
"rate": "17.4523",
"sourceCurrency": "usdc"
},
"expiresAt": "2024-01-15T10:30:00.000Z",
"quotedAt": "2024-01-15T10:30:00.000Z",
"totalPrice": {
"amount": "10.47",
"currency": "usd"
}
},
"legal": {
"requirements": [
{
"display": "show-checkbox",
"type": "crossmint-terms-of-service",
"url": "https://www.crossmint.com/legal/terms-of-service"
}
],
"shownBy": "crossmint"
},
"metadata": {
"internalOrderId": "ORD-10042"
}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}Get Order
Retrieves an offramp order by its ID to track its progress from the on-chain deposit through to the fiat payout.
curl --request GET \
--url https://staging.crossmint.com/api/2022-06-09/orders/{orderId} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.crossmint.com/api/2022-06-09/orders/{orderId}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://staging.crossmint.com/api/2022-06-09/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://staging.crossmint.com/api/2022-06-09/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 => [
"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"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/2022-06-09/orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.crossmint.com/api/2022-06-09/orders/{orderId}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"lineItems": [
{
"chain": "base",
"delivery": {
"status": "failed",
"completedAt": "2024-01-15T10:30:00.000Z",
"failureReason": {
"code": "transfer-failed",
"message": "The delivery transaction reverted on chain."
},
"rail": "ach-us",
"recipient": {
"email": "buyer@example.com",
"locator": "email:buyer@example.com:base",
"walletAddress": "0x9fDA6b2C3e4d5e6F7a8B9c0D1e2F3a4B5c6D7e8F",
"physicalAddress": {
"city": "San Francisco",
"country": "US",
"line1": "123 Market St",
"name": "Jane Doe",
"postalCode": "94105",
"line2": "Apt 4B",
"state": "CA",
"stateOrRegion": "CA"
}
}
},
"executionMode": "exact-in",
"maxSlippageBps": "500",
"metadata": {
"description": "USDC Token",
"imageUrl": "https://cryptologos.cc/logos/usd-coin-usdc-logo.svg",
"name": "USDC",
"collection": {
"description": "Stablecoin issued by Circle, pegged 1:1 to the US dollar.",
"imageUrl": "https://cryptologos.cc/logos/usd-coin-usdc-logo.svg",
"name": "USD Coin"
}
},
"quote": {
"quantityRange": {
"lowerBound": "9.95",
"upperBound": "10.00"
},
"status": "valid",
"charges": {
"unit": {
"amount": "1.00",
"currency": "usd"
},
"crossmintFees": {
"amount": "0.37",
"currency": "usd"
},
"fees": {
"amount": "0.47",
"currency": "usd",
"type": "exact"
},
"gas": {
"amount": "0.10",
"currency": "usd"
},
"networkFee": {
"amount": "0.10",
"currency": "usd"
},
"salesTax": {
"amount": "0.84",
"currency": "usd"
},
"shipping": {
"amount": "4.99",
"currency": "usd"
},
"transferFee": {
"amount": "0.50",
"currency": "usdc"
}
},
"totalPrice": {
"amount": "10.47",
"currency": "usd"
},
"unavailabilityReason": {
"code": "to",
"message": "This item is sold out."
}
},
"callData": {},
"executionParams": {
"amount": "10.47",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"maxSlippageBps": "500",
"mode": "exact-in"
}
}
],
"locale": "en-US",
"orderId": "b2959ca5-65e4-466a-bd26-1bd05cb4f837",
"payment": {
"currency": "usd",
"method": "stripe-payment-element",
"status": "awaiting-payment",
"failureReason": {
"code": "issuer_decline",
"category": "authorization_decline",
"developerMessage": "Generic issuer decline (do_not_honor). Do not retry automatically; ask the buyer to contact their bank.",
"message": "Payment declined by your bank. Contact your bank or try a different payment method.",
"retryPolicy": "contact_payment_provider"
},
"payer": {
"deviceId": "8f3a1c2b9d4e5f60718293a4b5c6d7e8",
"paymentMethodId": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f"
},
"preparation": {
"chain": "base",
"payerAddress": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"serializedTransaction": "0x02f8b0…",
"transactionParameters": {
"amount": "10470000",
"memo": "b2959ca5-65e4-466a-bd26-1bd05cb4f837"
}
},
"receiptEmail": "buyer@example.com",
"received": {
"amount": "10.47",
"chain": "base",
"currency": "usd",
"txId": "0x33be4e2d636a22b56cb28b858f682dd428c7f468367072e2711c09cdd42cf826"
},
"refunded": {
"amount": "10.47",
"chain": "base",
"currency": "usd",
"txId": "0x7c0a4f9e2b1d8c3a6e5f4b2d1c0a9e8f7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c2d"
}
},
"phase": "payment",
"quote": {
"status": "valid",
"exchangeRate": {
"destinationCurrency": "mxn",
"rate": "17.4523",
"sourceCurrency": "usdc"
},
"expiresAt": "2024-01-15T10:30:00.000Z",
"quotedAt": "2024-01-15T10:30:00.000Z",
"totalPrice": {
"amount": "10.47",
"currency": "usd"
}
},
"legal": {
"requirements": [
{
"display": "show-checkbox",
"type": "crossmint-terms-of-service",
"url": "https://www.crossmint.com/legal/terms-of-service"
}
],
"shownBy": "crossmint"
},
"metadata": {
"internalOrderId": "ORD-10042"
}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}Authorizations
API key required for authentication
Path Parameters
The order ID, in UUID format. Create Order returns it as order.orderId.
"9c82ef99-617f-497d-9abb-fd355291681b"
Response
Order retrieved successfully.
Items in the order. Each line item has its own quote and delivery status.
- Exact-in (fixed spend)
- Exact-out (fixed quantity)
Show child attributes
Show child attributes
Locale for the checkout, in IETF BCP 47. It impacts the email receipt language. Ensure your UI is set to the same language as specified here. Throws an error if passed an invalid language.
Klingon, de-DE, en-US, es-ES, fr-FR, it-IT, ja-JP, ko-KR, pt-PT, ru-RU, th-TH, tr-TR, uk-UA, vi-VN, zh-CN, zh-TW "en-US"
Unique ID of the order, in UUID format.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"b2959ca5-65e4-466a-bd26-1bd05cb4f837"
Payment leg of the order. Read status to find the next action.
Show child attributes
Show child attributes
Current phase of the order lifecycle. quote: the quote is not final. payment: the order waits for the payment. delivery: the payment is received and delivery is in progress. completed: every line item is delivered.
completed, delivery, payment, quote "payment"
Quote for the whole order. Its values aggregate the line item quotes.
Show child attributes
Show child attributes
Terms that apply to the order. Absent from List Orders responses.
Show child attributes
Show child attributes
Metadata that you sent when you created the order.
Show child attributes
Show child attributes
{ "internalOrderId": "ORD-10042" }
Was this page helpful?

