curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"type": "crypto-tx-id",
"txId": "5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm"
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment"
payload = {
"type": "crypto-tx-id",
"txId": "5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm"
}
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({
type: 'crypto-tx-id',
txId: '5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm'
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment', 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}/payment",
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([
'type' => 'crypto-tx-id',
'txId' => '5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm'
]),
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/{orderId}/payment"
payload := strings.NewReader("{\n \"type\": \"crypto-tx-id\",\n \"txId\": \"5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm\"\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/{orderId}/payment")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"crypto-tx-id\",\n \"txId\": \"5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment")
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 \"type\": \"crypto-tx-id\",\n \"txId\": \"5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm\"\n}"
response = http.request(request)
puts response.read_body{
"orderId": "b2959ca5-65e4-466a-bd26-1bd05cb4f837",
"phase": "payment",
"locale": "en-US",
"lineItems": [
{
"chain": "polygon-amoy",
"executionMode": "exact-out",
"quantity": 1,
"callData": {
"quantity": 1,
"ADDITIONAL_PROPERTIES": "Your other mint function arguments"
},
"executionParams": {},
"maxSlippageBps": "50",
"metadata": {
"name": "Headless Checkout Demo",
"description": "NFT Description",
"imageUrl": "https://cdn.io/image.png"
},
"quote": {
"status": "valid",
"charges": {
"unit": {
"amount": "0.0001",
"currency": "eth"
},
"salesTax": {
"amount": "0.34",
"currency": "usdc"
},
"shipping": {
"amount": "0",
"currency": "usdc"
}
},
"totalPrice": {
"amount": "0.0001",
"currency": "eth"
}
},
"delivery": {
"status": "awaiting-payment",
"recipient": {
"locator": "email:<email_address>:<chain>",
"email": "testy@crossmint.com",
"walletAddress": "0x1234abcd..."
},
"txId": "0x2e69f11dae7869b92e3d5eaf4cadd50c48b5c6803d1232815f979d744521ad4c",
"tokens": [
{
"locator": "polygon:0xE04Cf294985282Ddc088E6433c064cfB85eD9EdA:3",
"contractAddress": "0xE04Cf294985282Ddc088E6433c064cfB85eD9EdA",
"tokenId": "3",
"mintHash": "MintHashAbc123",
"quantity": "1500000",
"symbol": "USDC",
"decimals": 6
}
]
}
}
],
"quote": {
"status": "valid",
"quotedAt": "2024-06-07T16:55:44.653Z",
"expiresAt": "2024-06-07T17:55:44.653Z",
"totalPrice": {
"amount": "0.0001375741",
"currency": "eth"
}
},
"payment": {
"status": "awaiting-payment",
"method": "base-sepolia",
"currency": "eth",
"preparation": {
"chain": "base-sepolia",
"payerAddress": "0x1234abcd...",
"serializedTransaction": "0x02f90....."
},
"receiptEmail": "user@example.com",
"received": {
"amount": "0.50",
"currency": "usd"
},
"refunded": {
"amount": "0.50",
"currency": "usd"
},
"failureReason": {
"code": "payment-declined",
"message": "The payment was declined by the issuer."
}
}
}{
"error": true,
"message": "<string>",
"parameters": {
"amount": "<string>",
"limit": "<string>",
"hoursUntilReset": "<string>",
"remainingAmount": "<string>"
}
}{
"error": true,
"message": "Malformed API key. / API key provided doesn't have required scopes."
}{
"error": true,
"message": "Not found"
}{
"error": true,
"message": "Please try again in a few minutes. If the issue still persists, contact Crossmint support."
}{
"error": true,
"message": "A timeout occurred."
}Process Payment
Associates the broadcast on-chain stablecoin deposit with an offramp order by its transaction ID.
This call is optional: the prepared transaction returned by Create Order already carries the order memo, so Crossmint matches the deposit to the order automatically once it is broadcast. Use this endpoint to explicitly attach the deposit transaction to the order (for example when you broadcast the transfer yourself and want to report the transaction ID immediately rather than waiting for automatic matching).
Authentication: Use either a server-side API key with the orders.update scope, or the clientSecret returned when the order was created, passed as an Authorization header.
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"type": "crypto-tx-id",
"txId": "5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm"
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment"
payload = {
"type": "crypto-tx-id",
"txId": "5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm"
}
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({
type: 'crypto-tx-id',
txId: '5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm'
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment', 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}/payment",
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([
'type' => 'crypto-tx-id',
'txId' => '5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm'
]),
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/{orderId}/payment"
payload := strings.NewReader("{\n \"type\": \"crypto-tx-id\",\n \"txId\": \"5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm\"\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/{orderId}/payment")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"crypto-tx-id\",\n \"txId\": \"5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment")
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 \"type\": \"crypto-tx-id\",\n \"txId\": \"5UfgJ7vVFmH8K9YxLmNpQrStWvXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLm\"\n}"
response = http.request(request)
puts response.read_body{
"orderId": "b2959ca5-65e4-466a-bd26-1bd05cb4f837",
"phase": "payment",
"locale": "en-US",
"lineItems": [
{
"chain": "polygon-amoy",
"executionMode": "exact-out",
"quantity": 1,
"callData": {
"quantity": 1,
"ADDITIONAL_PROPERTIES": "Your other mint function arguments"
},
"executionParams": {},
"maxSlippageBps": "50",
"metadata": {
"name": "Headless Checkout Demo",
"description": "NFT Description",
"imageUrl": "https://cdn.io/image.png"
},
"quote": {
"status": "valid",
"charges": {
"unit": {
"amount": "0.0001",
"currency": "eth"
},
"salesTax": {
"amount": "0.34",
"currency": "usdc"
},
"shipping": {
"amount": "0",
"currency": "usdc"
}
},
"totalPrice": {
"amount": "0.0001",
"currency": "eth"
}
},
"delivery": {
"status": "awaiting-payment",
"recipient": {
"locator": "email:<email_address>:<chain>",
"email": "testy@crossmint.com",
"walletAddress": "0x1234abcd..."
},
"txId": "0x2e69f11dae7869b92e3d5eaf4cadd50c48b5c6803d1232815f979d744521ad4c",
"tokens": [
{
"locator": "polygon:0xE04Cf294985282Ddc088E6433c064cfB85eD9EdA:3",
"contractAddress": "0xE04Cf294985282Ddc088E6433c064cfB85eD9EdA",
"tokenId": "3",
"mintHash": "MintHashAbc123",
"quantity": "1500000",
"symbol": "USDC",
"decimals": 6
}
]
}
}
],
"quote": {
"status": "valid",
"quotedAt": "2024-06-07T16:55:44.653Z",
"expiresAt": "2024-06-07T17:55:44.653Z",
"totalPrice": {
"amount": "0.0001375741",
"currency": "eth"
}
},
"payment": {
"status": "awaiting-payment",
"method": "base-sepolia",
"currency": "eth",
"preparation": {
"chain": "base-sepolia",
"payerAddress": "0x1234abcd...",
"serializedTransaction": "0x02f90....."
},
"receiptEmail": "user@example.com",
"received": {
"amount": "0.50",
"currency": "usd"
},
"refunded": {
"amount": "0.50",
"currency": "usd"
},
"failureReason": {
"code": "payment-declined",
"message": "The payment was declined by the issuer."
}
}
}{
"error": true,
"message": "<string>",
"parameters": {
"amount": "<string>",
"limit": "<string>",
"hoursUntilReset": "<string>",
"remainingAmount": "<string>"
}
}{
"error": true,
"message": "Malformed API key. / API key provided doesn't have required scopes."
}{
"error": true,
"message": "Not found"
}{
"error": true,
"message": "Please try again in a few minutes. If the issue still persists, contact Crossmint support."
}{
"error": true,
"message": "A timeout occurred."
}Authorizations
Path Parameters
This is the identifier for the order with UUID format.
Example: 9c82ef99-617f-497d-9abb-fd355291681b
Body
Process payment using a crypto transaction ID. Use this when the user has already submitted a crypto transaction.
Was this page helpful?

