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 '
{
"lineItems": [
{
"callData": {
"quantity": 1
},
"collectionLocator": "crossmint:3b1d0f5a-9c2e-4d7b-8a6f-1e2c3d4b5a69"
}
],
"payment": {
"currency": "usd",
"method": "card",
"receiptEmail": "buyer@example.com"
},
"recipient": {
"email": "buyer@example.com"
}
}
'{
"clientSecret": "<string>",
"order": {
"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": {}
}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 '
{
"lineItems": [
{
"callData": {
"quantity": 1
},
"collectionLocator": "crossmint:3b1d0f5a-9c2e-4d7b-8a6f-1e2c3d4b5a69"
}
],
"payment": {
"currency": "usd",
"method": "card",
"receiptEmail": "buyer@example.com"
},
"recipient": {
"email": "buyer@example.com"
}
}
'{
"clientSecret": "<string>",
"order": {
"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
Body
Create an order for one or more Crossmint line items, such as a collection mint or a token purchase. Line items with currencyLocator need recipient.paymentMethodId and payment.receiptEmail.
Items to buy. Identify each item with one locator: collectionLocator to mint from a collection, tokenLocator to buy a token, or currencyLocator to offramp to fiat. Every item in one order must use the same locator type. A single object instead of an array is also accepted.
1- Collection locator
- Token locator
- Currency locator
Show child attributes
Show child attributes
How the buyer pays. method selects a card provider, a bank transfer, a prefunded balance, or the chain that the crypto payment is sent from. currency is the currency that the buyer pays in.
- Bank transfer (EUR)
- Wirex prefunded balance (EUR)
- Card (tokenized)
- Card
- Card token
- Card via Checkout.com Flow
- Card via Stripe Payment Element
- Solana
- EVM
- Sui
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 Free-form JSON that you attach to the order. It is returned on every order response.
Show child attributes
Show child attributes
Who receives the items. Send one of email, walletAddress, or paymentMethodId. If you send an email, Crossmint creates a custodial wallet for it. If you send no recipient, the order quote has the status requires-recipient until you set one with Update Order.
- Email
- Payment method
- Wallet address
Show child attributes
Show child attributes
Whether to place the order. create (default) places the order and moves it to the payment phase. draft returns what the order would look like without placing it. Draft orders are not persisted and cannot be read with Get Order or List Orders.
create, draft Was this page helpful?

