This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a new checkout based on the checkout template and redirects to the new checkout page.
Before using this endpoint, you must have a checkout template available. Create a checkout template with Create Checkout Template.
To build a URL that uses this endpoint, follow this format:
https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}
To create a checkout but not automatically redirect to the checkout page, use Create Checkout From Template.
ID of the checkout template to use to create a checkout.
ID of the site associated with the checkout template.
curl -X GET \
'https://www.wixapis.com/ecom/v1/checkout-templates/d447475f-34ed-4be5-b199-b120c6938c39/create-and-redirect-to-checkout' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
"siteId": "811d8a67-3bd7-46a5-8cd9-843bb77b2a7d"
}'
{
"body": "",
"statusCode": 302,
"headers": [
{
"key": "Location",
"value": "https://example.wixsite.com/example-store/checkout?appSectionParams=%7B%0A%22checkoutId%22%3A%22af8ed7c2-b638-4def-973d-2c9c09f9f8d0%22%2C%0A%22storeUrl%22%3A%22https%3A%2F%2Fexample.wixsite.com%2Fexample-store%22%2C%0A%22a11y%22%3Afalse%2C%0A%22isFastFlow%22%3Afalse%2C%0A%22isPickupFlow%22%3Afalse%2C%0A%22currentCurrency%22%3A%22USD%22%2C%0A%22linkSource%22%3A%22acMail%22%0A%7D&linkSource=acMail&checkoutOOI=true&disableContinueShopping=true"
}
]
}
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.