Process payment
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"fingerprint": "<string>",
"radarSessionId": "<string>",
"savePaymentMethod": true,
"walletDisplayName": "<string>"
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment"
payload = {
"id": "<string>",
"fingerprint": "<string>",
"radarSessionId": "<string>",
"savePaymentMethod": True,
"walletDisplayName": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
fingerprint: '<string>',
radarSessionId: '<string>',
savePaymentMethod: true,
walletDisplayName: '<string>'
})
};
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([
'id' => '<string>',
'fingerprint' => '<string>',
'radarSessionId' => '<string>',
'savePaymentMethod' => true,
'walletDisplayName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"radarSessionId\": \"<string>\",\n \"savePaymentMethod\": true,\n \"walletDisplayName\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"radarSessionId\": \"<string>\",\n \"savePaymentMethod\": true,\n \"walletDisplayName\": \"<string>\"\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["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"radarSessionId\": \"<string>\",\n \"savePaymentMethod\": true,\n \"walletDisplayName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"lineItems": [
{
"chain": "abstract",
"delivery": {
"status": "failed",
"completedAt": "2023-11-07T05:31:56Z",
"failureReason": {
"code": "insufficient-funds",
"message": "<string>"
},
"rail": "ach-co",
"recipient": {
"email": "jsmith@example.com",
"locator": "<string>",
"walletAddress": "<string>",
"physicalAddress": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"name": "<string>",
"postalCode": "<string>",
"line2": "",
"state": "<string>",
"stateOrRegion": "<string>"
}
}
},
"executionMode": "exact-in",
"maxSlippageBps": "<string>",
"metadata": {
"description": "<string>",
"imageUrl": "<string>",
"name": "<string>",
"collection": {
"description": "<string>",
"imageUrl": "<string>",
"name": "<string>"
}
},
"quote": {
"quantityRange": {
"lowerBound": "<string>",
"upperBound": "<string>"
},
"status": "expired",
"charges": {
"unit": {
"amount": "<string>",
"currency": "$mfer"
},
"crossmintFees": {
"amount": "<string>",
"currency": "$mfer"
},
"fees": {
"amount": "<string>",
"currency": "$mfer",
"type": "exact"
},
"gas": {
"amount": "<string>",
"currency": "$mfer"
},
"networkFee": {
"amount": "<string>",
"currency": "$mfer"
},
"salesTax": {
"amount": "<string>",
"currency": "$mfer"
},
"shipping": {
"amount": "<string>",
"currency": "$mfer"
}
},
"totalPrice": {
"amount": "<string>",
"currency": "$mfer"
},
"unavailabilityReason": {
"code": "do",
"message": "<string>"
}
},
"callData": {},
"executionParams": {}
}
],
"locale": "Klingon",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment": {
"currency": "$mfer",
"method": "abstract",
"status": "awaiting-deposit-instructions",
"failureReason": {
"code": "<string>",
"category": "authorization_decline",
"developerMessage": "<string>",
"message": "<string>",
"retryPolicy": "complete_authentication"
},
"payer": {
"deviceId": "<string>",
"paymentMethodId": "<string>"
},
"preparation": {
"chain": "abstract",
"payerAddress": "<string>",
"serializedTransaction": "<string>",
"transactionParameters": {
"amount": "<string>",
"memo": "<string>"
}
},
"receiptEmail": "jsmith@example.com",
"received": {
"amount": "<string>",
"chain": "abstract",
"currency": "$mfer",
"txId": "<string>"
},
"refunded": {
"amount": "<string>",
"chain": "abstract",
"currency": "$mfer",
"txId": "<string>"
}
},
"phase": "completed",
"quote": {
"status": "all-line-items-unavailable",
"expiresAt": "2023-11-07T05:31:56Z",
"quotedAt": "2023-11-07T05:31:56Z",
"totalPrice": {
"amount": "<string>",
"currency": "$mfer"
}
},
"legal": {
"requirements": [
{
"display": "show-checkbox",
"type": "crossmint-privacy-policy",
"url": "<string>"
}
],
"shownBy": "crossmint"
},
"metadata": {}
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}Orders
Submit Deposit
Associates the broadcast on-chain stablecoin deposit with an offramp order by its transaction ID. This step is optional because Crossmint matches the deposit automatically by the order memo.
POST
/
2022-06-09
/
orders
/
{orderId}
/
payment
Process payment
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"fingerprint": "<string>",
"radarSessionId": "<string>",
"savePaymentMethod": true,
"walletDisplayName": "<string>"
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment"
payload = {
"id": "<string>",
"fingerprint": "<string>",
"radarSessionId": "<string>",
"savePaymentMethod": True,
"walletDisplayName": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
fingerprint: '<string>',
radarSessionId: '<string>',
savePaymentMethod: true,
walletDisplayName: '<string>'
})
};
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([
'id' => '<string>',
'fingerprint' => '<string>',
'radarSessionId' => '<string>',
'savePaymentMethod' => true,
'walletDisplayName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://staging.crossmint.com/api/2022-06-09/orders/{orderId}/payment"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"radarSessionId\": \"<string>\",\n \"savePaymentMethod\": true,\n \"walletDisplayName\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"radarSessionId\": \"<string>\",\n \"savePaymentMethod\": true,\n \"walletDisplayName\": \"<string>\"\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["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"fingerprint\": \"<string>\",\n \"radarSessionId\": \"<string>\",\n \"savePaymentMethod\": true,\n \"walletDisplayName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"lineItems": [
{
"chain": "abstract",
"delivery": {
"status": "failed",
"completedAt": "2023-11-07T05:31:56Z",
"failureReason": {
"code": "insufficient-funds",
"message": "<string>"
},
"rail": "ach-co",
"recipient": {
"email": "jsmith@example.com",
"locator": "<string>",
"walletAddress": "<string>",
"physicalAddress": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"name": "<string>",
"postalCode": "<string>",
"line2": "",
"state": "<string>",
"stateOrRegion": "<string>"
}
}
},
"executionMode": "exact-in",
"maxSlippageBps": "<string>",
"metadata": {
"description": "<string>",
"imageUrl": "<string>",
"name": "<string>",
"collection": {
"description": "<string>",
"imageUrl": "<string>",
"name": "<string>"
}
},
"quote": {
"quantityRange": {
"lowerBound": "<string>",
"upperBound": "<string>"
},
"status": "expired",
"charges": {
"unit": {
"amount": "<string>",
"currency": "$mfer"
},
"crossmintFees": {
"amount": "<string>",
"currency": "$mfer"
},
"fees": {
"amount": "<string>",
"currency": "$mfer",
"type": "exact"
},
"gas": {
"amount": "<string>",
"currency": "$mfer"
},
"networkFee": {
"amount": "<string>",
"currency": "$mfer"
},
"salesTax": {
"amount": "<string>",
"currency": "$mfer"
},
"shipping": {
"amount": "<string>",
"currency": "$mfer"
}
},
"totalPrice": {
"amount": "<string>",
"currency": "$mfer"
},
"unavailabilityReason": {
"code": "do",
"message": "<string>"
}
},
"callData": {},
"executionParams": {}
}
],
"locale": "Klingon",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment": {
"currency": "$mfer",
"method": "abstract",
"status": "awaiting-deposit-instructions",
"failureReason": {
"code": "<string>",
"category": "authorization_decline",
"developerMessage": "<string>",
"message": "<string>",
"retryPolicy": "complete_authentication"
},
"payer": {
"deviceId": "<string>",
"paymentMethodId": "<string>"
},
"preparation": {
"chain": "abstract",
"payerAddress": "<string>",
"serializedTransaction": "<string>",
"transactionParameters": {
"amount": "<string>",
"memo": "<string>"
}
},
"receiptEmail": "jsmith@example.com",
"received": {
"amount": "<string>",
"chain": "abstract",
"currency": "$mfer",
"txId": "<string>"
},
"refunded": {
"amount": "<string>",
"chain": "abstract",
"currency": "$mfer",
"txId": "<string>"
}
},
"phase": "completed",
"quote": {
"status": "all-line-items-unavailable",
"expiresAt": "2023-11-07T05:31:56Z",
"quotedAt": "2023-11-07T05:31:56Z",
"totalPrice": {
"amount": "<string>",
"currency": "$mfer"
}
},
"legal": {
"requirements": [
{
"display": "show-checkbox",
"type": "crossmint-privacy-policy",
"url": "<string>"
}
],
"shownBy": "crossmint"
},
"metadata": {}
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}{
"error": true,
"message": "<string>",
"code": "<string>"
}Path Parameters
Body
application/json
- Option 1
- Option 2
- Option 3
- Option 4
Available options:
basis-theory-apple-pay-token, basis-theory-google-pay-token, basis-theory-network-token, basis-theory-token, basis-theory-token-intent, crossmint-payment-method Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Payment processed successfully
- Option 1
- Option 2
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.
Available options:
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 Pattern:
^([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)$Show child attributes
Show child attributes
Available options:
completed, delivery, payment, quote Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

