Headless Checkout
Create Order
API Reference
Wallets
- POSTCreate Wallet
- GETGet Wallet By Locator
- GETGet Wallet Balance
- POSTFund Wallet
- GETGet NFTs from Wallet
- POSTCreate Transaction
- GETGet Transaction
- GETGet Wallet Transactions
- POSTApprove Transaction
- POSTCreate Signature
- GETGet All Signatures
- GETGet Signature
- POSTApprove Signature
- POSTRegister Delegated Signer
- GETGet Delegated Signer
NFTs
IP
NFT Collections
NFT Templates
Verifiable Credentials
Verifiable Credential Types
Headless Checkout
Action Status
Admin
Headless Checkout
Create Order
Creates a new order that can be used to complete a headless checkout.
API scope required: orders.create
POST
/
2022-06-09
/
orders
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/orders \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'origin: <origin>' \
--data '{
"recipient": {
"email": "jsmith@example.com",
"physicalAddress": {
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
}
},
"locale": "en-US",
"payment": {
"receiptEmail": "jsmith@example.com",
"method": "arbitrum-sepolia",
"currency": "eth",
"payerAddress": "<string>"
},
"lineItems": {
"collectionLocator": "crossmint:<collectionId>",
"callData": {
"totalPrice": "<string>"
}
}
}'
{
"clientSecret": "_removed_",
"order": {
"orderId": "b2959ca5-65e4-466a-bd26-1bd05cb4f837",
"phase": "payment",
"locale": "en-US",
"lineItems": [
{
"chain": "polygon-amoy",
"quantity": 1,
"callData": {
"quantity": 1,
"ADDITIONAL_PROPERTIES": "Your other mint function arguments"
},
"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..."
}
}
}
],
"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....."
}
}
}
}
Authorizations
Headers
The origin of the request. This header is required for security purposes.
Body
application/json
Response
201
application/json
Order successfully created.
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/orders \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'origin: <origin>' \
--data '{
"recipient": {
"email": "jsmith@example.com",
"physicalAddress": {
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
}
},
"locale": "en-US",
"payment": {
"receiptEmail": "jsmith@example.com",
"method": "arbitrum-sepolia",
"currency": "eth",
"payerAddress": "<string>"
},
"lineItems": {
"collectionLocator": "crossmint:<collectionId>",
"callData": {
"totalPrice": "<string>"
}
}
}'
{
"clientSecret": "_removed_",
"order": {
"orderId": "b2959ca5-65e4-466a-bd26-1bd05cb4f837",
"phase": "payment",
"locale": "en-US",
"lineItems": [
{
"chain": "polygon-amoy",
"quantity": 1,
"callData": {
"quantity": 1,
"ADDITIONAL_PROPERTIES": "Your other mint function arguments"
},
"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..."
}
}
}
],
"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....."
}
}
}
}