import { RequestOptionsFactory } from '@wix/sdk-types'; /** Retrieves an order for the currently logged-in member by ID. */ export declare function memberGetOrder(payload: object): RequestOptionsFactory; /** Retrieves a list of up to 100 pricing plan orders for currently logged-in member. */ export declare function memberListOrders(payload: object): RequestOptionsFactory; /** * Cancels an order. Recurring orders can be canceled either immediately or at the next payment date. One time orders can only be canceled immediately. * * 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. * * Canceling during the free trial period: 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. * * >**Note:** * >This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions). */ export declare function requestCancellation(payload: object): RequestOptionsFactory; /** * Creates an online order for a site member. * * If this method is called by a site member ([SDK](https://dev.wix.com/docs/sdk/articles/get-started/about-identities#site-member) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member)), the plan is automatically ordered on behalf of that site member. Otherwise, you must specify `onBehalf.memberId` in your call. * * When an online order is created, but payment hasn't been processed, its status is set to `DRAFT`. After the payment has been processed, if the start date is in the future the order's status is set to `PENDING`. Otherwise, it's set to `ACTIVE`. */ export declare function createOnlineOrder(payload: object): RequestOptionsFactory; /** * Creates an order for a buyer who purchased the plan with an offline transaction. * * An offline order is handled off of the Wix site and is marked as `type`: `offline`. If a pricing plan * has a limit on the amount of purchases per buyer, that limit is ignored for offline orders. * Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection). * * When creating a free offline order: * The order's status is set to `"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 `"NOT_APPLICABLE"`. " * * When creating a non-free offline order: * The order's status is set to `"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"` based on the data passed in the `paid` boolean in the request. * * Payment for an offline order can be set in 1 of 2 ways: * + During order creation, set `paid`: `true`. * + After creation, call Mark As Paid. */ export declare function createOfflineOrder(payload: object): RequestOptionsFactory; /** * Returns an `order` object that represents a potential online order for a site member. * * You can use this method to show a site member a preview of an online order before [creating](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/orders/create-online-order) it. * * This method must be called using the site member identity ([SDK](https://dev.wix.com/docs/sdk/articles/get-started/about-identities#site-member) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member)). Therefore, [Wix apps](https://dev.wix.com/docs/build-apps) can't currently call this method using REST. */ export declare function getOnlineOrderPreview(payload: object): RequestOptionsFactory; /** * Performs a dry run of a purchase and provides an order preview. * * 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 order's `orderId` and `subscriptionId` are displayed as a string of multiple zero characters * (`000000-0000`). Tax is only calculated if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection). *
* 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`. * * To get a general price preview for a plan that's not buyer-specific, call Get Price Preview. */ export declare function getOfflineOrderPreview(payload: object): RequestOptionsFactory; /** * Retrieves a plan's pricing. * * The price preview uses the same logic as purchasing a plan, but the preview is not saved. Tax is only applied if * the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection). The price is returned * in the pricing model format used for orders. Learn more about pricing models ([REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models)|[SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/introduction#pricing-models)). * * Buyers do not have to be logged in to preview the price, and as such, the details returned are not buyer-specific. To * generate a preview of a purchase for a specific buyer, call Get Offline Order Preview. */ export declare function getPricePreview(payload: object): RequestOptionsFactory; /** Retrieves an order by ID. */ export declare function managementGetOrder(payload: object): RequestOptionsFactory; /** * Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering. * * By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order. * `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order. */ export declare function managementListOrders(payload: object): RequestOptionsFactory; /** * Extends the duration of a pricing plan order by postponing the order's `endDate`. Postponing the end date of an order does not impact payments. * * New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited. * Can't postpone an order with `status`: `PAUSED`. */ export declare function postponeEndDate(payload: object): RequestOptionsFactory; /** * Cancels an existing order. * * 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 can only be set for `IMMEDIATELY`. * * #### Canceling during the free trial period. * * 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 will not be billed. The buyer may continue using the benefits until the end * of the free trial period. * * When a Wix user cancels an ordered plan during the free trial period, they choose whether 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. */ export declare function cancelOrder(payload: object): RequestOptionsFactory; /** * Marks an offline order as paid. * > __Note__: Marking separate payment cycles as paid is not yet supported. The entire order will be marked as paid. 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: * - The order's `lastPaymentStatus` changes to `"PAID"`. * - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`. * * An error occurs if you attempt to: * - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice. * - Mark an online order as paid. The Mark as Paid method is supported for offline orders only. */ export declare function markAsPaid(payload: object): RequestOptionsFactory; /** * Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array. * * Only orders with `status`: `ACTIVE` can be paused. * For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused. * Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`. * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed. * * To resume a paused order, call Resume Order. */ export declare function pauseOrder(payload: object): RequestOptionsFactory; /** * Resumes a paused order. For orders with recurring payments, it 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. * - For orders with recurring payments, the payment schedule is restarted. * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use). * * To pause an order, call Pause Order. */ export declare function resumeOrder(payload: object): RequestOptionsFactory;