POST /v1/public/storefronts/{slug}/checkout
POST
/v1/public/storefronts/{slug}/checkoutPath parameters
slugstringrequiredRequest body
requiredapplication/jsoncart_idstringcustomer_namestringcustomer_phonestringrequireditemsStorefrontCheckoutItemInput[] | nullrequiredShow propertiesHide properties
Array of
StorefrontCheckoutItemInputproduct_slugstringrequiredquantityinteger<int32>requiredselected_optionsobjectvariant_idstringpromotion_codestringResponses
201Created
draft_order_idstringrequiredexpires_atstringrequiredtokenstringrequiredurlstringrequireddefaultError
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/public/storefronts/string/checkout" \
-H "Content-Type: application/json" \
-d '{
"cart_id": "string",
"customer_name": "string",
"customer_phone": "string",
"items": [
{
"product_slug": "string",
"quantity": 0,
"selected_options": {},
"variant_id": "string"
}
],
"promotion_code": "string"
}'const response = await fetch("/v1/public/storefronts/string/checkout", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"cart_id": "string",
"customer_name": "string",
"customer_phone": "string",
"items": [
{
"product_slug": "string",
"quantity": 0,
"selected_options": {},
"variant_id": "string"
}
],
"promotion_code": "string"
})
});import requests
response = requests.post(
"/v1/public/storefronts/string/checkout",
headers={
"Content-Type": "application/json"
},
json={
"cart_id": "string",
"customer_name": "string",
"customer_phone": "string",
"items": [
{
"product_slug": "string",
"quantity": 0,
"selected_options": {},
"variant_id": "string"
}
],
"promotion_code": "string"
},
)Response
{
"draft_order_id": "string",
"expires_at": "string",
"token": "string",
"url": "string"
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}