onOrderResumed( )


Developer Preview

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

Triggered when a paused order is resumed.

Method Declaration
Copy
function wixPricingPlans_onOrderResumed(event: OrderResumedEvent): void;
Method Parameters
eventOrderResumedEvent

Information about the order that was resumed and metadata for the event

onOrderResumed example
JavaScript
// Place this code in the events.js file // of your site's Backend section. // Add the file if it doesn't exist. export function wixPricingPlans_onOrderResumed(event) { const orderId = event.data.order._id; const planId = event.data.planId; const eventTime = event.metadata.eventTime; console.log( `Order ID ${orderId} was resumed for plan ID ${planId} at ${eventTime}. Full event object:`, event, ); } /* Full event object: * { * "data": { * "order": { * "_createdDate": "2024-02-11T09:11:13.012Z", * "_id": "3feb1cf5-bf38-47c4-81cb-06b61ca11c8a", * "_updatedDate": "2024-02-11T09:14:57.750Z", * "buyer": { * "contactId": "3fc889f6-18e8-4fd9-a509-27db9f037f26", * "memberId": "3fc889f6-18e8-4fd9-a509-27db9f037f26" * }, * "currentCycle": { * "index": 1, * "startedDate": "2024-02-11T09:11:13.012Z" * }, * "cycles": [ * { * "index": 1, * "startedDate": "2024-02-11T09:11:13.012Z" * } * ], * "formData": { * "submissionData": {} * }, * "lastPaymentStatus": "PAID", * "orderMethod": "UNKNOWN", * "pausePeriods": [ * { * "pauseDate": "2024-02-11T09:14:57.750Z", * "resumeDate": "2024-02-11T09:28:13.186Z", * "status": "ENDED" * } * ], * "planDescription": "Full feature enablement - lifetime plan", * "planId": "e901222b-c137-4bc7-adc3-c1efa3c880a2", * "planName": "Quality Plan - Lifetime", * "planPrice": "1500", * "priceDetails": { * "coupon": { * "_id": "07de4c3a-536b-4c30-adb9-991935da1681", * "amount": "1500.00", * "code": "sale-day" * }, * "currency": "USD", * "discount": "1500.00", * "planPrice": "1500", * "subtotal": "1500.00", * "tax": { * "amount": "0", * "includedInPrice": false, * "name": "Tax", * "rate": "6.5" * }, * "total": "0" * }, * "pricing": { * "prices": [ * { * "duration": { * "cycleFrom": 1, * "numberOfCycles": 1 * }, * "price": { * "currency": "USD", * "discount": "1500.00", * "fees": [], * "proration": "0", * "subtotal": "1500.00", * "tax": { * "amount": "0", * "includedInPrice": false, * "name": "Tax", * "rate": "6.5" * }, * "total": "0" * } * } * ], * "singlePaymentUnlimited": true * }, * "startDate": "2024-02-11T09:11:13.012Z", * "status": "ACTIVE", * "statusNew": "ACTIVE", * "subscriptionId": "d3290015-f808-4f08-a4a0-6732acbf2a43", * "type": "ONLINE", * "wixPayOrderId": "36a79fab-c436-4bf0-b3be-14e9f75cf263" * } * }, * "metadata": { * "entityId": "3feb1cf5-bf38-47c4-81cb-06b61ca11c8a", * "eventTime": "2024-02-11T09:28:13.343708694Z", * "id": "c020a4af-1647-4301-b821-d6ee72b7a462", * "triggeredByAnonymizeRequest": false * } * } */
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?