This article shares some possible use cases for your site, as well as an example flow that could support each use case. You're certainly not limited to these use cases, but they can be a helpful jumping off point.
Direct ordering mirrors the ordering of a plan using the Pricing Plans app.
For standard pricing plan processing, call the startOnlinePurchase()
method.
The following outlines the steps in a direct order lifecycle:
startOnlinePurchase()
method to handle all stages of buying the plan (selecting, ordering, and payment):
wixPayStatus
is Successful
.wixPayStatus
is Pending
and the order's status
is DRAFT
. The site member fills in contact
details and selects a payment method. Once payment is completed, the wixPayStatus
is Successful
and the order's status
is ACTIVE
.This flow lets buyers (logged-in site members) order and pay for a plan using a customized flow. You customize the entire process of selecting, requesting, and paying for a plan. You can add elements, such as confirmation lightboxes and forms, to customize the buyer's experience.
To let the buyer order a plan, call the createOnlineOrder()
method.
The following outlines the steps for customizing the pricing plan purchase:
createOnlineOrder()
method to handle the initial order of the plan.onOrderPurchased()
event (SDK | Velo).