createCheckoutTemplate( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a checkout template.

A checkout template is used to create a new checkout that will include predefined information. For example, a single link with a checkoutTemplateId can be shared with customers and each time the link is clicked, a new checkout page will be created for that customer with certain checkout information already populated.

The customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is using the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an additional coupon on top of the sale being offered. If so, they can set customization.lockedCoupon to true.

A checkout can be created with a checkout template by calling createCheckoutFromTemplate(). The site may add further customizations to the new checkout and then redirect the customer using the new checkout's checkoutUrl.

Admin Method

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Manage eCommerce - all permissions
Learn more about permission scopes.
Method Declaration
Copy
Method Parameters
checkoutTemplateCheckoutTemplateRequired

Checkout template to create.

Returns
Return Type:Promise<CheckoutTemplate>
Was this helpful?
Yes
No