Search.../

resumeOrder( )

Developer Preview

Resumes a paused pricing plan order.

Description

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:

  • The order status changes to "ACTIVE".
  • The pausePeriods array is updated.
  • The endDate for the order is adjusted to include the pause period.
  • The earliestEndDate is adjusted to include the pause period. (This property is reserved for future use).
Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function resumeOrder(_id: string): Promise<void>

resumeOrder Parameters

NAME
TYPE
DESCRIPTION
_id
string

Order ID.

Returns

Fulfilled - When the order is resumed.

Return Type:

Promise<
void
>

Was this helpful?

Resume an order

Copy Code
1import { orders } from 'wix-pricing-plans.v2';
2import { elevate } from 'wix-auth';
3
4/* Sample _id value: '9af3cbe6-fe27-4fdb-a0b0-892289b03d22' */
5
6const elevatedResumeOrder = elevate(orders.resumeOrder);
7
8export async function myResumeOrderFunction(_id) {
9 try {
10 await elevatedResumeOrder(_id);
11
12 return;
13 } catch (error) {
14 console.error(error);
15 // Handle the error
16 }
17}
18
19/* Promise resolves to void */
20