Â
The Checkout Templates API allows you to create and manage pre-populated checkouts to share with customers. When customers then create checkouts from these templates, the new checkouts already include this information.
With the Checkout Templates API, you can:
It’s important to note that the checkout template functionality is not currently available in the Wix Dashboard. If you create checkout templates with the API, you will also manage and update your checkout templates through the API. For example, when you offer a sale through a checkout template you need the API to change the template’s status
to INACTIVE
in order to turn off the sale when you want it to end.
To use the Checkout Templates API, import { checkoutTemplates }
from the wix-ecom-backend
module:
1
Except for createCheckoutFromTemplate()
,
all functions in the Checkout Templates API are restricted and only run if you elevate permissions
using the wix-auth
elevate()
function.
Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.