This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Cancels an existing order.
The cancelOrder()
function returns a Promise that resolves when the order is successfully canceled.
For orders with recurring payments, a cancellation can be set to occur either IMMEDIATELY
or at the NEXT_PAYMENT_DATE
.
For orders with one-time payments, a cancellation occurs IMMEDIATELY
.
Canceling an order changes the order status to CANCELED
.
When a site owner cancels an ordered plan during the free trial period, they choose to apply the cancellation IMMEDIATELY
or at the NEXT_PAYMENT_DATE
.
Canceling IMMEDIATELY
will end the subscription for the buyer
immediately, even during the free trial period and the buyer won't be billed.
Canceling at the NEXT_PAYMENT_DATE
allows the buyer to continue using the benefits of the subscription until the end of the free trial period. Then, the subscription ends and the buyer is not billed.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
Order ID.
When the order is canceled.
One time orders can only be canceled immediately. Supported values:
"IMMEDIATELY"
: The order is canceled immediately."NEXT_PAYMENT_DATE"
: The order is canceled at the next payment date.This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates an order for a buyer who purchased the plan with an offline transaction.
The createOfflineOrder()
function returns a Promise that resolves to an order
object when the order has been created.
Payment of an offline order is handled in 1 of 2 ways.
true
in the paid
request parameter.markAsPaid()
function.When creating a non-free offline order:
"PENDING"
if the start date is in the future. Otherwise, the status is set to "ACTIVE"
.
The order's last payment status is set to "UNPAID"
or "PAID"
.When creating a free offline order:
"PENDING"
if the start date is in the future. Otherwise, the status is set to "ACTIVE"
."NOT_APPLICABLE"
.This function requires elevated permissions and runs only on the backend and on dashboard pages.
ID of the plan being ordered. See Plans for more information about plan IDs
ID of the member ordering the plan.
Options for creating an offline order.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Provides a preview of an offline order as if it was purchased.
The getOfflineOrderPreview()
function returns a Promise that resolves to a temporary preview of the offline order.
The preview uses the same logic as purchasing a plan, but the preview is not saved. Because an order is not actually created, the preview's _id
and subscriptionId
properties are displayed as a string of multiple zero characters (000000-0000
).
If taxes are configured for the site, taxes are applied to the preview. If not, tax
previews as null
.
You can preview the order to check purchase limitations, but the limitations are not enforced for the preview. If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then purchaseLimitExceeded
will return as true
. Thus function is not available to the buyer. You specify the member ID for the buyer whose order should be previewed. To get a general price preview for a plan that's not buyer-specific, use the getPricePreview()
function.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
ID of the plan of the previewed order.
Member ID of the buyer the previewed order is for.
Options for previewing the offline order.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a preview of an order's pricing as if it was purchased.
The getPricePreview()
function returns a Promise that resolves to a temporary preview of the order's price.
The price preview uses the same logic for calculating prices as used when purchasing a plan, but the preview is not saved. If taxes are configured for the site, taxes are applied to the preview. If not, the tax
previews as null
.
Buyers do not have to be logged in to preview the price, as such, the details returned by this function are not buyer-specific. To generate a preview of a purchase for a specific-buyer, use the getOfflineOrderPreview()
.
ID of plan to preview.
Options for getting a price preview.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves an order by ID.
The managementGetOrder()
function returns a Promise that resolves to information about the specified order.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
Order ID.
Options to use when getting an order.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Lists pricing plan orders.
The managementListOrders()
function returns a Promise that resolves to a list of up to 50 pricing plan orders. You can specify options for filtering, sorting, and paginating the results.
This function returns the orders on the site. To list orders for the currently logged-in member, use memberListOrders()
.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
Filtering, sorting, and pagination options.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Marks an offline order as paid.
The markAsPaid()
function returns a Promise that resolves when the offline order is successfully marked as paid.
The entire order is marked as paid, even if the order's payments are recurring.
Note: Marking separate payment cycles as paid is not yet supported. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments.
Marking an offline order as paid causes the following changes:
lastPaymentStatus
changes to "PAID"
."PENDING"
or "ACTIVE"
, depending on the order's startDate
.An error occurs if you attempt to:
markAsPaid()
function is supported for offline orders only.This function requires elevated permissions and runs only on the backend and on dashboard pages.
Order ID.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
Gets an order by ID for the currently logged-in member.
The memberGetOrder()
function returns a Promise that resolves to information about a specified order for the currently logged-in member.
Order ID.
Options for getting a logged-in member's order.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Lists orders for the currently logged-in member.
The memberListOrders()
function returns a Promise that resolves to a list of up to 100 pricing plan orders.
Filtering, sorting, and pagination options.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Pauses a pricing plan order.
The pauseOrder()
function returns a Promise that resolves when the order is successfully paused.
For orders with recurring payments, pauseOrder()
also pauses the payment schedule. Buyers are not charged when an order is paused. Use pauseOrder()
, for example, if the buyer is away and would like to put their pricing plan membership on hold until they return. Pausing an order affects the end date of the order by adding the time the order is paused to the endDate
. You can only pause orders with an "ACTIVE
" status.
Pausing an order causes the following changes:
"PAUSED"
.pausePeriods
array is updated.The endDate
and the earliestEndDate
for the order are adjusted to include the pause period when the order is resumed.
Paused orders can be continued with the resumeOrder()
function.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
Order ID.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Extends the duration of a pricing plan order by postponing the order's endDate
.
The postponeEndDate()
function returns a Promise that resolves when the order's end date is successfully changed.
The new end date and time must be later than the order's current endDate
.
Postponing the end date of an order does not impact payments. For example, if the pricing plan is for a membership to an online lecture series, and you want to extend the duration of the series because the lecturer could not attend some sessions, you can postpone the end date of the orders for all relevant participants. The participants will not be billed additionally.
Postponing an order causes the following changes:
endDate
for the order is adjusted to the new end date.This function requires elevated permissions and runs only on the backend and on dashboard pages.
Order ID.
New end date and time.
Must be later than the current end date and time.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Starts the process of canceling an order.
The requestCancellation()
function returns a Promise that resolves when the order cancellation is successfully requested.
For orders with recurring payments, a cancellation can be set to occur either immediately or at the next payment date. For orders with one-time payments, a cancellation occurs immediately after the request is processed.
Requesting an order cancellation starts the cancellation process. There may be some operations that continue to be processed before the status of the order is changed to "CANCELED"
. For example, payments might need to be refunded before the order is fully canceled.
When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end of the free trial period and they won't be billed. The buyer may continue using the benefits until the end of the free trial period.
Order ID.
Whether to cancel the order immediately or at the next payment date. One-time payment orders can only be canceled immediately.
Supported values:
"IMMEDIATELY"
: Indicates that the order should be canceled immediately."NEXT_PAYMENT_DATE"
: Indicates that the order be canceled at the next payment date.This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Resumes a paused pricing plan order.
The resumeOrder()
function returns a Promise that resolves when a paused order is successfully resumed.
For orders with recurring payments, resumeOrder()
also restarts the payment schedule.
Resuming an order causes the following changes:
"ACTIVE"
.pausePeriods
array is updated.endDate
for the order is adjusted to include the pause period.earliestEndDate
is adjusted to include the pause period. (This property is reserved for future use).This function requires elevated permissions and runs only on the backend and on dashboard pages.
Order ID.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.