POST
/
checkout
/
single
Create single product checkout
curl --request POST \
  --url https://api.henrylabs.ai/v0/checkout/single \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-user-id: <api-key>' \
  --data '{
  "shippingDetails": {
    "fullName": "John Doe",
    "email": "john.doe@example.com",
    "phoneNumber": "+1234567890",
    "addressLine1": "350 5th Ave",
    "addressLine2": "Apt 1",
    "countryCode": "US",
    "city": "New York",
    "stateOrProvince": "New York",
    "postalCode": "10001"
  },
  "productDetails": {
    "name": "Men'\''s Trail Runners",
    "price": "100",
    "quantity": 1,
    "metadata": {
      "color": "Black",
      "size": "9"
    }
  },
  "productLink": "https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106"
}'
{
  "success": true,
  "status": "<string>",
  "message": "<string>",
  "data": {
    "id": "<string>",
    "internalOrderId": "<string>",
    "status": "<string>",
    "statusMessage": "<string>",
    "orderAmount": "<string>",
    "currency": "<string>",
    "productName": "<string>",
    "quantity": 123,
    "productMetadata": {},
    "shippingDetails": {
      "email": "<string>",
      "fullName": "<string>",
      "addressLine1": "<string>",
      "addressLine2": "<string>",
      "city": "<string>",
      "stateOrProvince": "<string>",
      "postalCode": "<string>",
      "countryCode": "<string>",
      "phoneNumber": "<string>"
    }
  }
}
This endpoint allows you to perform an automated checkout for a single product by providing all necessary details in one API call. This is useful when you have all the information ready and want to execute a checkout quickly. Payment for the checkout is processed using the user’s default payment method on file.

Authorizations

x-api-key
string
header
required
x-user-id
string
header
required

Body

application/json

Response

201
application/json

Order created successfully

The response is of type object.