curl --request POST \
--url https://api.henrylabs.ai/v0/checkout/single-network-token \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-user-id: <x-user-id>' \
--data @- <<EOF
{
"shippingDetails": {
"fullName": "John Doe",
"email": "[email protected]",
"phoneNumber": "+1234567890",
"addressLine1": "350 5th Ave",
"countryCode": "US",
"city": "New York",
"stateOrProvince": "New York",
"postalCode": "10001",
"addressLine2": "Apt 1"
},
"productDetails": {
"name": "Men's Trail Runners",
"price": "100",
"quantity": 1,
"productLink": "https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106",
"productId": "P01145AC2",
"metadata": {
"color": "Black",
"size": "9"
},
"affiliateProductLink": "https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106?ref=affiliate123",
"productImageLink": "https://images.ctfassets.net/hnk2vsx53n6l/2xi62H2BswFpVK0SjUmhXM/0d4a4bb14915c9a5d3228df45c774629/c36d3fd00cf91ec9fb5ff4bc4d4a0093cccbe8cd.png?w=192&h=192&fm=avif&f=center&fit=fill&q=80"
},
"cardDetails": {
"cardNumber": "4242424242424242",
"cardExp": "12/29",
"cardHolder": "John Doe",
"cardCvv": "123",
"email": "[email protected]",
"phoneNumber": "+12125551234",
"billingAddress": "123 Main Street, Apt 4B",
"zipCode": "10001"
}
}
EOF{
"success": true,
"status": "<string>",
"message": "<string>",
"data": {
"id": "<string>",
"status": "<string>",
"statusMessage": "<string>",
"orderAmount": "<string>",
"currency": "<string>",
"productName": "<string>",
"quantity": 123,
"shippingDetails": {
"fullName": "John Doe",
"email": "[email protected]",
"phoneNumber": "+1234567890",
"addressLine1": "350 5th Ave",
"countryCode": "US",
"city": "New York",
"stateOrProvince": "New York",
"postalCode": "10001",
"addressLine2": "Apt 1"
},
"productMetadata": {}
}
}Create a checkout order for a single product with credit card details provided directly
curl --request POST \
--url https://api.henrylabs.ai/v0/checkout/single-network-token \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-user-id: <x-user-id>' \
--data @- <<EOF
{
"shippingDetails": {
"fullName": "John Doe",
"email": "[email protected]",
"phoneNumber": "+1234567890",
"addressLine1": "350 5th Ave",
"countryCode": "US",
"city": "New York",
"stateOrProvince": "New York",
"postalCode": "10001",
"addressLine2": "Apt 1"
},
"productDetails": {
"name": "Men's Trail Runners",
"price": "100",
"quantity": 1,
"productLink": "https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106",
"productId": "P01145AC2",
"metadata": {
"color": "Black",
"size": "9"
},
"affiliateProductLink": "https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106?ref=affiliate123",
"productImageLink": "https://images.ctfassets.net/hnk2vsx53n6l/2xi62H2BswFpVK0SjUmhXM/0d4a4bb14915c9a5d3228df45c774629/c36d3fd00cf91ec9fb5ff4bc4d4a0093cccbe8cd.png?w=192&h=192&fm=avif&f=center&fit=fill&q=80"
},
"cardDetails": {
"cardNumber": "4242424242424242",
"cardExp": "12/29",
"cardHolder": "John Doe",
"cardCvv": "123",
"email": "[email protected]",
"phoneNumber": "+12125551234",
"billingAddress": "123 Main Street, Apt 4B",
"zipCode": "10001"
}
}
EOF{
"success": true,
"status": "<string>",
"message": "<string>",
"data": {
"id": "<string>",
"status": "<string>",
"statusMessage": "<string>",
"orderAmount": "<string>",
"currency": "<string>",
"productName": "<string>",
"quantity": 123,
"shippingDetails": {
"fullName": "John Doe",
"email": "[email protected]",
"phoneNumber": "+1234567890",
"addressLine1": "350 5th Ave",
"countryCode": "US",
"city": "New York",
"stateOrProvince": "New York",
"postalCode": "10001",
"addressLine2": "Apt 1"
},
"productMetadata": {}
}
}Show child attributes
Full name
1"John Doe"
Phone number
1"+1234567890"
Address line 1
1"350 5th Ave"
Country code
2"US"
City
1"New York"
State or province
1"New York"
Postal code
1"10001"
Address line 2
"Apt 1"
Show child attributes
Product name
1"Men's Trail Runners"
Product price
1"100"
Quantity
1
Product link
"https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106"
Product Id
1"P01145AC2"
Affiliate product link (if provided, will be used instead of productLink for order fulfillment)
"https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106?ref=affiliate123"
Product image link (thumbnail)
"https://images.ctfassets.net/hnk2vsx53n6l/2xi62H2BswFpVK0SjUmhXM/0d4a4bb14915c9a5d3228df45c774629/c36d3fd00cf91ec9fb5ff4bc4d4a0093cccbe8cd.png?w=192&h=192&fm=avif&f=center&fit=fill&q=80"
Show child attributes
Card number
"4242424242424242"
Card expiration date
"12/29"
Cardholder name
1"John Doe"
CVV
"123"
Phone number
1"+12125551234"
Billing address
1"123 Main Street, Apt 4B"
ZIP code
1"10001"
Order created successfully
Show child attributes
Show child attributes
Full name
1"John Doe"
Phone number
1"+1234567890"
Address line 1
1"350 5th Ave"
Country code
2"US"
City
1"New York"
State or province
1"New York"
Postal code
1"10001"
Address line 2
"Apt 1"