Use the Pricing Plans Checkout API to create online orders for your pricing plans from page code.
To use APIs for checking out orders, first set up your site to:
Use the Checkout APIs to create orders and facilitate payment.
The Checkout API allows you to:
Updating the properties of a pricing plan does not affect any current orders of the plan by members. The existing orders retain their existing terms and pricing.
Members can order pricing plans in 2 ways:
Orders created online are considered drafts until they are paid for. Drafts are not listed in the Subscriptions
dashboard page and are not saved in the Orders
collection.
Offline orders are never considered drafts even if they are not yet paid for. Unlike online orders,
offline orders are immediately listed in the Subscriptions dashboard page and saved in the Orders
collection.
Actions related to basic pricing plan management are available from the Pricing Plans page in the Dashboard. These actions correspond to the functions available in the Pricing Plans APIs.
Every pricing plan order corresponds to a Wix subscription, including orders for single payment plans. You can see all orders from your site's Subscriptions page in the Dashboard. Actions available on this page correspond to the functions available in the Orders APIs and the Checkout APIs.
Notes:
Wix pricing plans are 1 type of Wix subscriptions available from the Subscriptions page. For example, the Subscriptions page also includes Wix Stores subscriptions and Wix invoice subscriptions.
Pricing plans can be 1 of 3 different pricing models: singlePaymentForDuration
, singlePaymentUnlimited
, and subscription
. Orders for all pricing plan models are displayed
on the Subscriptions page, not just subscription
type models. See Pricing Models to learn more.
You need "Manage Pricing Plans" permissions to perform pricing plan checkout functions.
To use the Checkout API, import checkout
from the @wix/site-pricing-plans
module.