import * as _wix_sdk_types from '@wix/sdk-types'; import { SearchSpec, Search, NonNullablePaths } from '@wix/sdk-types'; /** * An order represents a completed purchase from a buyer. Orders are created through the checkout flow or manually via the Create Order endpoint. * * The order contains details about purchased items, buyer and recipient information, pricing, tax, shipping, fulfillment status, and payment status. * * To get the total sum of all discounts applied to an order, use `priceSummary.discount.amount`. */ interface Order { /** * Order ID. * @format GUID * @readonly */ _id?: string | null; /** * Order number displayed in the site owner's dashboard (auto-generated). * @readonly */ number?: string; /** * Date and time the order was created. * @readonly * @immutable */ _createdDate?: Date | null; /** * Date and time the order was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** * Order line items. * @minSize 1 * @maxSize 300 * @readonly */ lineItems?: OrderLineItem[]; /** Buyer information. */ buyerInfo?: BuyerInfo; /** Order payment status. */ paymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals; /** * Order fulfillment status. * @readonly */ fulfillmentStatus?: FulfillmentStatusWithLiterals; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string | null; /** Weight measurement unit - defaults to site's weight unit. */ weightUnit?: WeightUnitWithLiterals; /** * Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. * @format CURRENCY */ currency?: string | null; /** Currency conversion details. For use with multi-currency sites. */ currencyConversionDetails?: CurrencyConversionDetails; /** * Whether tax is included in line item prices. * @immutable */ taxIncludedInPrices?: boolean; /** * Site language in which original values are shown. * @readonly * @immutable */ siteLanguage?: string | null; /** * Order price summary. * @readonly */ priceSummary?: PriceSummary; /** Billing address and contact details. */ billingInfo?: AddressWithContact; /** Shipping info and selected shipping option details. */ shippingInfo?: V1ShippingInformation; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. * @maxLength 1000 */ buyerNote?: string | null; /** Order status. */ status?: OrderStatusWithLiterals; /** Whether order is archived. */ archived?: boolean | null; /** * Tax summary. * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * @deprecated Tax summary. * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxSummary?: TaxSummary; /** Tax information. */ taxInfo?: OrderTaxInfo; /** * Applied discounts. * @maxSize 320 */ appliedDiscounts?: AppliedDiscount[]; /** * Order activities. * @readonly * @maxSize 1000 */ activities?: Activity[]; /** Order attribution source. */ attributionSource?: AttributionSourceWithLiterals; /** * ID of the order's initiator. * @readonly */ createdBy?: CreatedBy; /** Information about the sales channel that submitted this order. */ channelInfo?: ChannelInfo; /** Whether a human has seen the order. Set when an order is clicked on in the dashboard. */ seenByAHuman?: boolean | null; /** * Checkout ID. * @format GUID */ checkoutId?: string | null; /** Custom fields. */ customFields?: CustomField[]; /** * Balance summary. * @readonly */ balanceSummary?: BalanceSummary; /** * Additional fees applied to the order. * @maxSize 100 */ additionalFees?: AdditionalFee[]; /** * Custom field data for the order object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. * @format GUID */ purchaseFlowId?: string | null; /** * Final recipient's address and contact details. * * This field represents who will ultimately receive the order. It may differ from `shippingInfo.logistics.shippingDestination` when: * + The chosen shipping option is a pickup point or store pickup, where `shippingDestination` contains the pickup location. * + No shipping option is selected. */ recipientInfo?: AddressWithContact; /** * Order tags. * * [Tags](https://dev.wix.com/docs/rest/business-management/tags/introduction) are labels attached to entities, allowing for flexible categorization and data management. */ tags?: Tags; /** * Date and time the order was originally purchased in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * Used for migration from external systems. * @immutable */ purchasedDate?: Date | null; /** Order location. */ businessLocation?: Location; /** * Pay after free trial price summary. Price summary that should be paid for subscriptions after free trial period. * @readonly */ payAfterFreeTrial?: PriceSummary; /** * Deposit price summary. Part of `priceSummary` that must be paid at checkout. * @internal * @readonly */ deposit?: PriceSummary; /** * Order-level settings and allowed actions. * @internal * @readonly * @immutable */ settings?: OrderSettings; /** * Forms associated with the Order's line items. * @internal * @readonly * @maxSize 1000 */ forms?: FormInfo[]; /** Summary of platform fees for this order, including totals by charge type and a breakdown of individual fees. */ platformFeeSummary?: PlatformFeeSummary; } interface OrderLineItem { /** * Line item ID. * @immutable */ _id?: string; /** * Item name. * * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName; /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference; /** * Line item quantity. * @min 1 * @max 100000 */ quantity?: number; /** * Total discount for this line item's entire quantity. * @readonly */ totalDiscount?: Price; /** * Line item description lines. Used for display purposes for the cart, checkout and order. * @maxSize 20 */ descriptionLines?: DescriptionLine[]; /** Line item image. */ image?: string; /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: PhysicalProperties; /** Item type. Either a preset type or custom. */ itemType?: ItemType; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * * To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://www.wix.com/velo/reference/wix-ecom-backend/orderfulfillments/listfulfillmentsforsingleorder). * @format GUID */ fulfillerId?: string | null; /** * Number of items that were refunded. * @max 100000 */ refundQuantity?: number | null; /** * Number of items restocked. * * For a per-location breakdown, see `restockLocations`. * @max 100000 */ restockQuantity?: number | null; /** * Per-location restock breakdown. * * Populated when items are restocked to specific locations. * The sum of all `quantity` values equals `restockQuantity`. * Empty when no location-specific restock was performed. * @internal * @maxSize 5 * @readonly */ restockLocations?: RestockLocation[]; /** Line item price after line item discounts for display purposes. */ price?: Price; /** * Line item price before line item discounts for display purposes. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: Price; /** * Total price after discounts, and before tax. * @readonly */ totalPriceBeforeTax?: Price; /** * Total price after all discounts and tax. * @readonly */ totalPriceAfterTax?: Price; /** * Type of selected payment option for current item. * * Default: `FULL_PAYMENT_ONLINE` */ paymentOption?: PaymentOptionTypeWithLiterals; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxDetails?: ItemTaxFullDetails; /** Represents all the relevant tax details for a specific line item. */ taxInfo?: LineItemTaxInfo; /** Digital file identifier, relevant only for items with type DIGITAL. */ digitalFile?: DigitalFile; /** Subscription info. */ subscriptionInfo?: SubscriptionInfo; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription; /** * Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`. * @readonly */ depositAmount?: Price; /** * Line item locations. * * The location's total quantity must not exceed the line item quantity. * @maxSize 5 */ locations?: LocationAndQuantity[]; /** Total price **after** catalog discounts and line item discounts. */ lineItemPrice?: Price; /** Address used for tax calculation. */ taxableAddress?: TaxableAddress; /** * ID of the app managing the inventory. * @internal * @format GUID */ inventoryAppId?: string | null; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` */ priceUndetermined?: boolean; /** * Custom extended fields for the line item object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** * Modifier groups that were added to the item. * @readonly * @maxSize 10 */ modifierGroups?: ModifierGroup[]; /** * Line item ID in external systems. * @internal * @minLength 1 * @maxLength 100 * @immutable */ externalLineItemId?: string | null; } interface ProductName { /** * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * * Min: 1 character. * Max: 200 characters. * @minLength 1 * @maxLength 200 */ original?: string; /** * Item name translated into the buyer's language. * * Min: 1 character. * Max: 400 characters. * Default: Same as `original`. * @minLength 1 * @maxLength 400 */ translated?: string | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference { /** * ID of the item within the catalog it belongs to. * @minLength 1 * @maxLength 36 */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` * @minLength 1 */ appId?: string; /** * Additional item details in key:value pairs. * * Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from your Wix Stores catalog, learn more about [eCommerce integration](https://www.wix.com/velo/reference/wix-stores-backend/ecommerce-integration). */ options?: Record | null; } interface Price { /** * Amount. * @decimalValue options { gte:0, lte:1000000000000000 } */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf { /** Description line plain text value. */ plainText?: PlainTextValue; /** Description line color value. */ colorInfo?: Color; /** Description line name. */ name?: DescriptionLineName; /** * Whether the description line originates from a modifier. * @internal * @deprecated Whether the description line originates from a modifier. * @replacedBy none * @targetRemovalDate 2025-12-31 */ modifierDescriptionLine?: boolean; } /** @oneof */ interface DescriptionLineValueOneOf { /** Description line plain text value. */ plainText?: PlainTextValue; /** Description line color value. */ colorInfo?: Color; } /** @oneof */ interface DescriptionLineDescriptionLineValueOneOf { } interface DescriptionLineName { /** * Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * @maxLength 100 */ original?: string; /** * Description line name translated into the buyer's language. * * Default: Same as `original`. * @maxLength 200 */ translated?: string | null; } interface PlainTextValue { /** * Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * @maxLength 600 */ original?: string; /** * Description line plain text value translated into the buyer's language. * * Default: Same as `original`. * @maxLength 600 */ translated?: string | null; } interface Color { /** * Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * @maxLength 500 */ original?: string; /** * Description line color name translated into the buyer's language. * * Default: Same as `original`. * @maxLength 500 */ translated?: string | null; /** HEX or RGB color code for display. */ code?: string | null; } declare enum DescriptionLineType { /** Unrecognized type. */ UNRECOGNISED = "UNRECOGNISED", /** Plain text type. */ PLAIN_TEXT = "PLAIN_TEXT", /** Color type. */ COLOR = "COLOR" } /** @enumType */ type DescriptionLineTypeWithLiterals = DescriptionLineType | 'UNRECOGNISED' | 'PLAIN_TEXT' | 'COLOR'; interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface PhysicalProperties { /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */ weight?: number | null; /** * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). * @maxLength 40 */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; /** * Product dimensions (length, width, height of the physical product). * @internal */ productDimensions?: Dimensions; /** * Package dimensions (length, width, height of the shipping package). * @internal */ packageDimensions?: Dimensions; } interface Dimensions { /** * Length. Measurement unit is handled at the system level (metric/imperial). * @decimalValue options { gte:0, lte:999999999, maxScale:6 } */ length?: string | null; /** * Width. Measurement unit is handled at the system level (metric/imperial). * @decimalValue options { gte:0, lte:999999999, maxScale:6 } */ width?: string | null; /** * Height. Measurement unit is handled at the system level (metric/imperial). * @decimalValue options { gte:0, lte:999999999, maxScale:6 } */ height?: string | null; /** Unit of measurement for dimensions (length, width, height). */ unit?: DimensionsUnitWithLiterals; } declare enum DimensionsUnit { UNKNOWN_DIMENSIONS_UNIT = "UNKNOWN_DIMENSIONS_UNIT", /** Millimeters. */ MM = "MM", /** Centimeters. */ CM = "CM", /** Meters. */ M = "M", /** Inches. */ IN = "IN", /** Feet. */ FT = "FT", /** Yards. */ YD = "YD" } /** @enumType */ type DimensionsUnitWithLiterals = DimensionsUnit | 'UNKNOWN_DIMENSIONS_UNIT' | 'MM' | 'CM' | 'M' | 'IN' | 'FT' | 'YD'; interface ItemType extends ItemTypeItemTypeDataOneOf { /** Preset item type. */ preset?: ItemTypePresetWithLiterals; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } /** @oneof */ interface ItemTypeItemTypeDataOneOf { /** Preset item type. */ preset?: ItemTypePresetWithLiterals; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } declare enum ItemTypePreset { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } /** @enumType */ type ItemTypePresetWithLiterals = ItemTypePreset | 'UNRECOGNISED' | 'PHYSICAL' | 'DIGITAL' | 'GIFT_CARD' | 'SERVICE'; /** Quantity of items restocked at a specific location. */ interface RestockLocation { /** * ID of the location where items were restocked. * @format GUID */ locationId?: string; /** * Number of items restocked at this location. * @min 1 * @max 100000 */ quantity?: number; } /** Type of selected payment option for catalog item */ declare enum PaymentOptionType { /** The entire payment for this item happens as part of the checkout. */ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE", /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. */ MEMBERSHIP = "MEMBERSHIP", /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */ DEPOSIT_ONLINE = "DEPOSIT_ONLINE", /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE", /** * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline. * @documentationMaturity preview */ MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER" } /** @enumType */ type PaymentOptionTypeWithLiterals = PaymentOptionType | 'FULL_PAYMENT_ONLINE' | 'FULL_PAYMENT_OFFLINE' | 'MEMBERSHIP' | 'DEPOSIT_ONLINE' | 'MEMBERSHIP_OFFLINE' | 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER'; interface ItemTaxFullDetails { /** Taxable amount of this line item. */ taxableAmount?: Price; /** * Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`. * @decimalValue options { gte:0, maxScale:6 } */ taxRate?: string; /** The calculated tax, based on the `taxableAmount` and `taxRate`. */ totalTax?: Price; /** * Amount that was exempt from tax calculations. * @internal */ exemptAmount?: Price; } interface LineItemTaxInfo { /** Calculated tax, based on `taxable_amount` and `tax_rate`. */ taxAmount?: Price; /** Amount for which tax is calculated. */ taxableAmount?: Price; /** * Tax rate %, as a decimal point. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:6 } */ taxRate?: string | null; /** * Tax group ID. * @format GUID */ taxGroupId?: string | null; /** Indicates whether the price already includes tax. */ taxIncludedInPrice?: boolean; /** * Tax information for a line item. * @maxSize 7 */ taxBreakdown?: LineItemTaxBreakdown[]; /** * Amount of the line item price that was exempt from tax. * @internal */ exemptAmount?: Price; } /** * TaxBreakdown represents tax information for a line item. * It holds the tax amount and the tax rate for each tax authority that apply on the line item. */ interface LineItemTaxBreakdown { /** * Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec". * @maxLength 200 */ jurisdiction?: string | null; /** * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:6 } */ rate?: string | null; /** Amount of tax calculated for this line item. */ taxAmount?: Price; /** * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. * @maxLength 200 */ taxType?: string | null; /** * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. * This name should be explicit enough to allow the merchant to understand what tax was calculated. * @maxLength 200 */ taxName?: string | null; /** Type of jurisdiction that taxes were calculated for. */ jurisdictionType?: JurisdictionTypeWithLiterals; /** Non-taxable amount of the line item price. */ nonTaxableAmount?: Price; /** Taxable amount of the line item price. */ taxableAmount?: Price; /** * Amount of the line item price that was exempt from this authority. * @internal */ exemptAmount?: Price; } /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ declare enum JurisdictionType { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } /** @enumType */ type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL'; interface DigitalFile { /** * ID of the secure file in media. * @minLength 1 * @maxLength 100 */ fileId?: string; /** * Link will exist after the digital links have been generated on the order. * @format WEB_URL * @minLength 1 * @maxLength 2000 */ link?: string | null; /** * Link expiration time and date. * @readonly */ expirationDate?: Date | null; } interface SubscriptionInfo { /** * Subscription ID. * @format GUID */ _id?: string | null; /** Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. */ cycleNumber?: number; /** * Subscription option title. For example, `"Monthly coffee Subscription"`. * @maxLength 150 * @deprecated Subscription option title. For example, `"Monthly coffee Subscription"`. * @replacedBy title * @targetRemovalDate 2025-10-01 */ subscriptionOptionTitle?: string; /** * Subscription title. For example, `"Monthly coffee Subscription"`. * @internal */ title?: SubscriptionTitle; /** * Subscription option description. For example, `"1kg of selected coffee, once a month"`. * @maxLength 500 * @deprecated Subscription option description. For example, `"1kg of selected coffee, once a month"`. * @replacedBy description * @targetRemovalDate 2025-10-01 */ subscriptionOptionDescription?: string | null; /** * Subscription description. For example, `"1kg of selected coffee, once a month"`. * @internal */ description?: SubscriptionDescription; /** * Subscription detailed information. * @immutable */ subscriptionSettings?: SubscriptionSettings; /** * Description of the charges that will be applied for subscription. * @maxLength 1000 */ chargesDescription?: string | null; /** * Details of the billing adjustment applied to the current subscription cycle due to a shift in the subscription’s billing date. * @internal */ billingAdjustment?: BillingAdjustment; } interface SubscriptionTitle { /** * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * @minLength 1 * @maxLength 150 */ original?: string; /** * Subscription option name translated into the buyer's language. * * Default: Same as `original`. * @minLength 1 * @maxLength 150 */ translated?: string | null; } interface SubscriptionDescription { /** * Subscription option description. * @maxLength 500 */ original?: string; /** * Translated subscription option description. * @maxLength 500 */ translated?: string | null; } interface SubscriptionSettings { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequencyWithLiterals; /** * Number of frequency units in a billing cycle. For example, frequency `MONTH` with interval `3` means billing every 3 months. * @min 1 * @max 3650 */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. * @min 1 */ billingCycles?: number | null; /** Whether to allow the customer to cancel the subscription. */ enableCustomerCancellation?: boolean; /** Period until first cycle starts. If None => no free trial */ freeTrialPeriod?: FreeTrialPeriod; /** * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays. * @internal */ startDate?: Date | null; /** * Billing configuration for recurring charges. * @internal */ billingSettings?: BillingSettings; } /** Frequency unit of recurring payment */ declare enum SubscriptionFrequency { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } /** @enumType */ type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR'; interface FreeTrialPeriod { /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */ frequency?: SubscriptionFrequencyWithLiterals; /** * Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial. * @min 1 * @max 3650 */ interval?: number; } interface BillingSettings { /** * Day of month (1-28) to anchor recurring billing to. When set, billing recurs on this day each cycle. Does not apply to weekly subscriptions. * @min 1 * @max 28 */ anchorDay?: number | null; } interface BillingAdjustment { /** The type of adjustment. */ type?: AdjustmentTypeWithLiterals; /** Summary of the prorated adjustment amount. */ priceSummary?: BillingAdjustmentPriceSummary; } declare enum AdjustmentType { /** Adjustment increases the total amount due to changes like covering extra billing days. Typically results in an additional fee. */ EXTRA_CHARGE = "EXTRA_CHARGE", /** Adjustment reduces the total amount due to changes like covering fewer billing days. Typically results in a credit or discount. */ CREDIT = "CREDIT" } /** @enumType */ type AdjustmentTypeWithLiterals = AdjustmentType | 'EXTRA_CHARGE' | 'CREDIT'; interface BillingAdjustmentPriceSummary { /** Subtotal of adjustment, before tax. */ subtotal?: Price; /** Tax on adjustment. */ tax?: Price; /** Total price after tax. */ total?: Price; } interface PriceDescription { /** * __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * @minLength 1 * @maxLength 100 */ original?: string; /** * Price description translated into the buyer's language. * * Default: Same as `original`. * @minLength 1 * @maxLength 100 */ translated?: string | null; } interface LocationAndQuantity { /** * Location id in the associated owner app. * @format GUID */ _id?: string; /** * Location owner app, if not provided then the site business info locations will be used. * @format GUID * @deprecated Location owner app, if not provided then the site business info locations will be used. * @targetRemovalDate 2025-03-01 */ appId?: string | null; /** * Quantity for specific location. * @min 1 * @max 100000 */ quantity?: number; /** * Location name. * @maxLength 500 * @readonly */ name?: string | null; } interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressTypeWithLiterals; } /** @oneof */ interface TaxableAddressTaxableAddressDataOneOf { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressTypeWithLiterals; } declare enum TaxableAddressType { BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } /** @enumType */ type TaxableAddressTypeWithLiterals = TaxableAddressType | 'BUSINESS' | 'BILLING' | 'SHIPPING'; interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface ModifierGroup { /** * Modifier group ID. * @minLength 1 * @maxLength 36 */ _id?: string; /** Modifier group name. */ name?: TranslatableString; /** * List of modifiers in this group. * @minSize 1 * @maxSize 10 */ modifiers?: ItemModifier[]; } interface TranslatableString { /** * __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * * Min: 1 character. * Max: 200 characters. * @minLength 1 * @maxLength 200 */ original?: string; /** * String translated into the buyer's language. * * Min: 1 character. * Max: 400 characters. * Default: Same as `original`. * @minLength 1 * @maxLength 400 */ translated?: string | null; } interface ItemModifier { /** * Modifier ID. * @minLength 1 * @maxLength 36 */ _id?: string; /** * The quantity of this modifier. * @min 1 * @max 100000 */ quantity?: number | null; /** Primary display label for the modifier. */ label?: TranslatableString; /** Additional details. */ details?: TranslatableString; /** The price of the modifier. */ price?: Price; } /** Buyer information. */ interface BuyerInfo extends BuyerInfoIdOneOf { /** * Visitor ID. Returned when the buyer isn't a logged-in site member. * @format GUID */ visitorId?: string; /** * Member ID. Returned when the buyer is a logged-in site member. * @format GUID */ memberId?: string; /** * Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://www.wix.com/velo/reference/wix-crm-backend/contacts/introduction). * @format GUID */ contactId?: string | null; /** * Buyer's email address. * @format EMAIL */ email?: string | null; } /** @oneof */ interface BuyerInfoIdOneOf { /** * Visitor ID. Returned when the buyer isn't a logged-in site member. * @format GUID */ visitorId?: string; /** * Member ID. Returned when the buyer is a logged-in site member. * @format GUID */ memberId?: string; } declare enum PaymentStatusEnumPaymentStatus { UNSPECIFIED = "UNSPECIFIED", /** * `NOT_PAID` can apply to an order made online, but not yet paid. In such cases `order.status` will be `INITIALIZED`. * This status also applies when an offline order needs to be manually marked as paid. In such cases `order.status` will be `APPROVED`. */ NOT_PAID = "NOT_PAID", /** All required payments associated with this order are paid. */ PAID = "PAID", /** Order partially refunded, but the refunded amount is less than the order's total price. See `order.balanceSummary` for more details. */ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", /** Order fully refunded. Refund amount equals total price. See `order.balanceSummary` for more details. */ FULLY_REFUNDED = "FULLY_REFUNDED", /** * All payments pending. * * This can happen with two-step payments, when a payment requires manual review, or when a payment is in progress and will be concluded shortly. * Learn more about [pending orders](https://support.wix.com/en/article/pending-orders). */ PENDING = "PENDING", /** At least one payment received and approved, but it covers less than the order's total price. See `order.balanceSummary` for more details. */ PARTIALLY_PAID = "PARTIALLY_PAID", /** * Payment received, but not yet confirmed by the payment provider. * * In most cases, when a payment provider is holding payment it's because setup hasn't been successfully completed by the merchant/site owner. * To solve this, the merchant/site owner should log in to the payment provider's dashboard and make sure their account is set up correctly, or contact their support for further assistance. * @documentationMaturity preview */ PENDING_MERCHANT = "PENDING_MERCHANT", /** * One or more payments canceled. * @documentationMaturity preview */ CANCELED = "CANCELED", /** * One or more payments declined. * @documentationMaturity preview */ DECLINED = "DECLINED" } /** @enumType */ type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNSPECIFIED' | 'NOT_PAID' | 'PAID' | 'PARTIALLY_REFUNDED' | 'FULLY_REFUNDED' | 'PENDING' | 'PARTIALLY_PAID' | 'PENDING_MERCHANT' | 'CANCELED' | 'DECLINED'; declare enum FulfillmentStatus { /** None of the order items are fulfilled or the order was manually marked as unfulfilled. */ NOT_FULFILLED = "NOT_FULFILLED", /** * All of the order items are fulfilled or the order was manually marked as fulfilled. * Orders without shipping info are fulfilled automatically. */ FULFILLED = "FULFILLED", /** Some, but not all, of the order items are fulfilled. */ PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED" } /** @enumType */ type FulfillmentStatusWithLiterals = FulfillmentStatus | 'NOT_FULFILLED' | 'FULFILLED' | 'PARTIALLY_FULFILLED'; declare enum WeightUnit { /** Weight unit can't be classified due to an error. */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms. */ KG = "KG", /** Pounds. */ LB = "LB" } /** @enumType */ type WeightUnitWithLiterals = WeightUnit | 'UNSPECIFIED_WEIGHT_UNIT' | 'KG' | 'LB'; interface CurrencyConversionDetails { /** * Currency used for the pricing of this order, in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. * * This currency is used to calculate the pricing before conversion to the buyer's payment currency. * @readonly * @immutable * @format CURRENCY */ originalCurrency?: string | null; /** * The rate used for converting the original currency to the currency used for payment. * @readonly * @immutable * @decimalValue options { gt:0, lte:1000000000000000 } */ conversionRate?: string | null; } interface PriceSummary { /** Subtotal of all line items, before discounts and before tax. */ subtotal?: Price; /** Total shipping price, before discounts and before tax. */ shipping?: Price; /** Total tax applied to the order. */ tax?: Price; /** Total discount amount applied to the order. */ discount?: Price; /** Order's total price after discounts and tax. */ total?: Price; /** Total additional fees before tax. */ totalAdditionalFees?: Price; } /** Billing Info and shipping details */ interface AddressWithContact { /** Address. */ address?: Address; /** Contact details. */ contactDetails?: FullAddressContactDetails; } /** Physical address */ interface Address { /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. * @format COUNTRY */ country?: string | null; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. * @maxLength 50 */ subdivision?: string | null; /** * City name. * @maxLength 50 */ city?: string | null; /** * Postal or zip code. * @maxLength 50 */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress; /** * Main address line (usually street name and number). * @maxLength 150 */ addressLine1?: string | null; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. * @maxLength 100 */ addressLine2?: string | null; /** Geocode object containing latitude and longitude coordinates. */ location?: AddressLocation; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; } interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** Full contact details for an address */ interface FullAddressContactDetails { /** * First name. * @maxLength 100 */ firstName?: string | null; /** * Last name. * @maxLength 100 */ lastName?: string | null; /** * Phone number. * @format PHONE */ phone?: string | null; /** * Company name. * @maxLength 1000 */ company?: string | null; /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */ vatId?: VatId; } interface VatId { /** Customer's tax ID. */ _id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: VatTypeWithLiterals; } /** tax info types */ declare enum VatType { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } /** @enumType */ type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ'; interface V1ShippingInformation { /** * App Def Id of external provider which was a source of shipping info * @minLength 1 * @maxLength 100 */ carrierId?: string | null; /** * Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`. * @minLength 1 * @maxLength 100 */ code?: string | null; /** * Shipping option title. * For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`. * @maxLength 250 */ title?: string; /** Shipping logistics. */ logistics?: DeliveryLogistics; /** Shipping costs. */ cost?: ShippingPrice; /** Shipping region. */ region?: ShippingRegion; } interface DeliveryLogistics extends DeliveryLogisticsAddressOneOf { /** Shipping destination address and contact details. For pickup orders, this contains the pickup location address, not the recipient's address. */ shippingDestination?: AddressWithContact; /** Pickup details for store pickup or pickup point orders. */ pickupDetails?: PickupDetails; /** * Expected delivery time in free text. For example, `"3-5 business days"`. * @maxLength 500 */ deliveryTime?: string | null; /** * Instructions for the carrier. For example, `"Please knock on the door. If unanswered, please call contact number."`. * @maxLength 1000 */ instructions?: string | null; /** * Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @deprecated */ deliverByDate?: Date | null; /** Expected delivery time slot with start and end times. */ deliveryTimeSlot?: DeliveryTimeSlot; } /** @oneof */ interface DeliveryLogisticsAddressOneOf { /** Shipping destination address and contact details. For pickup orders, this contains the pickup location address, not the recipient's address. */ shippingDestination?: AddressWithContact; /** Pickup details for store pickup or pickup point orders. */ pickupDetails?: PickupDetails; } interface PickupDetails { /** Pickup address. */ address?: PickupAddress; /** Pickup method */ pickupMethod?: PickupMethodWithLiterals; } /** Physical address */ interface PickupAddress { /** * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. * @format COUNTRY */ country?: string | null; /** * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. * @maxLength 50 */ subdivision?: string | null; /** * City name. * @maxLength 1000 */ city?: string | null; /** * Postal or zip code. * @maxLength 1000 */ postalCode?: string | null; /** Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: StreetAddress; /** * Main address line (usually street name and number). * @maxLength 1000 */ addressLine1?: string | null; /** * Free text providing more detailed address info. Usually contains apt, suite, floor. * @maxLength 1000 */ addressLine2?: string | null; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } declare enum PickupMethod { STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } /** @enumType */ type PickupMethodWithLiterals = PickupMethod | 'STORE_PICKUP' | 'PICKUP_POINT'; interface DeliveryTimeSlot { /** Delivery slot starting time. */ from?: Date | null; /** Delivery slot ending time. */ to?: Date | null; } interface ShippingPrice { /** Shipping price for display purposes. */ price?: Price; /** * Total price of shipping after discounts (when relevant), and before tax. * @readonly */ totalPriceBeforeTax?: Price; /** * Shipping price after all discounts (if any exist), and after tax. * @readonly */ totalPriceAfterTax?: Price; /** * Tax details. * @deprecated Tax details. * @replacedBy tax_info * @targetRemovalDate 2026-03-30 */ taxDetails?: ItemTaxFullDetails; /** Represents all the relevant tax details for a shipping. */ taxInfo?: LineItemTaxInfo; /** * Shipping discount before tax. * @readonly */ discount?: Price; } interface ShippingRegion { /** * Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. * @maxLength 100 */ name?: string | null; } declare enum OrderStatus { /** Order created, but not yet approved or canceled. */ INITIALIZED = "INITIALIZED", /** * Order approved. * * This happens when either an online payment is received **or** when `priceSummary.total` is `0` (a zero-total order). * Offline orders (cash payment) are automatically approved. */ APPROVED = "APPROVED", /** Order canceled by the merchant or buyer. */ CANCELED = "CANCELED", /** * Order is waiting for the buyer to complete checkout. * @documentationMaturity preview */ PENDING = "PENDING", /** * Order rejected. * * This happens when pending payments fail. * @documentationMaturity preview */ REJECTED = "REJECTED" } /** @enumType */ type OrderStatusWithLiterals = OrderStatus | 'INITIALIZED' | 'APPROVED' | 'CANCELED' | 'PENDING' | 'REJECTED'; interface TaxSummary { /** * Total tax. * @readonly */ totalTax?: Price; } interface OrderTaxInfo { /** Calculated tax, added from line items. */ totalTax?: Price; /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * @maxSize 50 */ taxBreakdown?: OrderTaxBreakdown[]; /** * Whether the order is exempt from tax calculations. * * Default: `false` * @readonly */ taxExempt?: boolean | null; /** * The total amount that was exempt from tax calculations. * @internal * @readonly */ totalExempt?: Price; } /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * Tax breakdown is the tax amount split to the tax authorities that applied on the line item. */ interface OrderTaxBreakdown { /** * The name of the tax against which this tax amount was calculated. * @maxLength 200 */ taxName?: string; /** * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. * @maxLength 200 */ taxType?: string; /** * The name of the jurisdiction in which this tax detail applies. * @maxLength 200 */ jurisdiction?: string; /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ jurisdictionType?: JurisdictionTypeWithLiterals; /** * The rate at which this tax detail was calculated. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:6 } */ rate?: string; /** The sum of all the tax from line items that calculated by the tax identifiers. */ aggregatedTaxAmount?: Price; /** * The aggregated exempt amount from all line items for tax identifiers. * @internal */ aggregatedExemptAmount?: Price; } interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf { /** Coupon applied by the customer. */ coupon?: Coupon; /** Discount applied manually by the merchant. */ merchantDiscount?: MerchantDiscount; /** Automatic discount applied by the system based on configured discount rules. */ discountRule?: DiscountRule; discountType?: DiscountTypeWithLiterals; /** * __Deprecated.__ Use `lineItemDiscounts` instead. * * IDs of line items the discount applies to. * @format GUID * @maxSize 300 * @deprecated __Deprecated.__ Use `lineItemDiscounts` instead. * * IDs of line items the discount applies to. * @replacedBy line_item_discounts * @targetRemovalDate 2024-10-30 */ lineItemIds?: string[]; /** * Discount ID. * @format GUID * @immutable */ _id?: string | null; /** * Line items the discount applies to, including the discount amount for each. * @maxSize 300 */ lineItemDiscounts?: LineItemDiscount[]; /** * Number of subscription billing cycles the discount applies to. * If None and discount is linked to subscription line item, it applies to all cycles. * @internal * @min 1 * @max 999 */ subscriptionCycles?: number | null; /** * A list of item combinations for this applied discount. * Each entry represents a unique combination of line items that triggered * or received this discount, along with how many times that combination was applied together. * Relevant ONLY for BXGY and Quantity-based promotions. * In BXGY the combination will contain the "X" items with discount amount of 0. * @internal * @maxSize 1000 */ itemCombinations?: ItemCombination[]; } /** @oneof */ interface AppliedDiscountDiscountSourceOneOf { /** Coupon applied by the customer. */ coupon?: Coupon; /** Discount applied manually by the merchant. */ merchantDiscount?: MerchantDiscount; /** Automatic discount applied by the system based on configured discount rules. */ discountRule?: DiscountRule; } /** Type of discount. */ declare enum DiscountType { /** Discount applies to the entire order. */ GLOBAL = "GLOBAL", /** Discount applies to specific items. */ SPECIFIC_ITEMS = "SPECIFIC_ITEMS", /** Discount applies to shipping. For example, free shipping. */ SHIPPING = "SHIPPING" } /** @enumType */ type DiscountTypeWithLiterals = DiscountType | 'GLOBAL' | 'SPECIFIC_ITEMS' | 'SHIPPING'; /** Coupon */ interface Coupon { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon name. */ name?: string; /** Coupon value. */ amount?: Price; } /** Discount applied manually by the merchant through the dashboard. */ interface MerchantDiscount extends MerchantDiscountMerchantDiscountReasonOneOf { /** Predefined discount reason. */ discountReason?: DiscountReasonWithLiterals; /** * Custom discount description as free text. * @maxLength 200 */ description?: string | null; /** Discount amount. */ amount?: Price; /** * Discount as a percentage of the original price. For example, `10.5` for a 10.5% discount. * @internal * @format DECIMAL_VALUE * @decimalValue options { gte:0, lte:100, maxScale:2 } */ percentage?: string | null; } /** @oneof */ interface MerchantDiscountMerchantDiscountReasonOneOf { /** Predefined discount reason. */ discountReason?: DiscountReasonWithLiterals; /** * Custom discount description as free text. * @maxLength 200 */ description?: string | null; } /** Predefined reason for the discount. */ declare enum DiscountReason { /** Unknown discount reason. */ UNSPECIFIED = "UNSPECIFIED", /** Balance adjustment resulting from an item exchange. */ EXCHANGED_ITEMS = "EXCHANGED_ITEMS", /** Proportional discount for a shortened subscription billing cycle. Applied when a subscription's billing date is moved earlier, reducing the cycle length. */ BILLING_ADJUSTMENT = "BILLING_ADJUSTMENT" } /** @enumType */ type DiscountReasonWithLiterals = DiscountReason | 'UNSPECIFIED' | 'EXCHANGED_ITEMS' | 'BILLING_ADJUSTMENT'; interface DiscountRule { /** * Discount rule ID * @format GUID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName; /** Discount value. */ amount?: Price; } interface DiscountRuleName { /** * Original discount rule name (in site's default language). * @minLength 1 * @maxLength 256 */ original?: string; /** * Translated discount rule name according to buyer language. Defaults to `original` when not provided. * @minLength 1 * @maxLength 500 */ translated?: string | null; } interface LineItemDiscount { /** * Line item ID. * @format GUID */ _id?: string; /** Total discount amount for this line item. */ totalDiscount?: Price; } interface ItemCombination { /** * The number of times this exact combination of items (with the specified quantities) was applied together in the order. * @min 1 * @max 100000 */ count?: number; /** * Line items that participated together in this combination. * @minSize 1 * @maxSize 100 */ lineItems?: ItemCombinationLineItem[]; } interface ItemCombinationLineItem { /** * The unique ID of the line item to which this discount applies. * @format GUID */ lineItemId?: string; /** Total discount amount for all units (quantity) of this line item in this combination. */ discountAmount?: Price; /** * Number of units from this line item that participated in a single combination. * @min 1 * @max 100000 */ quantity?: number; } interface Activity extends ActivityContentOneOf { /** * Custom activity details. Not currently supported. * @internal */ customActivity?: CustomActivity; /** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */ merchantComment?: MerchantComment; /** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */ orderRefunded?: OrderRefunded; /** Details of changes made by the Draft Orders API. */ draftOrderChangesApplied?: DraftOrderChangesApplied; /** Details of the payment method saved for the order. */ savedPaymentMethod?: SavedPaymentMethod; /** Details of an authorized payment created. */ authorizedPaymentCreated?: AuthorizedPaymentCreated; /** Details of an authorized payment captured. */ authorizedPaymentCaptured?: AuthorizedPaymentCaptured; /** Details of an authorized payment voided. */ authorizedPaymentVoided?: AuthorizedPaymentVoided; /** * Details of an initiated refund process. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ refundInitiated?: RefundInitiated; /** * Details of a refunded payment. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ paymentRefunded?: PaymentRefunded; /** * Details of a failed payment refund. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ paymentRefundFailed?: PaymentRefundFailed; /** Details of refund to store credit. */ refundedAsStoreCredit?: RefundedAsStoreCredit; /** Details of a pending payment. */ paymentPending?: PaymentPending; /** Details of a canceled payment. */ paymentCanceled?: PaymentCanceled; /** Details of a declined payment. */ paymentDeclined?: PaymentDeclined; /** Receipt was added for associated payment. */ receiptCreated?: ReceiptCreated; /** Receipt sent to customer. */ receiptSent?: ReceiptSent; /** Order received a chargeback for one of its payments. */ chargebackCreated?: ChargebackCreated; /** Chargeback reversed for one of the order's payments. */ chargebackReversed?: ChargebackReversed; /** * Activity ID. * @format GUID * @readonly */ _id?: string | null; /** * Activity author's email. * @format EMAIL * @readonly */ authorEmail?: string | null; /** * Activity creation date and time. * @readonly */ _createdDate?: Date | null; /** * Activity type. * @deprecated Activity type. * @replacedBy activity_type * @targetRemovalDate 2026-03-01 */ type?: ActivityTypeWithLiterals; /** Activity type. */ activityType?: OrderActivityTypeEnumActivityTypeWithLiterals; } /** @oneof */ interface ActivityContentOneOf { /** * Custom activity details. Not currently supported. * @internal */ customActivity?: CustomActivity; /** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */ merchantComment?: MerchantComment; /** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */ orderRefunded?: OrderRefunded; /** Details of changes made by the Draft Orders API. */ draftOrderChangesApplied?: DraftOrderChangesApplied; /** Details of the payment method saved for the order. */ savedPaymentMethod?: SavedPaymentMethod; /** Details of an authorized payment created. */ authorizedPaymentCreated?: AuthorizedPaymentCreated; /** Details of an authorized payment captured. */ authorizedPaymentCaptured?: AuthorizedPaymentCaptured; /** Details of an authorized payment voided. */ authorizedPaymentVoided?: AuthorizedPaymentVoided; /** * Details of an initiated refund process. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ refundInitiated?: RefundInitiated; /** * Details of a refunded payment. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ paymentRefunded?: PaymentRefunded; /** * Details of a failed payment refund. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ paymentRefundFailed?: PaymentRefundFailed; /** Details of refund to store credit. */ refundedAsStoreCredit?: RefundedAsStoreCredit; /** Details of a pending payment. */ paymentPending?: PaymentPending; /** Details of a canceled payment. */ paymentCanceled?: PaymentCanceled; /** Details of a declined payment. */ paymentDeclined?: PaymentDeclined; /** Receipt was added for associated payment. */ receiptCreated?: ReceiptCreated; /** Receipt sent to customer. */ receiptSent?: ReceiptSent; /** Order received a chargeback for one of its payments. */ chargebackCreated?: ChargebackCreated; /** Chargeback reversed for one of the order's payments. */ chargebackReversed?: ChargebackReversed; } interface CustomActivity { /** * ID of the app that created the custom activity. * @format GUID */ appId?: string; /** * Custom activity type. For example, `"Ticket number set"`. * @maxLength 100 */ type?: string; /** Additional data in key-value form. For example, `{ "Ticket number": "123456" }`. */ additionalData?: Record; } /** Merchant added a comment. */ interface MerchantComment { /** * Merchant comment message. * @minLength 1 * @maxLength 5000 */ message?: string; } interface OrderRefunded { /** Whether order was refunded manually. For example, via payment provider or using cash. */ manual?: boolean; /** Refund amount. */ amount?: Price; /** * Reason for refund. * @maxLength 200 */ reason?: string; } interface OrderCreatedFromExchange { /** * ID of the original order for which the exchange happened. * @format GUID */ originalOrderId?: string; } interface NewExchangeOrderCreated { /** * ID of the new order created as a result of an exchange of items. * @format GUID */ exchangeOrderId?: string; /** * IDs of the items that were exchanged. * @minSize 1 * @maxSize 300 */ lineItems?: LineItemExchangeData[]; } interface LineItemExchangeData { /** * ID of the exchanged line item. * @format GUID */ lineItemId?: string; /** * Line item quantity being exchanged. * @min 1 * @max 100000 */ quantity?: number; } interface DraftOrderChangesApplied { /** Draft order id. */ draftOrderId?: string; /** * Reason for edit, given by user (optional). * @maxLength 200 */ reason?: string | null; /** Changes applied to order. */ changes?: OrderChange[]; } interface OrderChange extends OrderChangeValueOneOf { lineItemChanged?: LineItemChanges; lineItemAdded?: ManagedLineItem; lineItemRemoved?: ManagedLineItem; discountAdded?: ManagedDiscount; discountRemoved?: ManagedDiscount; additionalFeeAdded?: ManagedAdditionalFee; additionalFeeRemoved?: ManagedAdditionalFee; totalPriceChanged?: TotalPriceChange; shippingInformationChanged?: ShippingInformationChange; } /** @oneof */ interface OrderChangeValueOneOf { lineItemChanged?: LineItemChanges; lineItemAdded?: ManagedLineItem; lineItemRemoved?: ManagedLineItem; discountAdded?: ManagedDiscount; discountRemoved?: ManagedDiscount; additionalFeeAdded?: ManagedAdditionalFee; additionalFeeRemoved?: ManagedAdditionalFee; totalPriceChanged?: TotalPriceChange; shippingInformationChanged?: ShippingInformationChange; } interface LineItemChanges { /** * Line item ID. * @format GUID */ _id?: string; /** Item name after change. */ name?: ProductName; /** Item quantity change. */ quantity?: LineItemQuantityChange; /** Item price change. */ price?: LineItemPriceChange; /** * Item product name change. * @internal */ productName?: LineItemProductNameChange; /** * Item description lines change. * @internal */ descriptionLines?: LineItemDescriptionLineChange; /** * Item modifiers change. * @internal */ modifierGroups?: LineItemModifiersChange; } interface LineItemQuantityChange { /** * Item quantity before update. * @max 1000000 */ originalQuantity?: number; /** * Item quantity after update. * @max 1000000 */ newQuantity?: number; /** * Difference between original and new quantity. Absolute value. * @min 1 * @max 1000000 */ diff?: number; /** Type of quantity change: increase or decrease. */ deltaType?: LineItemQuantityChangeTypeWithLiterals; } declare enum LineItemQuantityChangeType { /** Quantity increased. */ QUANTITY_INCREASED = "QUANTITY_INCREASED", /** Quantity decreased. */ QUANTITY_DECREASED = "QUANTITY_DECREASED" } /** @enumType */ type LineItemQuantityChangeTypeWithLiterals = LineItemQuantityChangeType | 'QUANTITY_INCREASED' | 'QUANTITY_DECREASED'; interface LineItemPriceChange { /** Item price before update. */ originalPrice?: Price; /** Item price after update. */ newPrice?: Price; } interface LineItemProductNameChange { /** Item product name before update. */ originalProductName?: ProductName; /** Item product name after update. */ newProductName?: ProductName; } interface LineItemDescriptionLineChange { /** * Description lines that were added to the line item. * @maxSize 20 */ addedDescriptionLines?: DescriptionLine[]; /** * Description lines that were removed from the line item. * @maxSize 20 */ removedDescriptionLines?: DescriptionLine[]; } interface LineItemModifiersChange { /** * Modifier groups that were added to the line item. * @maxSize 10 */ addedModifierGroups?: ModifierGroup[]; /** * Modifier groups that were removed from the line item. * @maxSize 10 */ removedModifierGroups?: ModifierGroup[]; } interface ManagedLineItem { /** * Line item ID. * @format GUID */ _id?: string; /** Item name. */ name?: ProductName; /** * Added or removed item quantity. * @min 1 * @max 1000000 */ quantity?: number; } interface ManagedDiscount { /** * Discount id. * @format GUID */ _id?: string; /** Discount name: coupon name / discount rule name / merchant discount description. */ name?: TranslatedValue; /** Line items discount applies to. */ affectedLineItems?: LineItemAmount[]; /** Discount amount. */ totalAmount?: Price; } interface TranslatedValue { /** * Value in site default language. * @minLength 1 */ original?: string; /** * Translated value. * @minLength 1 */ translated?: string | null; } interface LineItemAmount { /** * Order line item id * @format GUID */ _id?: string; /** Item name. */ name?: ProductName; /** Amount associated with this item. (Discount amount for item / additional fee amount for item) */ amount?: Price; } interface ManagedAdditionalFee { /** * Additional fee id. * @format GUID */ _id?: string; /** Additional fee name. */ name?: TranslatedValue; /** Line items additional fee applies to. */ affectedLineItems?: LineItemAmount[]; /** Additional fee amount. */ totalAmount?: Price; } interface TotalPriceChange { /** Order’s total price after discounts and tax. Before update */ originalTotal?: Price; /** Order’s total price after discounts and tax. After update */ newTotal?: Price; } interface ShippingInformationChange { /** Order’s Shipping Information. Before update */ originalShippingInfo?: ShippingInformation; /** Order’s Shipping Information. After update */ newShippingInfo?: ShippingInformation; } interface ShippingInformation { /** Order’s shipping price. */ total?: Price; /** * Order’s shipping title. * @maxLength 250 */ shippingTitle?: string; } /** Payment method is saved for order */ interface SavedPaymentMethod { /** * Payment method name. * @minLength 1 * @maxLength 100 */ name?: string; /** * Payment method description. * @minLength 1 * @maxLength 100 */ description?: string | null; } interface AuthorizedPaymentCreated { /** * Payment ID of payment associated with this activity. * @format GUID */ paymentId?: string; /** Payment amount. */ amount?: Price; /** * The last 4 digits of the card number. * @maxLength 4 */ lastFourDigits?: string | null; /** * Card issuer's brand. * @maxLength 100 */ brand?: string | null; } interface AuthorizedPaymentCaptured { /** * Payment ID of payment associated with this activity. * @format GUID */ paymentId?: string; /** Payment amount. */ amount?: Price; /** * The last 4 digits of the card number. * @maxLength 4 */ lastFourDigits?: string | null; /** * Card issuer's brand. * @maxLength 100 */ brand?: string | null; } interface AuthorizedPaymentVoided { /** * Payment ID of payment associated with this activity. * @format GUID */ paymentId?: string; /** Payment amount. */ amount?: Price; /** * The last 4 digits of the card number. * @maxLength 4 */ lastFourDigits?: string | null; /** * Card issuer's brand. * @maxLength 100 */ brand?: string | null; } interface RefundInitiated { /** * Refund ID. * @format GUID */ refundId?: string; /** Refund amount. */ amount?: Price; /** * Details about the payments being refunded. * @minSize 1 * @maxSize 50 */ payments?: RefundedPayment[]; /** * Reason for refund. * @maxLength 200 */ reason?: string | null; } interface RefundedPayment extends RefundedPaymentKindOneOf { /** Regular payment refund. */ regular?: RegularPaymentRefund; /** Gift card payment refund. */ giftCard?: GiftCardPaymentRefund; /** Membership payment refund. */ membership?: MembershipPaymentRefund; /** * Payment ID. * @format GUID */ paymentId?: string; /** Whether refund was made externally and manually on the payment provider's side. */ externalRefund?: boolean; } /** @oneof */ interface RefundedPaymentKindOneOf { /** Regular payment refund. */ regular?: RegularPaymentRefund; /** Gift card payment refund. */ giftCard?: GiftCardPaymentRefund; /** Membership payment refund. */ membership?: MembershipPaymentRefund; } interface RegularPaymentRefund { /** Refund amount. */ amount?: Price; /** * The last 4 digits of the card number. * @maxLength 4 */ lastFourDigits?: string | null; /** * Card issuer's brand. * @maxLength 100 */ brand?: string | null; } interface GiftCardPaymentRefund { /** * Gift card payment ID. * @minLength 1 * @maxLength 100 */ giftCardPaymentId?: string | null; /** Refund amount. */ amount?: Price; } interface MembershipPaymentRefund { /** * Membership ID. * @minLength 1 * @maxLength 100 */ membershipId?: string | null; } interface PaymentRefunded { /** * Refund ID. * @format GUID */ refundId?: string; /** Details about the refunded payment. */ payment?: RefundedPayment; } interface PaymentRefundFailed { /** * Refund ID. * @format GUID */ refundId?: string; /** Details about the failed payment refund. */ payment?: RefundedPayment; } interface RefundedAsStoreCredit { /** Refund amount. */ amount?: Price; /** * Reason for refund. * @maxLength 100 */ reason?: string | null; } interface PaymentPending extends PaymentPendingPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; /** * Payment ID of payment associated with this activity. * @format GUID */ paymentId?: string; } /** @oneof */ interface PaymentPendingPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; } interface RegularPayment extends RegularPaymentPaymentMethodDetailsOneOf { /** Credit card details. */ creditCardDetails?: CreditCardDetails; /** Payment amount. */ amount?: Price; } /** @oneof */ interface RegularPaymentPaymentMethodDetailsOneOf { /** Credit card details. */ creditCardDetails?: CreditCardDetails; } interface CreditCardDetails { /** * The last 4 digits of the card number. * @maxLength 4 */ lastFourDigits?: string | null; /** * Card issuer's brand. * @maxLength 100 */ brand?: string | null; } interface PaymentCanceled extends PaymentCanceledPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; /** * Payment ID of payment associated with this activity. * @format GUID */ paymentId?: string; } /** @oneof */ interface PaymentCanceledPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; } interface PaymentDeclined extends PaymentDeclinedPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; /** * Payment ID of payment associated with this activity. * @format GUID */ paymentId?: string; } /** @oneof */ interface PaymentDeclinedPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; } interface ReceiptCreated extends ReceiptCreatedReceiptInfoOneOf { /** Receipt created by Wix. */ wixReceipt?: WixReceipt; /** Receipt created by an external system. */ externalReceipt?: ExternalReceipt; /** * Payment ID of payment associated with this activity. * @format GUID */ paymentId?: string; } /** @oneof */ interface ReceiptCreatedReceiptInfoOneOf { /** Receipt created by Wix. */ wixReceipt?: WixReceipt; /** Receipt created by an external system. */ externalReceipt?: ExternalReceipt; } interface WixReceipt { /** * Receipt ID. * @format GUID */ receiptId?: string; /** * Display number of receipt. * @minLength 1 * @maxLength 40 */ displayNumber?: string | null; } interface ExternalReceipt { /** * Receipt ID. * @maxLength 100 */ receiptId?: string | null; /** * Display number of receipt. * @minLength 1 * @maxLength 40 */ displayNumber?: string | null; } interface ReceiptSent extends ReceiptSentReceiptInfoOneOf { /** Receipt created by Wix. */ wixReceipt?: WixReceipt; /** Receipt created by an external system. */ externalReceipt?: ExternalReceipt; /** * Payment ID of payment associated with this activity. * @format GUID */ paymentId?: string; } /** @oneof */ interface ReceiptSentReceiptInfoOneOf { /** Receipt created by Wix. */ wixReceipt?: WixReceipt; /** Receipt created by an external system. */ externalReceipt?: ExternalReceipt; } interface ChargebackCreated { /** * ID of the payment that received a chargeback. * @format GUID */ paymentId?: string; /** * Chargeback ID. * @format GUID */ chargebackId?: string; /** Chargeback amount. */ amount?: Price; /** Payment details. */ paymentDetails?: RegularPayment; } interface ChargebackReversed { /** * ID of the payment involved with the chargeback. * @format GUID */ paymentId?: string; /** * Chargeback ID. * @format GUID */ chargebackId?: string; /** Chargeback amount. */ amount?: Price; /** Chargeback reversal amount. */ reversalAmount?: Price; /** Payment details. */ paymentDetails?: RegularPayment; } declare enum ActivityType { /** Order was refunded, either partially or fully. */ ORDER_REFUNDED = "ORDER_REFUNDED", /** New order was created and placed. */ ORDER_PLACED = "ORDER_PLACED", /** Order payment was completed and confirmed. */ ORDER_PAID = "ORDER_PAID", /** Order items were marked as fulfilled (shipped or ready for pickup). */ ORDER_FULFILLED = "ORDER_FULFILLED", /** Order fulfillment status was changed to not fulfilled. */ ORDER_NOT_FULFILLED = "ORDER_NOT_FULFILLED", /** Order was canceled by merchant or customer. */ ORDER_CANCELED = "ORDER_CANCELED", /** Download link was sent for digital items in the order. */ DOWNLOAD_LINK_SENT = "DOWNLOAD_LINK_SENT", /** Shipping tracking number was added to the order. */ TRACKING_NUMBER_ADDED = "TRACKING_NUMBER_ADDED", /** Existing shipping tracking number was modified. */ TRACKING_NUMBER_EDITED = "TRACKING_NUMBER_EDITED", /** Tracking link for shipment was added to the order. */ TRACKING_LINK_ADDED = "TRACKING_LINK_ADDED", /** Email confirming shipment was sent to the customer. */ SHIPPING_CONFIRMATION_EMAIL_SENT = "SHIPPING_CONFIRMATION_EMAIL_SENT", /** Invoice document was added to the order. */ INVOICE_ADDED = "INVOICE_ADDED", /** Invoice was removed from the order. */ INVOICE_REMOVED = "INVOICE_REMOVED", /** Invoice was sent to the customer via email. */ INVOICE_SENT = "INVOICE_SENT", /** Notification email was sent to the order fulfiller. */ FULFILLER_EMAIL_SENT = "FULFILLER_EMAIL_SENT", /** Order's shipping address was modified. */ SHIPPING_ADDRESS_EDITED = "SHIPPING_ADDRESS_EDITED", /** Order's contact email address was changed. */ EMAIL_EDITED = "EMAIL_EDITED", /** Email notification for pickup readiness was sent. */ PICKUP_READY_EMAIL_SENT = "PICKUP_READY_EMAIL_SENT", /** Custom activity created by a third-party application. */ CUSTOM_ACTIVITY = "CUSTOM_ACTIVITY", /** Comment added to the order by a merchant. */ MERCHANT_COMMENT = "MERCHANT_COMMENT", /** Partial payment was received for the order. */ ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID", /** Changes were applied to a draft order. */ DRAFT_ORDER_CHANGES_APPLIED = "DRAFT_ORDER_CHANGES_APPLIED", /** Payment method was saved for future use. */ SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD", /** * Payment was authorized but not yet captured. * @documentationMaturity preview */ AUTHORIZED_PAYMENT_CREATED = "AUTHORIZED_PAYMENT_CREATED", /** * Previously authorized payment was captured. * @documentationMaturity preview */ AUTHORIZED_PAYMENT_CAPTURED = "AUTHORIZED_PAYMENT_CAPTURED", /** * Previously authorized payment was voided. * @documentationMaturity preview */ AUTHORIZED_PAYMENT_VOIDED = "AUTHORIZED_PAYMENT_VOIDED", /** * Refund process was initiated. * @documentationMaturity preview */ REFUND_INITIATED = "REFUND_INITIATED", /** * Payment was successfully refunded. * @documentationMaturity preview */ PAYMENT_REFUNDED = "PAYMENT_REFUNDED", /** * Attempt to refund payment failed. * @documentationMaturity preview */ PAYMENT_REFUND_FAILED = "PAYMENT_REFUND_FAILED", /** * Refund was issued as store credit. * @documentationMaturity preview */ REFUNDED_AS_STORE_CREDIT = "REFUNDED_AS_STORE_CREDIT", /** * Payment is awaiting processing or confirmation. * @documentationMaturity preview */ PAYMENT_PENDING = "PAYMENT_PENDING", /** * Payment was canceled before completion. * @documentationMaturity preview */ PAYMENT_CANCELED = "PAYMENT_CANCELED", /** * Payment was declined by payment provider. * @documentationMaturity preview */ PAYMENT_DECLINED = "PAYMENT_DECLINED", /** * Order is awaiting approval or processing. * @documentationMaturity preview */ ORDER_PENDING = "ORDER_PENDING", /** * Order was rejected by merchant. * @documentationMaturity preview */ ORDER_REJECTED = "ORDER_REJECTED", /** * Receipt was generated for a payment. * @documentationMaturity preview */ RECEIPT_CREATED = "RECEIPT_CREATED", /** * Receipt was sent to the customer. * @documentationMaturity preview */ RECEIPT_SENT = "RECEIPT_SENT", /** * Chargeback was created for one of the order's payments. * @documentationMaturity preview */ CHARGEBACK_CREATED = "CHARGEBACK_CREATED", /** * Chargeback was resolved in merchant's favor. * @documentationMaturity preview */ CHARGEBACK_REVERSED = "CHARGEBACK_REVERSED" } /** @enumType */ type ActivityTypeWithLiterals = ActivityType | 'ORDER_REFUNDED' | 'ORDER_PLACED' | 'ORDER_PAID' | 'ORDER_FULFILLED' | 'ORDER_NOT_FULFILLED' | 'ORDER_CANCELED' | 'DOWNLOAD_LINK_SENT' | 'TRACKING_NUMBER_ADDED' | 'TRACKING_NUMBER_EDITED' | 'TRACKING_LINK_ADDED' | 'SHIPPING_CONFIRMATION_EMAIL_SENT' | 'INVOICE_ADDED' | 'INVOICE_REMOVED' | 'INVOICE_SENT' | 'FULFILLER_EMAIL_SENT' | 'SHIPPING_ADDRESS_EDITED' | 'EMAIL_EDITED' | 'PICKUP_READY_EMAIL_SENT' | 'CUSTOM_ACTIVITY' | 'MERCHANT_COMMENT' | 'ORDER_PARTIALLY_PAID' | 'DRAFT_ORDER_CHANGES_APPLIED' | 'SAVED_PAYMENT_METHOD' | 'AUTHORIZED_PAYMENT_CREATED' | 'AUTHORIZED_PAYMENT_CAPTURED' | 'AUTHORIZED_PAYMENT_VOIDED' | 'REFUND_INITIATED' | 'PAYMENT_REFUNDED' | 'PAYMENT_REFUND_FAILED' | 'REFUNDED_AS_STORE_CREDIT' | 'PAYMENT_PENDING' | 'PAYMENT_CANCELED' | 'PAYMENT_DECLINED' | 'ORDER_PENDING' | 'ORDER_REJECTED' | 'RECEIPT_CREATED' | 'RECEIPT_SENT' | 'CHARGEBACK_CREATED' | 'CHARGEBACK_REVERSED'; declare enum OrderActivityTypeEnumActivityType { /** New order was created and placed. */ ORDER_PLACED = "ORDER_PLACED", /** Order payment was completed and confirmed. */ ORDER_PAID = "ORDER_PAID", /** Order items were marked as fulfilled (shipped or ready for pickup). */ ORDER_FULFILLED = "ORDER_FULFILLED", /** Order fulfillment status was changed to not fulfilled. */ ORDER_NOT_FULFILLED = "ORDER_NOT_FULFILLED", /** Order was canceled by merchant or customer. */ ORDER_CANCELED = "ORDER_CANCELED", /** Download link was sent for digital items in the order. */ DOWNLOAD_LINK_SENT = "DOWNLOAD_LINK_SENT", /** Shipping tracking number was added to the order. */ TRACKING_NUMBER_ADDED = "TRACKING_NUMBER_ADDED", /** Existing shipping tracking number was modified. */ TRACKING_NUMBER_EDITED = "TRACKING_NUMBER_EDITED", /** Tracking link for shipment was added to the order. */ TRACKING_LINK_ADDED = "TRACKING_LINK_ADDED", /** Email confirming shipment was sent to the customer. */ SHIPPING_CONFIRMATION_EMAIL_SENT = "SHIPPING_CONFIRMATION_EMAIL_SENT", /** Invoice document was added to the order. */ INVOICE_ADDED = "INVOICE_ADDED", /** Invoice was removed from the order. */ INVOICE_REMOVED = "INVOICE_REMOVED", /** Invoice was sent to the customer via email. */ INVOICE_SENT = "INVOICE_SENT", /** Notification email was sent to the order fulfiller. */ FULFILLER_EMAIL_SENT = "FULFILLER_EMAIL_SENT", /** Order's shipping address was modified. */ SHIPPING_ADDRESS_EDITED = "SHIPPING_ADDRESS_EDITED", /** Order's contact email address was changed. */ EMAIL_EDITED = "EMAIL_EDITED", /** Email notification for pickup readiness was sent. */ PICKUP_READY_EMAIL_SENT = "PICKUP_READY_EMAIL_SENT", /** Comment added to the order by a merchant. */ MERCHANT_COMMENT = "MERCHANT_COMMENT", /** Partial payment was received for the order. */ ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID", /** Changes were applied to a draft order. */ DRAFT_ORDER_CHANGES_APPLIED = "DRAFT_ORDER_CHANGES_APPLIED", /** Payment method was saved for future use. */ SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD", /** * Payment was authorized but not yet captured. * @documentationMaturity preview */ AUTHORIZED_PAYMENT_CREATED = "AUTHORIZED_PAYMENT_CREATED", /** * Previously authorized payment was captured. * @documentationMaturity preview */ AUTHORIZED_PAYMENT_CAPTURED = "AUTHORIZED_PAYMENT_CAPTURED", /** * Previously authorized payment was voided. * @documentationMaturity preview */ AUTHORIZED_PAYMENT_VOIDED = "AUTHORIZED_PAYMENT_VOIDED", /** * Refund process was initiated. * @documentationMaturity preview */ REFUND_INITIATED = "REFUND_INITIATED", /** * Payment was successfully refunded. * @documentationMaturity preview */ PAYMENT_REFUNDED = "PAYMENT_REFUNDED", /** * Attempt to refund payment failed. * @documentationMaturity preview */ PAYMENT_REFUND_FAILED = "PAYMENT_REFUND_FAILED", /** * Refund was issued as store credit. * @documentationMaturity preview */ REFUNDED_AS_STORE_CREDIT = "REFUNDED_AS_STORE_CREDIT", /** * Payment is awaiting processing or confirmation. * @documentationMaturity preview */ PAYMENT_PENDING = "PAYMENT_PENDING", /** * Payment was canceled before completion. * @documentationMaturity preview */ PAYMENT_CANCELED = "PAYMENT_CANCELED", /** * Payment was declined by payment provider. * @documentationMaturity preview */ PAYMENT_DECLINED = "PAYMENT_DECLINED", /** * Order is awaiting approval or processing. * @documentationMaturity preview */ ORDER_PENDING = "ORDER_PENDING", /** * Order was rejected by merchant. * @documentationMaturity preview */ ORDER_REJECTED = "ORDER_REJECTED", /** * Receipt was generated for a payment. * @documentationMaturity preview */ RECEIPT_CREATED = "RECEIPT_CREATED", /** * Receipt was sent to the customer. * @documentationMaturity preview */ RECEIPT_SENT = "RECEIPT_SENT", /** * Chargeback was created for one of the order's payments. * @documentationMaturity preview */ CHARGEBACK_CREATED = "CHARGEBACK_CREATED", /** * Chargeback was resolved in merchant's favor. * @documentationMaturity preview */ CHARGEBACK_REVERSED = "CHARGEBACK_REVERSED", /** Order was refunded, either partially or fully. */ ORDER_REFUNDED = "ORDER_REFUNDED" } /** @enumType */ type OrderActivityTypeEnumActivityTypeWithLiterals = OrderActivityTypeEnumActivityType | 'ORDER_PLACED' | 'ORDER_PAID' | 'ORDER_FULFILLED' | 'ORDER_NOT_FULFILLED' | 'ORDER_CANCELED' | 'DOWNLOAD_LINK_SENT' | 'TRACKING_NUMBER_ADDED' | 'TRACKING_NUMBER_EDITED' | 'TRACKING_LINK_ADDED' | 'SHIPPING_CONFIRMATION_EMAIL_SENT' | 'INVOICE_ADDED' | 'INVOICE_REMOVED' | 'INVOICE_SENT' | 'FULFILLER_EMAIL_SENT' | 'SHIPPING_ADDRESS_EDITED' | 'EMAIL_EDITED' | 'PICKUP_READY_EMAIL_SENT' | 'MERCHANT_COMMENT' | 'ORDER_PARTIALLY_PAID' | 'DRAFT_ORDER_CHANGES_APPLIED' | 'SAVED_PAYMENT_METHOD' | 'AUTHORIZED_PAYMENT_CREATED' | 'AUTHORIZED_PAYMENT_CAPTURED' | 'AUTHORIZED_PAYMENT_VOIDED' | 'REFUND_INITIATED' | 'PAYMENT_REFUNDED' | 'PAYMENT_REFUND_FAILED' | 'REFUNDED_AS_STORE_CREDIT' | 'PAYMENT_PENDING' | 'PAYMENT_CANCELED' | 'PAYMENT_DECLINED' | 'ORDER_PENDING' | 'ORDER_REJECTED' | 'RECEIPT_CREATED' | 'RECEIPT_SENT' | 'CHARGEBACK_CREATED' | 'CHARGEBACK_REVERSED' | 'ORDER_REFUNDED'; declare enum AttributionSource { UNSPECIFIED = "UNSPECIFIED", FACEBOOK_ADS = "FACEBOOK_ADS" } /** @enumType */ type AttributionSourceWithLiterals = AttributionSource | 'UNSPECIFIED' | 'FACEBOOK_ADS'; interface CreatedBy extends CreatedByStringOneOf { /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). * @format GUID */ userId?: string; /** * Member ID - when the order was created by a **logged in** site visitor. * @format GUID */ memberId?: string; /** * Visitor ID - when the order was created by a site visitor that was **not** logged in. * @format GUID */ visitorId?: string; /** * App ID - when the order was created by an external application. * @format GUID */ appId?: string; } /** @oneof */ interface CreatedByStringOneOf { /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). * @format GUID */ userId?: string; /** * Member ID - when the order was created by a **logged in** site visitor. * @format GUID */ memberId?: string; /** * Visitor ID - when the order was created by a site visitor that was **not** logged in. * @format GUID */ visitorId?: string; /** * App ID - when the order was created by an external application. * @format GUID */ appId?: string; } interface ChannelInfo { /** * Sales channel that submitted the order. * * When creating an order via the API to record an external order, use the channel type that matches the original source. If no matching type exists, use `OTHER_PLATFORM`. */ type?: ChannelTypeWithLiterals; /** * Reference to an order ID from an external system. Relevant when recording orders from external platforms. * @maxLength 100 */ externalOrderId?: string | null; /** * URL to the order in the external system. Relevant when recording orders from external platforms. * @maxLength 300 */ externalOrderUrl?: string | null; } declare enum ChannelType { /** Unspecified sales channel. This value is not supported. */ UNSPECIFIED = "UNSPECIFIED", /** A web client. */ WEB = "WEB", /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */ POS = "POS", /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */ EBAY = "EBAY", /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */ AMAZON = "AMAZON", /** Other sales platform. */ OTHER_PLATFORM = "OTHER_PLATFORM", /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */ WIX_APP_STORE = "WIX_APP_STORE", /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */ WIX_INVOICES = "WIX_INVOICES", /** Wix merchant backoffice. */ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT", /** Wish sales channel. */ WISH = "WISH", /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */ CLASS_PASS = "CLASS_PASS", /** Global-E sales channel. */ GLOBAL_E = "GLOBAL_E", /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */ FACEBOOK = "FACEBOOK", /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */ ETSY = "ETSY", /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */ TIKTOK = "TIKTOK", /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */ FAIRE_COM = "FAIRE_COM", /** PayPal Agentic Checkout sales channel. */ PAYPAL_AGENTIC_CHECKOUT = "PAYPAL_AGENTIC_CHECKOUT", /** Stripe Agentic Checkout sales channel. */ STRIPE_AGENTIC_CHECKOUT = "STRIPE_AGENTIC_CHECKOUT" } /** @enumType */ type ChannelTypeWithLiterals = ChannelType | 'UNSPECIFIED' | 'WEB' | 'POS' | 'EBAY' | 'AMAZON' | 'OTHER_PLATFORM' | 'WIX_APP_STORE' | 'WIX_INVOICES' | 'BACKOFFICE_MERCHANT' | 'WISH' | 'CLASS_PASS' | 'GLOBAL_E' | 'FACEBOOK' | 'ETSY' | 'TIKTOK' | 'FAIRE_COM' | 'PAYPAL_AGENTIC_CHECKOUT' | 'STRIPE_AGENTIC_CHECKOUT'; interface CustomField { /** Custom field value. */ value?: any; /** * Custom field title. * @minLength 1 * @maxLength 500 */ title?: string; /** * Translated custom field title. * @minLength 1 * @maxLength 500 */ translatedTitle?: string | null; } interface BalanceSummary { /** * Current amount left to pay. * @readonly */ balance?: Balance; /** * Sum of all approved and successful payments. * * The value includes payments that have subsequently been fully or partially refunded. * @readonly */ paid?: Price; /** * Sum of all successfully refunded payments. * @readonly */ refunded?: Price; /** * Sum of all authorized payments. * @readonly */ authorized?: Price; /** * Sum of all pending refund transactions. * @readonly */ pendingRefund?: Price; /** * Sum of all pending transactions. * @readonly */ pending?: Price; /** * Sum of all transaction chargebacks. * @readonly */ chargeback?: Price; /** * Sum of all chargeback reversals. * @readonly */ chargebackReversal?: Price; /** * Total platform fees actually charged across all payments. * This reflects amounts collected, which may differ from the expected fees in `order.platformFeeSummary`. * @readonly */ platformFees?: Price; /** * Order total after deducting platform fees. Represents the net amount payable to the merchant. * @readonly */ totalMinusPlatformFees?: Price; /** * The total adjustment applied to the cash payment due to rounding. * * Positive values indicate the total was rounded up; negative values indicate it was rounded down. * @internal * @readonly */ cashRoundingAdjustment?: CashRounding; } /** * Order balance. Reflects amount left to be paid on order and is calculated dynamically. Can be negative per balance definition. * `amount` field depends on order payment status: * + UNSPECIFIED, NOT_PAID: price_summary.total_price * + PARTIALLY_PAID : price_summary.total_price - pay_now.total_price * + PENDING, REFUNDED, PARTIALLY_REFUNDED, PAID : 0 */ interface Balance { /** * Balance amount. * * A negative `amount` represents the amount to be refunded. This can happen due to overcharging or the order being modified after a payment has been made. * @decimalValue options { } * @readonly */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } interface CashRounding { /** * Amount, can be negative or positive. * @decimalValue options { gte:-1000000000000000, lte:1000000000000000 } */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } interface AdditionalFee { /** * Additional fee's unique code for future processing. * @minLength 1 * @maxLength 100 */ code?: string | null; /** * Name of additional fee. * @minLength 1 * @maxLength 50 */ name?: string; /** Additional fee's price. */ price?: Price; /** * Tax details. * @deprecated Tax details. * @replacedBy tax_info * @targetRemovalDate 2026-03-30 */ taxDetails?: ItemTaxFullDetails; /** Represents all the relevant tax details for additional fee. */ taxInfo?: LineItemTaxInfo; /** * SPI implementer's `appId`. * @format GUID */ providerAppId?: string | null; /** Additional fee's price before tax. */ priceBeforeTax?: Price; /** Additional fee's price after tax. */ priceAfterTax?: Price; /** * Additional fee's id. * @format GUID * @immutable */ _id?: string; /** * Optional - Line items associated with this additional fee. * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. * @format GUID */ lineItemIds?: string[]; /** * Number of subscription billing cycles the additional fee applies to. * If None and additional fee is linked to subscription line item, it applies to all cycles. * @internal * @min 1 * @max 999 */ subscriptionCycles?: number | null; /** Specifies the entity that added the additional fee. */ source?: AdditionalFeeSourceWithLiterals; } declare enum AdditionalFeeSource { /** The additional fee was added by an additional fee service plugin. */ SERVICE_PLUGIN = "SERVICE_PLUGIN", /** The additional fee was added to the item by a catalog or custom line item. */ ITEM = "ITEM", /** The additional fee was added manually on request. */ MANUAL = "MANUAL", /** The additional fee was added by the shipping provider. */ SHIPPING = "SHIPPING", /** The additional fee was added by the Wix eCommerce platform. */ PLATFORM = "PLATFORM" } /** @enumType */ type AdditionalFeeSourceWithLiterals = AdditionalFeeSource | 'SERVICE_PLUGIN' | 'ITEM' | 'MANUAL' | 'SHIPPING' | 'PLATFORM'; interface FulfillmentStatusesAggregate { /** Unique string values based on Fulfillment entities statuses */ statuses?: string[] | null; } /** * Common object for tags. * Should be use as in this example: * message Foo { * option (.wix.api.decomposite_of) = "wix.common.tags.Foo"; * string id = 1; * ... * Tags tags = 5 * } * * example of taggable entity * { * id: "123" * tags: { * tags: { * tag_ids:["11","22"] * }, * private_tags: { * tag_ids: ["33", "44"] * } * } * } */ interface Tags { /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */ privateTags?: TagList; /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ tags?: TagList; } interface TagList { /** * List of tag IDs * @maxSize 100 * @maxLength 5 */ tagIds?: string[]; } interface Location { /** * Location ID. * Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction). * @format GUID */ _id?: string; /** * Location name. * @minLength 1 * @maxLength 500 * @readonly */ name?: string; } interface OrderSettings extends OrderSettingsAllowedActionsOneOf, OrderSettingsEditableByOneOf { /** Regular order with full set of allowed actions (ActionType for reference). */ standardActions?: boolean; /** * View only order with limited set of allowed actions: * 1. Add merchant activity * 2. Send order notifications * 3. Archiving order * 4. Assign tags on orders * 5. Export order * 6. Print order */ limitedActions?: boolean; /** Custom list of allowed actions for order. */ customActions?: CustomAllowedActions; /** * Allow the order to be editable by any app that has the required permissions. * Use when edits are not restricted to owning apps. * @internal */ editableByEveryone?: boolean; /** * Restrict editing of the order to the specified owning apps only. * Other apps (even with general edit permissions) are not allowed to edit. * @internal */ editableByOwnerApps?: OwnerApps; /** * New global coupons calculation logic. * Indicates which calculation is used for coupons with type `SPECIFIC_ITEMS`. * @internal */ specificItemsCouponBehavior?: SpecificItemsCouponBehaviorWithLiterals; /** * Whether to automatically generate an invoice when this order will be PAID. * If `false`, no invoice is auto-generated for this order. * * Default: `true` * @internal */ createInvoice?: boolean | null; } /** @oneof */ interface OrderSettingsAllowedActionsOneOf { /** Regular order with full set of allowed actions (ActionType for reference). */ standardActions?: boolean; /** * View only order with limited set of allowed actions: * 1. Add merchant activity * 2. Send order notifications * 3. Archiving order * 4. Assign tags on orders * 5. Export order * 6. Print order */ limitedActions?: boolean; /** Custom list of allowed actions for order. */ customActions?: CustomAllowedActions; } /** @oneof */ interface OrderSettingsEditableByOneOf { /** * Allow the order to be editable by any app that has the required permissions. * Use when edits are not restricted to owning apps. * @internal */ editableByEveryone?: boolean; /** * Restrict editing of the order to the specified owning apps only. * Other apps (even with general edit permissions) are not allowed to edit. * @internal */ editableByOwnerApps?: OwnerApps; } interface CustomAllowedActions { /** @maxSize 17 */ orderActions?: OrderActionTypeWithLiterals[]; } declare enum OrderActionType { /** Order is editable */ EDIT = "EDIT", /** Order is updatable */ UPDATE = "UPDATE", /** Order is refundable */ REFUND = "REFUND", /** Allow mark order as approved */ APPROVE = "APPROVE", /** Allow cancel order */ CANCEL = "CANCEL", /** Allow fulfill order */ FULFILL = "FULFILL", /** Allow to collect payment for order */ COLLECT_PAYMENTS = "COLLECT_PAYMENTS", /** Allow send notifications for order */ SEND_NOTIFICATIONS = "SEND_NOTIFICATIONS", /** Allow add merchant activities on order */ ADD_MERCHANT_ACTIVITY = "ADD_MERCHANT_ACTIVITY", /** Allow add all types of activities on order */ ADD_ACTIVITY = "ADD_ACTIVITY", /** Allow create invoice */ CREATE_INVOICE = "CREATE_INVOICE", /** Allow create receipts for order payments */ CREATE_RECEIPTS = "CREATE_RECEIPTS", /** Allow assign tags on order */ ASSIGN_TAG = "ASSIGN_TAG", /** Allow print packaging slip */ PRINT_PACKAGING_SLIP = "PRINT_PACKAGING_SLIP", /** Allow to update inventory */ MODIFY_INVENTORY = "MODIFY_INVENTORY" } /** @enumType */ type OrderActionTypeWithLiterals = OrderActionType | 'EDIT' | 'UPDATE' | 'REFUND' | 'APPROVE' | 'CANCEL' | 'FULFILL' | 'COLLECT_PAYMENTS' | 'SEND_NOTIFICATIONS' | 'ADD_MERCHANT_ACTIVITY' | 'ADD_ACTIVITY' | 'CREATE_INVOICE' | 'CREATE_RECEIPTS' | 'ASSIGN_TAG' | 'PRINT_PACKAGING_SLIP' | 'MODIFY_INVENTORY'; interface OwnerApps { /** * Identifies the owning apps for this order. * @format GUID * @minSize 1 * @maxSize 10 */ appIds?: string[]; } declare enum SpecificItemsCouponBehavior { /** Coupon calculation behavior was not specified. */ UNDEFINED_COUPON_BEHAVIOR = "UNDEFINED_COUPON_BEHAVIOR", /** Item subtotal includes coupon discount. */ ITEM_SUBTOTAL_INCLUDES_DISCOUNT = "ITEM_SUBTOTAL_INCLUDES_DISCOUNT", /** * Legacy flow. * Discount is applied as to specific items after subtotal calculation. */ LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT = "LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT" } /** @enumType */ type SpecificItemsCouponBehaviorWithLiterals = SpecificItemsCouponBehavior | 'UNDEFINED_COUPON_BEHAVIOR' | 'ITEM_SUBTOTAL_INCLUDES_DISCOUNT' | 'LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT'; interface FormInfo { /** * The identifier of the form schema. * @readonly */ schemaIdentifier?: FormIdentifier; /** * The unique identifier of the form instance. * @format GUID * @readonly */ _id?: string; /** * The line item ids associated with this form. * @format GUID * @readonly * @maxSize 300 */ lineItemIds?: string[]; /** * The translated title of the form. * @maxLength 100 * @readonly */ title?: string; /** * The translated subtitles of the form. * @maxSize 10 * @maxLength 100 * @readonly */ subtitles?: string[] | null; /** * The id of the form submission. * @format GUID */ formSubmissionId?: string | null; } interface FormIdentifier { /** @format GUID */ formSchemaId?: string; /** @maxLength 100 */ namespace?: string; } interface PlatformFeeSummary { /** Total sum of all platform fees. */ total?: Price; /** Total amount of platform fees with `PASS_ON` charge type. */ totalPassOn?: Price; /** Total amount of platform fees with `ABSORBED` charge type. */ totalAbsorbed?: Price; /** * Specific information about each platform fee. * @maxSize 300 */ fees?: PlatformFee[]; } interface PlatformFee { /** Platform fee name. */ name?: TranslatableString; /** Platform fee amount. */ amount?: Price; /** * ID of the line item the platform fee applies to. * @format GUID */ lineItemId?: string; /** Platform fee charge type. */ chargeType?: ChargeTypeWithLiterals; /** * Percentage rate charged as platform fee. * The fee rate percentage expressed as a decimal fraction between 0 and 1. For example, `0.05` for 5%. * @format DECIMAL_VALUE * @decimalValue options { gt:0, lte:1, maxScale:4 } */ percentageRate?: string; } declare enum ChargeType { /** * Platform fee passed on to buyer. * * This type increases the order total, and is visible to the buyer and merchant as an additional fee. */ PASS_ON = "PASS_ON", /** * Platform fee absorbed by merchant. * * This type does not increase the order total, and is only visible to the merchant. */ ABSORBED = "ABSORBED" } /** @enumType */ type ChargeTypeWithLiterals = ChargeType | 'PASS_ON' | 'ABSORBED'; /** Triggered when the order status changes to approved */ interface OrderApproved { /** The order that was updated */ order?: Order; } interface OrdersExperiments { epCommitTax?: boolean; moveMerchantEmailToEp?: boolean; moveBuyerOrderConfirmationEmailToEp?: boolean; producedByEpBridge?: boolean; enableRewrittenSideEffects?: boolean; } interface OrderRejectedEventOrderRejected { /** The order that was rejected */ order?: Order; } /** Triggered when order items are marked as restocked */ interface OrderItemsRestocked { /** The order which items were restocked */ order?: Order; /** Restocked items and quantities */ restockItems?: V1RestockItem[]; } interface V1RestockItem { /** * ID of the line item being restocked. * @format GUID */ lineItemId?: string; /** * Line item quantity being restocked. * @min 1 * @max 100000 */ quantity?: number; /** * Per-location breakdown of restock quantities. * @internal * @maxSize 5 */ restockLocations?: RestockLocation[]; } /** Triggered when order is imported */ interface OrderImported { /** The order which was imported */ order?: Order; } /** Triggered when order was deleted */ interface ImportedOrderDeleted { /** The order which was deleted */ order?: Order; } /** Triggered when the payment status of an order is updated */ interface PaymentStatusUpdated { /** The order that was updated */ order?: Order; /** The previous status (before the update) */ previousPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals; } /** Triggered when the fulfillment status of an order is updated */ interface FulfillmentStatusUpdated { /** The order that was updated */ order?: Order; /** The previous status (before the update) */ previousFulfillmentStatus?: FulfillmentStatusWithLiterals; /** the new status (after the update) */ newFulfillmentStatus?: FulfillmentStatusWithLiterals; /** the action that caused this update */ action?: string; } interface OrderCanceledEventOrderCanceled { /** The order that was cancelled */ order?: Order; /** Should restock all items on that order */ restockAllItems?: boolean; /** Should send a confirmation mail to the customer */ sendOrderCanceledEmail?: boolean; /** Personal note added to the email */ customMessage?: string | null; } /** Triggered when order is edited by draftOrders */ interface OrderDeltasCommitted { /** The order after committed changes. */ order?: Order; /** Draft order Id representing this change. */ draftOrderId?: string; /** Applied changes. */ changes?: CommittedDiffs; /** Side-effects requested to happen as a result of this edit. */ commitSettings?: DraftOrderCommitSettings; /** * Date and time when order deltas were committed. * @readonly */ commitDate?: Date | null; } interface CommittedDiffs extends CommittedDiffsShippingUpdateInfoOneOf { /** Shipping info and selected shipping option details. */ changedShippingInfo?: V1ShippingInformation; /** Remove existing shipping info. */ shippingInfoRemoved?: boolean; /** * Added/updated/removed order line items. * @maxSize 300 */ lineItems?: LineItemDelta[]; /** * Added/updated/removed discounts. * @maxSize 320 */ appliedDiscounts?: AppliedDiscountDelta[]; /** * Added/updated/removed additional fee. * @maxSize 100 */ additionalFees?: AdditionalFeeDelta[]; } /** @oneof */ interface CommittedDiffsShippingUpdateInfoOneOf { /** Shipping info and selected shipping option details. */ changedShippingInfo?: V1ShippingInformation; /** Remove existing shipping info. */ shippingInfoRemoved?: boolean; } interface ItemChangedDetails { /** * The quantity before the change. * @min 1 * @max 1000000 */ quantityBeforeChange?: number | null; /** The price before the change. */ priceBeforeChange?: Price; /** The price description before the change */ priceDescriptionBeforeChange?: PriceDescription; /** * Line Item product name before change. * @internal */ productNameBeforeChange?: ProductName; /** * Line item description lines before change * @internal * @maxSize 20 */ descriptionLinesBeforeChange?: DescriptionLine[]; /** * Modifier groups before the change. * @internal * @maxSize 10 */ modifierGroupsBeforeChange?: ModifierGroup[]; /** * Catalog Options before change. * @internal */ catalogReferenceOptionsBeforeChange?: Record | null; } interface OrderLineItemChangedDetails { /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName; /** * References to the line item's origin catalog. * This field may be empty in the case of a custom line item. */ catalogReference?: CatalogReference; /** * Line item quantity. * @min 1 * @max 100000 */ quantity?: number; /** Total discount for this line item's entire quantity. */ totalDiscount?: Price; /** * Line item description lines. Used for display purposes for the cart, checkout and order. * @maxSize 20 */ descriptionLines?: DescriptionLine[]; /** Line item image. */ image?: string; /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: PhysicalProperties; /** Item type. Either a preset type or custom. */ itemType?: ItemType; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * * To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://www.wix.com/velo/reference/wix-ecom-backend/orderfulfillments/listfulfillmentsforsingleorder). * @format GUID */ fulfillerId?: string | null; /** Line item price after line item discounts for display purposes. */ price?: Price; /** Line item price before line item discounts for display purposes. Defaults to `price` when not provided. */ priceBeforeDiscounts?: Price; /** Total price after all discounts and tax. */ totalPriceAfterTax?: Price; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. */ paymentOption?: DeltaPaymentOptionTypeWithLiterals; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxDetails?: ItemTaxFullDetails; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription; /** Total price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: Price; /** Total price after all discounts excluding tax. */ totalPriceBeforeTax?: Price; /** * Line item locations. * * The location's total quantity must not exceed the line item quantity. * @maxSize 5 */ locations?: LocationAndQuantity[]; /** * ID of the app managing the inventory. * @internal * @format GUID */ inventoryAppId?: string | null; /** Subscription info. */ subscriptionInfo?: SubscriptionInfo; /** * Modifier groups that were added to the item. * @readonly * @maxSize 10 */ modifierGroups?: ModifierGroup[]; /** * Line item ID in external systems. * @internal * @minLength 1 * @maxLength 100 */ externalLineItemId?: string | null; /** * Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`. * @internal * @readonly */ depositAmount?: Price; } /** Type of selected payment option for catalog item */ declare enum DeltaPaymentOptionType { /** The entire payment for the given item will happen after checkout. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** * Payment for this item can only be done using a membership and must be manually redeemed in the dashboard by the site owner. * Note: when this option is used, the price will be 0. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE" } /** @enumType */ type DeltaPaymentOptionTypeWithLiterals = DeltaPaymentOptionType | 'FULL_PAYMENT_OFFLINE' | 'MEMBERSHIP_OFFLINE'; interface LineItemDelta extends LineItemDeltaDeltaOneOf { lineItemAdded?: boolean; changedDetails?: ItemChangedDetails; lineItemRemoved?: OrderLineItemChangedDetails; /** * Line item ID. * @format GUID */ lineItemId?: string; } /** @oneof */ interface LineItemDeltaDeltaOneOf { lineItemAdded?: boolean; changedDetails?: ItemChangedDetails; lineItemRemoved?: OrderLineItemChangedDetails; } interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaOneOf { editedDiscount?: AppliedDiscount; discountRemoved?: boolean; /** * Discount id. * @format GUID */ discountId?: string; } /** @oneof */ interface AppliedDiscountDeltaDeltaOneOf { editedDiscount?: AppliedDiscount; discountRemoved?: boolean; } interface AdditionalFeeDelta extends AdditionalFeeDeltaDeltaOneOf { editedAdditionalFee?: AdditionalFee; additionalFeeRemoved?: boolean; /** * Additional fee id. * @format GUID */ additionalFeeId?: string; } /** @oneof */ interface AdditionalFeeDeltaDeltaOneOf { editedAdditionalFee?: AdditionalFee; additionalFeeRemoved?: boolean; } interface DraftOrderCommitSettings { /** If false, do not send notifications to buyer. Default is true. */ sendNotificationsToBuyer?: boolean | null; /** If false, do not send notifications to business. Default is true. */ sendNotificationsToBusiness?: boolean | null; /** If false, do not add activities to the order. Default is true. */ addActivitiesToOrder?: boolean | null; /** If false, do not send mails to custom fulfillers in case of a change of shippable items fulfilled by custom fulfillers. Default is true. */ sendNotificationsToCustomFulfillers?: boolean | null; /** * Inventory changes to be applied. Either to restock, or decrease. * @maxSize 300 */ inventoryUpdates?: InventoryUpdateDetails[]; } interface InventoryUpdateDetails { /** Action to be applied - decrease or restock */ actionType?: InventoryActionWithLiterals; /** Order line item id */ lineItemId?: string; /** The amount to be increased or restocked */ quantityChange?: number; } declare enum InventoryAction { /** Restock inventory */ RESTOCK = "RESTOCK", /** Decrease inventory. Without failing on negative inventory. */ DECREASE = "DECREASE" } /** @enumType */ type InventoryActionWithLiterals = InventoryAction | 'RESTOCK' | 'DECREASE'; interface ImportOrderRequest { /** * Order to be imported * If order.order_settings.order_type and order.order_settings.custom_order_type not set than VIEW_ONLY will be used */ order: Order; } interface ImportOrderResponse { order?: Order; } /** Set Order number counter request */ interface SetOrderNumberCounterRequest { /** * Order number counter to set. * Counter will be used as start of number sequence and used as order number with increment * @max 999999999 */ counter: string; /** Whether to allow setting a lower counter than current value */ allowLowerCounter?: boolean; } interface SetOrderNumberCounterResponse { /** Order number counter before update */ oldCounter?: string; /** Order number counter after update */ newCounter?: string; } /** Bulk Delete Imported Orders Messages */ interface BulkDeleteImportedOrdersRequest { /** * List of order ids to be deleted. * Only orders imported via ImportOrders API can be deleted. * @format GUID * @minSize 1 * @maxSize 1000 */ orderIds: string[]; } interface BulkDeleteImportedOrdersResponse { /** * Job ID for async operation tracking. Pass to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/get-async-job) or [List Async Job Items](https://dev.wix.com/docs/rest/business-management/async-job/list-async-job-items) to retrieve details and metadata * @format GUID */ jobId?: string; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } interface UpdateInternalDocumentsEvent extends UpdateInternalDocumentsEventOperationOneOf { /** insert/update documents */ update?: InternalDocumentUpdateOperation; /** delete by document ids */ deleteByIds?: DeleteByIdsOperation; /** delete documents matching filter */ deleteByFilter?: DeleteByFilterOperation; /** update internal documents matching filter */ updateByFilter?: InternalDocumentUpdateByFilterOperation; /** update only existing documents */ updateExisting?: InternalUpdateExistingOperation; /** insert/update documents with versioning */ versionedUpdate?: VersionedDocumentUpdateOperation; /** delete by document ids with versioning */ versionedDeleteByIds?: VersionedDeleteByIdsOperation; /** * type of the documents * @minLength 2 */ documentType?: string; /** * language of the documents (mandatory) * @minLength 2 */ language?: string | null; /** * one or more search documents * @deprecated */ addDocuments?: InternalDocument[]; /** * one or more ids of indexed documents to be removed. Removal will happen before addition (if both provided) * @deprecated */ removeDocumentIds?: string[]; /** id to pass to processing notification */ correlationId?: string | null; /** when event was created / issued */ issuedAt?: Date | null; } /** @oneof */ interface UpdateInternalDocumentsEventOperationOneOf { /** insert/update documents */ update?: InternalDocumentUpdateOperation; /** delete by document ids */ deleteByIds?: DeleteByIdsOperation; /** delete documents matching filter */ deleteByFilter?: DeleteByFilterOperation; /** update internal documents matching filter */ updateByFilter?: InternalDocumentUpdateByFilterOperation; /** update only existing documents */ updateExisting?: InternalUpdateExistingOperation; /** insert/update documents with versioning */ versionedUpdate?: VersionedDocumentUpdateOperation; /** delete by document ids with versioning */ versionedDeleteByIds?: VersionedDeleteByIdsOperation; } interface InternalDocument { /** document with mandatory fields (id) and with fields specific to the type of the document */ document?: Record | null; } interface InternalDocumentUpdateOperation { /** documents to index or update */ documents?: InternalDocument[]; } interface DeleteByIdsOperation { /** ids of the documents to delete */ documentIds?: string[]; /** * tenant id for custom tenancy strategy * @minLength 2 * @maxLength 300 */ tenantId?: string | null; } interface DeleteByFilterOperation { /** documents matching this filter wil be deleted. only filterable documents defined in document_type can be used for filtering */ filter?: Record | null; /** * tenant id for custom tenancy strategy * @minLength 2 * @maxLength 300 */ tenantId?: string | null; } interface InternalDocumentUpdateByFilterOperation { /** documents matching this filter will be updated */ filter?: Record | null; /** partial document to apply */ document?: InternalDocument; /** * tenant id for custom tenancy strategy * @minLength 2 * @maxLength 300 */ tenantId?: string | null; } interface InternalUpdateExistingOperation { /** documents to update */ documents?: InternalDocument[]; } interface VersionedDocumentUpdateOperation { /** documents to create or overwrite */ documents?: InternalDocument[]; /** versioning mode to use instead of default */ versioningMode?: VersioningModeWithLiterals; } declare enum VersioningMode { /** use default versioning mode agreed with search team */ DEFAULT = "DEFAULT", /** execute only if version is greater than existing */ GREATER_THAN = "GREATER_THAN", /** execute only if version is greater or equal to existing */ GREATER_OR_EQUAL = "GREATER_OR_EQUAL" } /** @enumType */ type VersioningModeWithLiterals = VersioningMode | 'DEFAULT' | 'GREATER_THAN' | 'GREATER_OR_EQUAL'; interface VersionedDeleteByIdsOperation { /** ids with version of the documents to delete */ documentIds?: VersionedDocumentId[]; /** * tenant id for custom tenancy strategy * @minLength 2 * @maxLength 300 */ tenantId?: string | null; } interface VersionedDocumentId { /** document id */ documentId?: string; /** document version */ version?: string; /** versioning mode to use instead of default */ versioningMode?: VersioningModeWithLiterals; } interface TriggerReindexRequest { /** @format GUID */ metasiteId?: string; /** * @minLength 1 * @maxLength 100 * @maxSize 100 */ orderIds?: string[]; } interface TriggerReindexResponse { } interface Empty { } interface TriggerReindexOrderRequest { /** @format GUID */ metasiteId?: string; /** * @minLength 1 * @maxLength 100 */ orderId?: string; } interface SendBuyerConfirmationEmailRequest { /** @format GUID */ orderId?: string; } interface SendBuyerConfirmationEmailResponse { } interface SendBuyerPaymentsReceivedEmailRequest { /** * @minLength 1 * @maxLength 100 */ orderId?: string; } interface SendBuyerPaymentsReceivedEmailResponse { } interface SendBuyerPickupConfirmationEmailRequest { /** * @minLength 1 * @maxLength 100 */ orderId?: string; } interface SendBuyerPickupConfirmationEmailResponse { } interface BulkSendBuyerPickupConfirmationEmailsRequest { /** * IDs of orders to send pickup emails for. * @minSize 1 * @maxSize 300 */ orderIds?: string[]; } interface BulkSendBuyerPickupConfirmationEmailsResponse { } interface SendBuyerShippingConfirmationEmailRequest { /** * @minLength 1 * @maxLength 100 */ orderId?: string; } interface SendBuyerShippingConfirmationEmailResponse { } interface BulkSendBuyerShippingConfirmationEmailsRequest { /** * IDs of orders to send pickup emails for. * @minSize 1 * @maxSize 300 */ orderIds?: string[]; } interface BulkSendBuyerShippingConfirmationEmailsResponse { } interface SendMerchantOrderReceivedNotificationRequest { /** * @minLength 1 * @maxLength 100 */ orderId?: string; } interface SendMerchantOrderReceivedNotificationResponse { } interface SendCancelRefundEmailRequest { /** * The ID of order that is canceled/refunded * @minLength 1 * @maxLength 100 */ orderId?: string; /** * Personal note added to the email (optional) * @minLength 1 * @maxLength 1000 */ customMessage?: string | null; /** Refund amount */ refundAmount?: Price; /** * Refund ID. (Optional) * @format GUID */ refundId?: string | null; } interface SendCancelRefundEmailResponse { } interface SendRefundEmailRequest { /** * The ID of order that is refunded * @format GUID */ orderId?: string; /** * Refund ID * @format GUID */ refundId?: string; /** * Personal note added to the email (optional) * @minLength 1 * @maxLength 1000 */ customMessage?: string | null; } interface SendRefundEmailResponse { } interface SendFulfillmentEmailRequest { /** @format GUID */ orderId?: string; /** @format GUID */ fulfillerId?: string; } interface SendFulfillmentEmailResponse { } interface SendMerchantOrderReceivedPushRequest { /** * @minLength 1 * @maxLength 100 */ orderId?: string; } interface SendMerchantOrderReceivedPushResponse { } interface PreviewEmailByTypeRequest { emailType?: PreviewEmailTypeWithLiterals; } declare enum PreviewEmailType { ORDER_PLACED = "ORDER_PLACED", DOWNLOAD_LINKS = "DOWNLOAD_LINKS", ORDER_SHIPPED = "ORDER_SHIPPED", ORDER_READY_FOR_PICKUP = "ORDER_READY_FOR_PICKUP" } /** @enumType */ type PreviewEmailTypeWithLiterals = PreviewEmailType | 'ORDER_PLACED' | 'DOWNLOAD_LINKS' | 'ORDER_SHIPPED' | 'ORDER_READY_FOR_PICKUP'; interface PreviewEmailByTypeResponse { emailPreview?: string; } interface PreviewRefundEmailRequest { /** * @minLength 1 * @maxLength 100 */ orderId?: string; /** Refund amount */ refundAmount?: Price; /** Refund business details */ details?: RefundDetails; /** * Personal note added to the email (optional) * @minLength 1 * @maxLength 1000 */ customMessage?: string | null; /** * Refund ID. (Optional) * @format GUID */ refundId?: string | null; } /** Business model of a refund request */ interface RefundDetails { /** * Order line item IDs and quantities that were refunded. * @maxSize 300 */ items?: RefundItem[]; /** Whether the shipping fee was also refunded. */ shippingIncluded?: boolean; /** * Reason for the refund, provided by customer (optional). * @maxLength 200 */ reason?: string | null; /** * Line items that were refunded. * @maxSize 300 */ lineItems?: LineItemRefund[]; /** * Additional fees that were refunded. * @maxSize 100 */ additionalFees?: AdditionalFeeRefund[]; /** Shipping amount that was refunded. */ shipping?: ShippingRefund; } interface RefundItem { /** * Line item ID the refunded line item. * @format GUID */ lineItemId?: string; /** * Line item quantity refunded. * @min 1 * @max 100000 */ quantity?: number; } interface LineItemRefund { /** * Line item ID. * @format GUID * @immutable */ lineItemId?: string; /** * Refund quantity. * @min 1 * @max 100000 * @immutable */ quantity?: number; } interface AdditionalFeeRefund { /** * Additional fee ID. * @format GUID * @immutable */ additionalFeeId?: string; /** * Refund amount. * @immutable */ amount?: Price; } interface ShippingRefund { /** * Refund amount. * @immutable */ amount?: Price; } interface PreviewRefundEmailResponse { emailPreview?: string; } interface PreviewCancelEmailRequest { /** * @minLength 1 * @maxLength 100 */ orderId?: string; /** * Personal note added to the email (optional) * @minLength 1 * @maxLength 1000 */ customMessage?: string | null; } interface PreviewCancelEmailResponse { emailPreview?: string; } interface PreviewCancelRefundEmailRequest { /** * @minLength 1 * @maxLength 100 */ orderId?: string; /** * Personal note added to the email (optional) * @minLength 1 * @maxLength 1000 */ customMessage?: string | null; /** Refund amount */ refundAmount?: Price; /** * Refund ID. (Optional) * @format GUID */ refundId?: string | null; } interface PreviewCancelRefundEmailResponse { emailPreview?: string; } interface PreviewBuyerPaymentsReceivedEmailRequest { } interface PreviewBuyerPaymentsReceivedEmailResponse { emailPreview?: string; } interface PreviewBuyerConfirmationEmailRequest { } interface PreviewBuyerConfirmationEmailResponse { emailPreview?: string; } interface PreviewBuyerPickupConfirmationEmailRequest { } interface PreviewBuyerPickupConfirmationEmailResponse { emailPreview?: string; } interface PreviewShippingConfirmationEmailRequest { } interface PreviewShippingConfirmationEmailResponse { emailPreview?: string; } interface PreviewResendDownloadLinksEmailRequest { } interface PreviewResendDownloadLinksEmailResponse { emailPreview?: string; } interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf { /** Emitted on a meta site creation. */ siteCreated?: SiteCreated; /** Emitted on a meta site transfer completion. */ siteTransferred?: SiteTransferred; /** Emitted on a meta site deletion. */ siteDeleted?: SiteDeleted; /** Emitted on a meta site restoration. */ siteUndeleted?: SiteUndeleted; /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */ sitePublished?: SitePublished; /** Emitted on a meta site unpublish. */ siteUnpublished?: SiteUnpublished; /** Emitted when meta site is marked as template. */ siteMarkedAsTemplate?: SiteMarkedAsTemplate; /** Emitted when meta site is marked as a WixSite. */ siteMarkedAsWixSite?: SiteMarkedAsWixSite; /** Emitted when an application is provisioned (installed). */ serviceProvisioned?: ServiceProvisioned; /** Emitted when an application is removed (uninstalled). */ serviceRemoved?: ServiceRemoved; /** Emitted when meta site name (URL slug) is changed. */ siteRenamedPayload?: SiteRenamed; /** Emitted when meta site was permanently deleted. */ hardDeleted?: SiteHardDeleted; /** Emitted on a namespace change. */ namespaceChanged?: NamespaceChanged; /** Emitted when Studio is attached. */ studioAssigned?: StudioAssigned; /** Emitted when Studio is detached. */ studioUnassigned?: StudioUnassigned; /** * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch * the actual URL. * * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459 */ urlChanged?: SiteUrlChanged; /** Site is marked as PurgedExternally */ sitePurgedExternally?: SitePurgedExternally; /** Emitted when Odeditor is attached. */ odeditorAssigned?: OdeditorAssigned; /** Emitted when Odeditor is detached. */ odeditorUnassigned?: OdeditorUnassigned; /** Emitted when Picasso is attached. */ picassoAssigned?: PicassoAssigned; /** Emitted when Picasso is detached. */ picassoUnassigned?: PicassoUnassigned; /** Emitted when Wixel is attached. */ wixelAssigned?: WixelAssigned; /** Emitted when Wixel is detached. */ wixelUnassigned?: WixelUnassigned; /** Emitted when StudioTwo is attached. */ studioTwoAssigned?: StudioTwoAssigned; /** Emitted when StudioTwo is detached. */ studioTwoUnassigned?: StudioTwoUnassigned; /** Emitted when media from user domain is enabled. */ userDomainMediaEnabled?: UserDomainMediaEnabled; /** Emitted when media from user domain is disabled. */ userDomainMediaDisabled?: UserDomainMediaDisabled; /** Emitted when Editorless is attached. */ editorlessAssigned?: EditorlessAssigned; /** Emitted when Editorless is detached. */ editorlessUnassigned?: EditorlessUnassigned; /** * A meta site id. * @format GUID */ metaSiteId?: string; /** A meta site version. Monotonically increasing. */ version?: string; /** A timestamp of the event. */ timestamp?: string; /** * TODO(meta-site): Change validation once validations are disabled for consumers * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659 * @maxSize 4000 */ assets?: Asset[]; } /** @oneof */ interface MetaSiteSpecialEventPayloadOneOf { /** Emitted on a meta site creation. */ siteCreated?: SiteCreated; /** Emitted on a meta site transfer completion. */ siteTransferred?: SiteTransferred; /** Emitted on a meta site deletion. */ siteDeleted?: SiteDeleted; /** Emitted on a meta site restoration. */ siteUndeleted?: SiteUndeleted; /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */ sitePublished?: SitePublished; /** Emitted on a meta site unpublish. */ siteUnpublished?: SiteUnpublished; /** Emitted when meta site is marked as template. */ siteMarkedAsTemplate?: SiteMarkedAsTemplate; /** Emitted when meta site is marked as a WixSite. */ siteMarkedAsWixSite?: SiteMarkedAsWixSite; /** Emitted when an application is provisioned (installed). */ serviceProvisioned?: ServiceProvisioned; /** Emitted when an application is removed (uninstalled). */ serviceRemoved?: ServiceRemoved; /** Emitted when meta site name (URL slug) is changed. */ siteRenamedPayload?: SiteRenamed; /** Emitted when meta site was permanently deleted. */ hardDeleted?: SiteHardDeleted; /** Emitted on a namespace change. */ namespaceChanged?: NamespaceChanged; /** Emitted when Studio is attached. */ studioAssigned?: StudioAssigned; /** Emitted when Studio is detached. */ studioUnassigned?: StudioUnassigned; /** * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch * the actual URL. * * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459 */ urlChanged?: SiteUrlChanged; /** Site is marked as PurgedExternally */ sitePurgedExternally?: SitePurgedExternally; /** Emitted when Odeditor is attached. */ odeditorAssigned?: OdeditorAssigned; /** Emitted when Odeditor is detached. */ odeditorUnassigned?: OdeditorUnassigned; /** Emitted when Picasso is attached. */ picassoAssigned?: PicassoAssigned; /** Emitted when Picasso is detached. */ picassoUnassigned?: PicassoUnassigned; /** Emitted when Wixel is attached. */ wixelAssigned?: WixelAssigned; /** Emitted when Wixel is detached. */ wixelUnassigned?: WixelUnassigned; /** Emitted when StudioTwo is attached. */ studioTwoAssigned?: StudioTwoAssigned; /** Emitted when StudioTwo is detached. */ studioTwoUnassigned?: StudioTwoUnassigned; /** Emitted when media from user domain is enabled. */ userDomainMediaEnabled?: UserDomainMediaEnabled; /** Emitted when media from user domain is disabled. */ userDomainMediaDisabled?: UserDomainMediaDisabled; /** Emitted when Editorless is attached. */ editorlessAssigned?: EditorlessAssigned; /** Emitted when Editorless is detached. */ editorlessUnassigned?: EditorlessUnassigned; } interface Asset { /** * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum). * @maxLength 36 */ appDefId?: string; /** * An instance id. For legacy reasons may be UUID or a string. * @maxLength 200 */ instanceId?: string; /** An application state. */ state?: StateWithLiterals; } declare enum State { UNKNOWN = "UNKNOWN", ENABLED = "ENABLED", DISABLED = "DISABLED", PENDING = "PENDING", DEMO = "DEMO" } /** @enumType */ type StateWithLiterals = State | 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'PENDING' | 'DEMO'; interface SiteCreated { /** * A template identifier (empty if not created from a template). * @maxLength 36 */ originTemplateId?: string; /** * An account id of the owner. * @format GUID */ ownerId?: string; /** A context in which meta site was created. */ context?: SiteCreatedContextWithLiterals; /** * A meta site id from which this site was created. * * In case of a creation from a template it's a template id. * In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site. * @format GUID */ originMetaSiteId?: string | null; /** * A meta site name (URL slug). * @maxLength 20 */ siteName?: string; /** A namespace. */ namespace?: NamespaceWithLiterals; } declare enum SiteCreatedContext { /** A valid option, we don't expose all reasons why site might be created. */ OTHER = "OTHER", /** A meta site was created from template. */ FROM_TEMPLATE = "FROM_TEMPLATE", /** A meta site was created by copying of the transfferred meta site. */ DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER", /** A copy of existing meta site. */ DUPLICATE = "DUPLICATE", /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */ OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER", /** deprecated A meta site was created for Flash editor. */ FLASH = "FLASH" } /** @enumType */ type SiteCreatedContextWithLiterals = SiteCreatedContext | 'OTHER' | 'FROM_TEMPLATE' | 'DUPLICATE_BY_SITE_TRANSFER' | 'DUPLICATE' | 'OLD_SITE_TRANSFER' | 'FLASH'; declare enum Namespace { UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE", /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */ WIX = "WIX", /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */ SHOUT_OUT = "SHOUT_OUT", /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */ ALBUMS = "ALBUMS", /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */ WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE", /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */ HOTELS = "HOTELS", /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */ CLUBS = "CLUBS", /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */ ONBOARDING_DRAFT = "ONBOARDING_DRAFT", /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */ DEV_SITE = "DEV_SITE", /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */ LOGOS = "LOGOS", /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */ VIDEO_MAKER = "VIDEO_MAKER", /** MetaSites with this namespace will *not* be shown in a user's site list by default. */ PARTNER_DASHBOARD = "PARTNER_DASHBOARD", /** MetaSites with this namespace will *not* be shown in a user's site list by default. */ DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY", /** * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain. * * Meta site with this namespace will *not* be shown in a user's site list by default. */ HTML_DRAFT = "HTML_DRAFT", /** * the user-journey for Fitness users who want to start from managing their business instead of designing their website. * Will be accessible from Site List and will not have a website app. * Once the user attaches a site, the site will become a regular wixsite. */ SITELESS_BUSINESS = "SITELESS_BUSINESS", /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */ CREATOR_ECONOMY = "CREATOR_ECONOMY", /** It is to be used in the Business First efforts. */ DASHBOARD_FIRST = "DASHBOARD_FIRST", /** Bookings business flow with no site. */ ANYWHERE = "ANYWHERE", /** Namespace for Headless Backoffice with no editor */ HEADLESS = "HEADLESS", /** * Namespace for master site that will exist in parent account that will be referenced by subaccounts * The site will be used for account level CSM feature for enterprise */ ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS", /** Rise.ai Siteless account management for Gift Cards and Store Credit. */ RISE = "RISE", /** * As part of the branded app new funnel, users now can create a meta site that will be branded app first. * There's a blank site behind the scene but it's blank). * The Mobile company will be the owner of this namespace. */ BRANDED_FIRST = "BRANDED_FIRST", /** Nownia.com Siteless account management for Ai Scheduling Assistant. */ NOWNIA = "NOWNIA", /** * UGC Templates are templates that are created by users for personal use and to sale to other users. * The Partners company owns this namespace. */ UGC_TEMPLATE = "UGC_TEMPLATE", /** Codux Headless Sites */ CODUX = "CODUX", /** Bobb - AI Design Creator. */ MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR", /** * Shared Blog Site is a unique single site across Enterprise account, * This site will hold all Blog posts related to the Marketing product. */ SHARED_BLOG_ENTERPRISE = "SHARED_BLOG_ENTERPRISE", /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */ STANDALONE_FORMS = "STANDALONE_FORMS", /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */ STANDALONE_EVENTS = "STANDALONE_EVENTS", /** MIMIR - Siteless account for MIMIR Ai Job runner. */ MIMIR = "MIMIR", /** Wix Twins platform. */ TWINS = "TWINS", /** Wix Nano. */ NANO = "NANO", /** Base44 headless sites. */ BASE44 = "BASE44", /** Wix Channels Sites */ CHANNELS = "CHANNELS", /** Nautilus platform. */ NAUTILUS = "NAUTILUS" } /** @enumType */ type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR' | 'TWINS' | 'NANO' | 'BASE44' | 'CHANNELS' | 'NAUTILUS'; /** Site transferred to another user. */ interface SiteTransferred { /** * A previous owner id (user that transfers meta site). * @format GUID */ oldOwnerId?: string; /** * A new owner id (user that accepts meta site). * @format GUID */ newOwnerId?: string; } /** Soft deletion of the meta site. Could be restored. */ interface SiteDeleted { /** A deletion context. */ deleteContext?: DeleteContext; } interface DeleteContext { /** When the meta site was deleted. */ dateDeleted?: Date | null; /** A status. */ deleteStatus?: DeleteStatusWithLiterals; /** * A reason (flow). * @maxLength 255 */ deleteOrigin?: string; /** * A service that deleted it. * @maxLength 255 */ initiatorId?: string | null; } declare enum DeleteStatus { UNKNOWN = "UNKNOWN", TRASH = "TRASH", DELETED = "DELETED", PENDING_PURGE = "PENDING_PURGE", PURGED_EXTERNALLY = "PURGED_EXTERNALLY" } /** @enumType */ type DeleteStatusWithLiterals = DeleteStatus | 'UNKNOWN' | 'TRASH' | 'DELETED' | 'PENDING_PURGE' | 'PURGED_EXTERNALLY'; /** Restoration of the meta site. */ interface SiteUndeleted { } /** First publish of a meta site. Or subsequent publish after unpublish. */ interface SitePublished { } interface SiteUnpublished { /** * A list of URLs previously associated with the meta site. * @maxLength 4000 * @maxSize 10000 */ urls?: string[]; } interface SiteMarkedAsTemplate { } interface SiteMarkedAsWixSite { } /** * Represents a service provisioned a site. * * Note on `origin_instance_id`: * There is no guarantee that you will be able to find a meta site using `origin_instance_id`. * This is because of the following scenario: * * Imagine you have a template where a third-party application (TPA) includes some stub data, * such as a product catalog. When you create a site from this template, you inherit this * default product catalog. However, if the template's product catalog is modified, * your site will retain the catalog as it was at the time of site creation. This ensures that * your site remains consistent with what you initially received and does not include any * changes made to the original template afterward. * To ensure this, the TPA on the template gets a new instance_id. */ interface ServiceProvisioned { /** * Either UUID or EmbeddedServiceType. * @maxLength 36 */ appDefId?: string; /** * Not only UUID. Something here could be something weird. * @maxLength 36 */ instanceId?: string; /** * An instance id from which this instance is originated. * @maxLength 36 */ originInstanceId?: string; /** * A version. * @maxLength 500 */ version?: string | null; /** * The origin meta site id * @format GUID */ originMetaSiteId?: string | null; } interface ServiceRemoved { /** * Either UUID or EmbeddedServiceType. * @maxLength 36 */ appDefId?: string; /** * Not only UUID. Something here could be something weird. * @maxLength 36 */ instanceId?: string; /** * A version. * @maxLength 500 */ version?: string | null; } /** Rename of the site. Meaning, free public url has been changed as well. */ interface SiteRenamed { /** * A new meta site name (URL slug). * @maxLength 20 */ newSiteName?: string; /** * A previous meta site name (URL slug). * @maxLength 255 */ oldSiteName?: string; } /** * Hard deletion of the meta site. * * Could not be restored. Therefore it's desirable to cleanup data. */ interface SiteHardDeleted { /** A deletion context. */ deleteContext?: DeleteContext; } interface NamespaceChanged { /** A previous namespace. */ oldNamespace?: NamespaceWithLiterals; /** A new namespace. */ newNamespace?: NamespaceWithLiterals; } /** Assigned Studio editor */ interface StudioAssigned { } /** Unassigned Studio editor */ interface StudioUnassigned { } /** * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc. * * This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up * with sites and its urls, you need to listen to another topic/event. Read about it: * * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service */ interface SiteUrlChanged { } /** * Used at the end of the deletion flow for both draft sites and when a user deletes a site. * Consumed by other teams to remove relevant data. */ interface SitePurgedExternally { /** * @maxLength 2048 * @maxSize 100 * @deprecated * @targetRemovalDate 2025-04-15 */ appDefId?: string[]; } /** Assigned Odeditor */ interface OdeditorAssigned { } /** Unassigned Odeditor */ interface OdeditorUnassigned { } /** Assigned Picasso editor */ interface PicassoAssigned { } /** Unassigned Picasso */ interface PicassoUnassigned { } /** Assigned Wixel */ interface WixelAssigned { } /** Unassigned Wixel */ interface WixelUnassigned { } /** Assigned StudioTwo */ interface StudioTwoAssigned { } /** Unassigned StudioTwo */ interface StudioTwoUnassigned { } /** Media from user domain is enabled. */ interface UserDomainMediaEnabled { } /** Media from user domain is disabled. */ interface UserDomainMediaDisabled { } /** Assigned Editorless */ interface EditorlessAssigned { } /** Unassigned Editorless */ interface EditorlessUnassigned { } interface HasCustomEmailConfigurationsRequest { } interface HasCustomEmailConfigurationsResponse { hasCustomConfigurations?: boolean; } interface AddToAutomationMigrationPopulationRequest { /** When true, sends custom email configurations to automation system via email */ sendCustomEmailConfigs?: boolean; /** Origin of the migration request. Defaults to OPT_IN when UNKNOWN_ORIGIN. */ origin?: OriginWithLiterals; } declare enum Origin { OPT_IN = "OPT_IN", MIGRATION = "MIGRATION" } /** @enumType */ type OriginWithLiterals = Origin | 'OPT_IN' | 'MIGRATION'; interface AddToAutomationMigrationPopulationResponse { success?: boolean; } interface IsInAutomationMigrationPopulationRequest { } interface IsInAutomationMigrationPopulationResponse { inPopulation?: boolean; } interface PreparePaymentCollectionRequest { /** * Ecom order ID. * @minLength 1 * @maxLength 100 */ ecomOrderId: string; /** Amount to collect */ amount: Price; /** * Optional parameter. When present, payment collection will be performed using given payment gateway order. * Existing payment gateway order will be updated with a new amount. * When parameter is absent, new payment gateway order will be created and used for payment collection. */ paymentGatewayOrderId?: string | null; /** * Whether to delay capture of the payment. * Default: false * @deprecated Whether to delay capture of the payment. * Default: false * @replacedBy delayed_capture_settings.scheduled_action * @targetRemovalDate 2024-09-30 */ delayedCapture?: boolean; /** * Specifies whether payment collection is initiated by Merchant or User of User * Default: `true` * @internal */ merchantInitiated?: boolean | null; /** * Redirect urls which are used to return buyer to third party system. * @internal */ redirectUrls?: RedirectUrls; /** Delayed capture payment settings */ delayedCaptureSettings?: DelayedCaptureSettings; } interface RedirectUrls { /** * URL to redirect buyer in case of approved (successful) transaction * @format WEB_URL */ successUrl?: string | null; /** * URL to redirect buyer in case of buyer canceled the transaction * @format WEB_URL */ cancelUrl?: string | null; /** * URL to redirect buyer in case of failed/rejected transaction * @format WEB_URL */ errorUrl?: string | null; /** * URL to redirect buyer in case of pending transaction (that might take some time to process) * @format WEB_URL */ pendingUrl?: string | null; } interface DelayedCaptureSettings { /** Specifies the automatic action (void/capture) for authorized transaction after the specified duration */ scheduledAction?: ScheduledActionWithLiterals; /** Delay duration before execution. Optional - if not set, providers default period will be used */ delayDuration?: Duration; } declare enum ScheduledAction { /** Whether payment will be auto-voided when duration passes */ VOID = "VOID", /** Whether payment will be auto-captured when duration passes */ CAPTURE = "CAPTURE" } /** @enumType */ type ScheduledActionWithLiterals = ScheduledAction | 'VOID' | 'CAPTURE'; interface Duration { /** * Amount of units. For example, 30 MINUTES, 1 HOURS, 7 DAYS, etc * @min 1 */ count?: number; /** Duration unit: MINUTES, HOURS and DAYS */ unit?: DurationUnitWithLiterals; } declare enum DurationUnit { MINUTES = "MINUTES", HOURS = "HOURS", DAYS = "DAYS" } /** @enumType */ type DurationUnitWithLiterals = DurationUnit | 'MINUTES' | 'HOURS' | 'DAYS'; interface PreparePaymentCollectionResponse { /** Payment gateway order id which is associated with given payment */ paymentGatewayOrderId?: string; } interface GetPaymentCollectabilityStatusRequest { /** * Ecom order ID. * @minLength 1 * @maxLength 100 */ ecomOrderId: string; } interface GetPaymentCollectabilityStatusResponse { /** Payment collectability status */ status?: PaymentCollectabilityStatusWithLiterals; /** Collectable order amount */ amount?: Price; } declare enum PaymentCollectabilityStatus { UNKNOWN = "UNKNOWN", COLLECTABLE = "COLLECTABLE", NONCOLLECTABLE_ORDER_IS_CANCELLED = "NONCOLLECTABLE_ORDER_IS_CANCELLED", NONCOLLECTABLE_ORDER_IS_PAID = "NONCOLLECTABLE_ORDER_IS_PAID", NONCOLLECTABLE_MISSING_PAYMENT_METHOD = "NONCOLLECTABLE_MISSING_PAYMENT_METHOD", NONCOLLECTABLE_ORDER_IS_PENDING = "NONCOLLECTABLE_ORDER_IS_PENDING", NONCOLLECTABLE_ORDER_IS_REJECTED = "NONCOLLECTABLE_ORDER_IS_REJECTED", NONCOLLECTABLE_ORDER_HAS_SUBSCRIPTIONS = "NONCOLLECTABLE_ORDER_HAS_SUBSCRIPTIONS", NONCOLLECTABLE_ORDER_HAS_CHARGEBACKS = "NONCOLLECTABLE_ORDER_HAS_CHARGEBACKS", NONCOLLECTABLE_SUBSCRIPTION_CYCLE_ALREADY_PASSED = "NONCOLLECTABLE_SUBSCRIPTION_CYCLE_ALREADY_PASSED", NONCOLLECTABLE_ORDER_HAS_UNSUPPORTED_SUBSCRIPTION = "NONCOLLECTABLE_ORDER_HAS_UNSUPPORTED_SUBSCRIPTION", NONCOLLECTABLE_CUSTOM_AMOUNT_NOT_SUPPORTED = "NONCOLLECTABLE_CUSTOM_AMOUNT_NOT_SUPPORTED" } /** @enumType */ type PaymentCollectabilityStatusWithLiterals = PaymentCollectabilityStatus | 'UNKNOWN' | 'COLLECTABLE' | 'NONCOLLECTABLE_ORDER_IS_CANCELLED' | 'NONCOLLECTABLE_ORDER_IS_PAID' | 'NONCOLLECTABLE_MISSING_PAYMENT_METHOD' | 'NONCOLLECTABLE_ORDER_IS_PENDING' | 'NONCOLLECTABLE_ORDER_IS_REJECTED' | 'NONCOLLECTABLE_ORDER_HAS_SUBSCRIPTIONS' | 'NONCOLLECTABLE_ORDER_HAS_CHARGEBACKS' | 'NONCOLLECTABLE_SUBSCRIPTION_CYCLE_ALREADY_PASSED' | 'NONCOLLECTABLE_ORDER_HAS_UNSUPPORTED_SUBSCRIPTION' | 'NONCOLLECTABLE_CUSTOM_AMOUNT_NOT_SUPPORTED'; interface RecordManuallyCollectedPaymentRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ orderId: string; /** Amount to be recorded as approved manual payment for given order */ amount: Price; /** * Payment method name provided by user. * * For example, `"Wire transfer"`, `"Money order"`, `"Venmo"` or any other custom name. * @internal */ userDefinedPaymentMethodName?: UserDefinedPaymentMethodName; } /** * User-defined payment method name. * Allows specifying either a predefined type or a custom name. */ interface UserDefinedPaymentMethodName extends UserDefinedPaymentMethodNameKindOneOf { /** Predefined payment method. */ predefined?: PredefinedPaymentMethodWithLiterals; /** * Custom payment method name provided by user. * * For example, `"Wire transfer"`, `"Money order"`, `"Venmo"` or any other custom name. * @minLength 1 * @maxLength 100 */ custom?: string | null; } /** @oneof */ interface UserDefinedPaymentMethodNameKindOneOf { /** Predefined payment method. */ predefined?: PredefinedPaymentMethodWithLiterals; /** * Custom payment method name provided by user. * * For example, `"Wire transfer"`, `"Money order"`, `"Venmo"` or any other custom name. * @minLength 1 * @maxLength 100 */ custom?: string | null; } /** Predefined payment method types for offline/manual payments. */ declare enum PredefinedPaymentMethod { /** Cash payment. */ CASH = "CASH", /** Bank transfer. */ BANK_TRANSFER = "BANK_TRANSFER", /** Payment by check. */ CHECK = "CHECK" } /** @enumType */ type PredefinedPaymentMethodWithLiterals = PredefinedPaymentMethod | 'CASH' | 'BANK_TRANSFER' | 'CHECK'; interface RecordManuallyCollectedPaymentResponse { } interface MarkOrderAsPaidRequest { /** * Ecom order ID. * @minLength 1 * @maxLength 100 */ ecomOrderId: string; /** * Payment method name provided by user. * * For example, `"Wire transfer"`, `"Money order"`, `"Venmo"` or any other custom name. * @internal */ userDefinedPaymentMethodName?: UserDefinedPaymentMethodName; } interface MarkOrderAsPaidResponse { /** Updated order. */ order?: Order; } interface BulkMarkOrdersAsPaidRequest { /** * IDs of orders to mark as paid. * @minSize 1 * @maxSize 100 * @minLength 1 * @maxLength 100 */ ecomOrderIds: string[]; } interface BulkMarkOrdersAsPaidResponse { /** * Items updated by the bulk action. * The Order entity within the results optimistically changes its payment status to paid, however this process is async. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkOrderResult { /** Item metadata. */ itemMetadata?: ItemMetadata; /** * Updated order. * * Returned when `returnFullEntity = true`. */ item?: Order; } interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface GetRefundabilityStatusRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ ecomOrderId: string; } interface GetRefundabilityStatusResponse { /** * Refundability details. * @maxSize 300 */ refundabilities?: Refundability[]; /** * Whether the order supports refunding per item. * @deprecated */ refundablePerItem?: boolean; } interface Refundability extends RefundabilityAdditionalRefundabilityInfoOneOf { /** Reason why payment is not refundable. */ nonRefundableReason?: NonRefundableReasonWithLiterals; /** Reason why payment is only refundable manually. */ manuallyRefundableReason?: ManuallyRefundableReasonWithLiterals; /** Payment ID. */ paymentId?: string; /** Payment refundability status. */ refundabilityStatus?: RefundableStatusWithLiterals; /** Link to payment provider dashboard. */ providerLink?: string | null; } /** @oneof */ interface RefundabilityAdditionalRefundabilityInfoOneOf { /** Reason why payment is not refundable. */ nonRefundableReason?: NonRefundableReasonWithLiterals; /** Reason why payment is only refundable manually. */ manuallyRefundableReason?: ManuallyRefundableReasonWithLiterals; } declare enum RefundableStatus { NOT_REFUNDABLE = "NOT_REFUNDABLE", MANUAL = "MANUAL", REFUNDABLE = "REFUNDABLE" } /** @enumType */ type RefundableStatusWithLiterals = RefundableStatus | 'NOT_REFUNDABLE' | 'MANUAL' | 'REFUNDABLE'; declare enum NonRefundableReason { NONE = "NONE", ALREADY_REFUNDED = "ALREADY_REFUNDED", PROVIDER_IS_DOWN = "PROVIDER_IS_DOWN", INTERNAL_ERROR = "INTERNAL_ERROR", NOT_PAID = "NOT_PAID", ACCESS_DENIED = "ACCESS_DENIED", ZERO_PRICE = "ZERO_PRICE", DISABLED_BY_PROVIDER = "DISABLED_BY_PROVIDER", PENDING_REFUND = "PENDING_REFUND", FORBIDDEN = "FORBIDDEN", TRANSACTION_NOT_FOUND = "TRANSACTION_NOT_FOUND", ORDER_IS_PENDING = "ORDER_IS_PENDING", ORDER_IS_REJECTED = "ORDER_IS_REJECTED" } /** @enumType */ type NonRefundableReasonWithLiterals = NonRefundableReason | 'NONE' | 'ALREADY_REFUNDED' | 'PROVIDER_IS_DOWN' | 'INTERNAL_ERROR' | 'NOT_PAID' | 'ACCESS_DENIED' | 'ZERO_PRICE' | 'DISABLED_BY_PROVIDER' | 'PENDING_REFUND' | 'FORBIDDEN' | 'TRANSACTION_NOT_FOUND' | 'ORDER_IS_PENDING' | 'ORDER_IS_REJECTED'; declare enum ManuallyRefundableReason { EXPIRED = "EXPIRED", NOT_SUPPORTED = "NOT_SUPPORTED", OFFLINE = "OFFLINE", REQUIRES_CARD_READER = "REQUIRES_CARD_READER" } /** @enumType */ type ManuallyRefundableReasonWithLiterals = ManuallyRefundableReason | 'EXPIRED' | 'NOT_SUPPORTED' | 'OFFLINE' | 'REQUIRES_CARD_READER'; interface CreatePaymentGatewayOrderRequest { /** * Ecom order ID. * @minLength 1 * @maxLength 100 */ ecomOrderId: string; /** Information about the user who initiated the payment. */ chargedBy?: ChargedBy; } interface ChargedBy { /** * ID - id of the user who initiated the payment * @format GUID */ _id?: string; /** * Full name - name of the user who initiated the payment * @minLength 1 * @maxLength 200 */ fullName?: string | null; } interface CreatePaymentGatewayOrderResponse { /** ID of the order created in the payment gateway */ paymentGatewayOrderId?: string; } interface ChargeMembershipsRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ ecomOrderId: string; /** * The member id. Do not attempt to get it from the request context, since in some cases the caller is not a member * but a user which is using the membership on behalf of the a member * @format GUID */ memberId: string; /** * List of items to be paid by memberships * @minSize 1 * @maxSize 300 */ membershipCharges?: MembershipChargeItem[]; } interface MembershipChargeItem { /** * The id of used membership * @minLength 1 * @maxLength 100 */ membershipId?: string; /** * ID of the application providing this payment option * @format GUID */ appId?: string; /** The name of used membership */ membershipName?: MembershipName; /** Additional data about this membership */ membershipAdditionalData?: Record | null; /** Catalog and item reference info. */ catalogReference?: CatalogReference; /** Properties of the service. When relevant, contains information such as date and number of participants. */ serviceProperties?: ServiceProperties; /** * Usually would be the same as catalogReference.catalogItemId * For cases when these are not the same, this field would return the actual id of the item in the catalog * For example, for Wix bookings, catalogReference.catalogItemId is the booking id, and this value is being set to be the service id * @minLength 1 * @maxLength 36 */ rootCatalogItemId?: string | null; /** * line item id of Checkout/Order line item * @minLength 1 * @maxLength 100 */ lineItemId?: string; } interface MembershipName { /** * Membership name. * @maxLength 100 */ original?: string; /** * Translated membership name. Defaults to `original` when not provided. * @maxLength 100 */ translated?: string | null; } interface ServiceProperties { /** * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * For example, the start time of a class. */ scheduledDate?: Date | null; /** * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. * @min 1 * @max 10000 */ numberOfParticipants?: number | null; /** * Date and time the service is to be ended, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * For example, the date and time a class will end. * @internal */ endDate?: Date | null; } interface ChargeMembershipsResponse { } interface TriggerRefundRequest { /** * The order this refund related to * @minLength 1 * @maxLength 100 */ ecomOrderId: string; /** * Refund operations information * @minSize 1 * @maxSize 1 */ payments: PaymentRefund[]; /** Business model of a refund */ details?: RefundDetails; /** Side effect details related to refund */ sideEffects?: RefundSideEffects; } interface PaymentRefund { /** * Specific payment within the order to refund * @format GUID */ paymentId?: string; /** Refund amount. Not relevant for membership and gift card refunds. */ amount?: Price; /** * Whether refund is made externally and manually (on the payment provider's side) * When false (default), the payment gateway will be called in order to make an actual refund, and then the payment will be marked as refunded. * When true, the payment will only be *marked* as refunded, and no actual refund will be performed. */ externalRefund?: boolean; } interface RefundSideEffects { /** Inventory restock details as part of this refund. */ restockInfo?: RestockInfo; /** Whether to send a refund confirmation email to the customer. */ sendOrderRefundedEmail?: boolean; /** * Custom message added to the refund confirmation email. * @minLength 1 * @maxLength 1000 */ customMessage?: string | null; } interface RestockInfo { /** Restock type. */ type?: RestockTypeWithLiterals; /** * Restocked line items and quantities. Only relevant for `{"type": "SOME_ITEMS"}`. * @maxSize 300 */ items?: RestockItem[]; } declare enum RestockType { NO_ITEMS = "NO_ITEMS", ALL_ITEMS = "ALL_ITEMS", SOME_ITEMS = "SOME_ITEMS" } /** @enumType */ type RestockTypeWithLiterals = RestockType | 'NO_ITEMS' | 'ALL_ITEMS' | 'SOME_ITEMS'; interface RestockItem { /** * ID of the line item being restocked. * @format GUID */ lineItemId?: string; /** * Line item quantity being restocked. * @min 1 * @max 100000 */ quantity?: number; /** * Per-location breakdown of restock quantities. * @internal * @maxSize 5 */ restockLocations?: RestockLocation[]; } interface TriggerRefundResponse { /** All order's transactions after the refunds were added */ orderTransactions?: OrderTransactions; /** Created refund ID */ refundId?: string | null; /** Payment ID's that the refund execution had failed for */ failedPaymentIds?: ItemMetadata[]; } /** * A record of all payments and refunds associated with an order. * * Use order transactions to track payment status, add payment records, process refunds, and monitor chargebacks. */ interface OrderTransactions { /** * Order ID. * @format GUID */ orderId?: string; /** * Record of payments made to the merchant. * @maxSize 100 */ payments?: Payment[]; /** * Record of refunds made to the buyer. * @maxSize 300 */ refunds?: Refund[]; } interface Payment extends PaymentPaymentDetailsOneOf, PaymentReceiptInfoOneOf { /** Regular payment details. */ regularPaymentDetails?: RegularPaymentDetails; /** Gift card payment details. */ giftcardPaymentDetails?: GiftCardPaymentDetails; /** * Receipt created by Wix * @internal */ wixReceipt?: WixReceiptInfo; /** * Receipt created by an external system. * @internal */ externalReceipt?: ExternalReceiptInfo; /** * Payment ID. * @format GUID * @readonly */ _id?: string | null; /** Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. */ _createdDate?: Date | null; /** * Date and time the payment was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** Payment amount. */ amount?: Price; /** * Whether refunds for this payment are disabled. * + `true`: This payment is not refundable. * + `false`: This payment may be refunded. However, this ultimately depends on the payment provider. */ refundDisabled?: boolean; /** * Whether receipt generation for this payment are allowed. * + `true`: This payment supports receipt generation. * + `false`: This payment not supports receipt generation, or receipt already generated * @internal * @readonly */ supportReceiptGeneration?: boolean; /** * Details about cash rounding applied to this payment, when relevant. * @internal */ cashRounding?: CashRoundingDetails; /** * Location where the payment was processed. * @internal * @format GUID * @immutable */ locationId?: string | null; } /** @oneof */ interface PaymentPaymentDetailsOneOf { /** Regular payment details. */ regularPaymentDetails?: RegularPaymentDetails; /** Gift card payment details. */ giftcardPaymentDetails?: GiftCardPaymentDetails; } /** @oneof */ interface PaymentReceiptInfoOneOf { /** * Receipt created by Wix * @internal */ wixReceipt?: WixReceiptInfo; /** * Receipt created by an external system. * @internal */ externalReceipt?: ExternalReceiptInfo; } interface RegularPaymentDetails extends RegularPaymentDetailsPaymentMethodDetailsOneOf { /** Credit card details. */ creditCardDetails?: CreditCardPaymentMethodDetails; /** * Wix Payments order ID. * @maxLength 100 */ paymentOrderId?: string | null; /** * Payment gateway's transaction ID. * This field is only returned when the value of `offline_payment` is `false`. * @maxLength 100 */ gatewayTransactionId?: string | null; /** * Payment method. * Deprecated. Use `paymentMethodName.buyerLanguageName` instead. * Non-exhaustive list of supported values: * + `CreditCard`, `Alipay`, `AstropayCash`, `AstropayDBT`, `AstropayMBT`, `Bitcoin`, `BitPay`, `Cash`, `ConvenienceStore`, `EPay`, `Fake`, `Giropay`, `IDeal`, `InPerson`, `Klarna`, `MercadoPago`, `Netpay`, `NordeaSolo`, `Offline`, `PagSeguro`, `PayEasy`, `PayPal`, `Paysafecard`, `Paysafecash`, `PointOfSale`, `Poli`, `Privat24`, `Przelewy24`, `RapidTransfer`, `Sepa`, `Skrill`, `Sofort`, `Trustly`, `Neteller`, `Unionpay`, `UniPay`, `Yandex` * @maxLength 100 * @deprecated Payment method. * Deprecated. Use `paymentMethodName.buyerLanguageName` instead. * Non-exhaustive list of supported values: * + `CreditCard`, `Alipay`, `AstropayCash`, `AstropayDBT`, `AstropayMBT`, `Bitcoin`, `BitPay`, `Cash`, `ConvenienceStore`, `EPay`, `Fake`, `Giropay`, `IDeal`, `InPerson`, `Klarna`, `MercadoPago`, `Netpay`, `NordeaSolo`, `Offline`, `PagSeguro`, `PayEasy`, `PayPal`, `Paysafecard`, `Paysafecash`, `PointOfSale`, `Poli`, `Privat24`, `Przelewy24`, `RapidTransfer`, `Sepa`, `Skrill`, `Sofort`, `Trustly`, `Neteller`, `Unionpay`, `UniPay`, `Yandex` * @replacedBy payment_method_name * @targetRemovalDate 2026-07-01 */ paymentMethod?: string | null; /** * Transaction ID in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for offline payments. * @maxLength 100 */ providerTransactionId?: string | null; /** Whether the payment was made offline. For example, when using cash or when marked as paid in the Business Manager. */ offlinePayment?: boolean; /** Payment status. */ status?: TransactionStatusWithLiterals; /** * Whether there is a payment agreement that allows for future charges. * @immutable */ savedPaymentMethod?: boolean; /** Authorization details. */ authorizationDetails?: AuthorizationDetails; /** * Payment service provider display name. Non-exhaustive list of supported values: Wix Payments, PayPal, Square, Stripe, etc. * @internal * @maxLength 300 */ paymentProvider?: string | null; /** * Record of chargebacks made by the buyer. * @maxSize 6 */ chargebacks?: Chargeback[]; /** * Payment method ID. * @internal * @maxLength 36 */ paymentMethodId?: string | null; /** Platform fee amount associated with this payment. */ platformFee?: Price; /** * Payment method with buyer and optional owner translations. * Non-exhaustive list of supported values: * + `CreditCard`, `Alipay`, `AstropayCash`, `AstropayDBT`, `AstropayMBT`, `Bitcoin`, `BitPay`, `Cash`, `ConvenienceStore`, `EPay`, `Fake`, `Giropay`, `IDeal`, `InPerson`, `Klarna`, `MercadoPago`, `Netpay`, `NordeaSolo`, `Offline`, `PagSeguro`, `PayEasy`, `PayPal`, `Paysafecard`, `Paysafecash`, `PointOfSale`, `Poli`, `Privat24`, `Przelewy24`, `RapidTransfer`, `Sepa`, `Skrill`, `Sofort`, `Trustly`, `Neteller`, `Unionpay`, `UniPay`, `Yandex` */ paymentMethodName?: PaymentMethodName; } /** @oneof */ interface RegularPaymentDetailsPaymentMethodDetailsOneOf { /** Credit card details. */ creditCardDetails?: CreditCardPaymentMethodDetails; } declare enum TransactionStatus { UNDEFINED = "UNDEFINED", APPROVED = "APPROVED", PENDING = "PENDING", PENDING_MERCHANT = "PENDING_MERCHANT", CANCELED = "CANCELED", DECLINED = "DECLINED", REFUNDED = "REFUNDED", PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", AUTHORIZED = "AUTHORIZED", VOIDED = "VOIDED" } /** @enumType */ type TransactionStatusWithLiterals = TransactionStatus | 'UNDEFINED' | 'APPROVED' | 'PENDING' | 'PENDING_MERCHANT' | 'CANCELED' | 'DECLINED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'AUTHORIZED' | 'VOIDED'; interface CreditCardPaymentMethodDetails { /** * The last 4 digits of the card number. * @maxLength 4 */ lastFourDigits?: string | null; /** * Card issuer's brand. * @maxLength 100 */ brand?: string | null; } interface AuthorizationDetails { /** * Whether the authorized payment is of a delayed capture. * @readonly */ delayedCapture?: boolean; /** Date and time the payment was authorized in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ authorizedDate?: Date | null; /** * List of captures associated with payment * In case of failed it can be replaced with new one with PENDING or SUCCESS statuses * @maxSize 1 */ captures?: AuthorizationCapture[]; /** Void associated with payment */ void?: AuthorizationVoid; /** Scheduled action for this transaction */ scheduledAction?: V1ScheduledAction; } interface AuthorizationCapture { /** * Capture ID. * @format GUID * @readonly */ _id?: string | null; /** Status of this capture action */ status?: AuthorizationCaptureStatusWithLiterals; /** * Amount of this capture * @immutable */ amount?: Price; /** Date and time the capture was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ _createdDate?: Date | null; /** In case of status is FAILED may contain failure details */ failureDetails?: AuthorizationActionFailureDetails; } declare enum AuthorizationCaptureStatus { /** Capture operation still in progress. */ PENDING = "PENDING", /** Capture operation succeeded. */ SUCCEEDED = "SUCCEEDED", /** Capture operation failed. */ FAILED = "FAILED" } /** @enumType */ type AuthorizationCaptureStatusWithLiterals = AuthorizationCaptureStatus | 'PENDING' | 'SUCCEEDED' | 'FAILED'; interface AuthorizationActionFailureDetails { /** @maxLength 100 */ failureCode?: string; } interface AuthorizationVoid { /** Status of this void action */ status?: AuthorizationVoidStatusWithLiterals; /** Date and time the void was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ voidedDate?: Date | null; /** In case of status is FAILED may contain failure details */ failureDetails?: AuthorizationActionFailureDetails; /** Reason of void action */ reason?: ReasonWithLiterals; } declare enum AuthorizationVoidStatus { /** Void operation still in progress. */ PENDING = "PENDING", /** Void operation succeeded. */ SUCCEEDED = "SUCCEEDED", /** Void operation failed. */ FAILED = "FAILED" } /** @enumType */ type AuthorizationVoidStatusWithLiterals = AuthorizationVoidStatus | 'PENDING' | 'SUCCEEDED' | 'FAILED'; /** Reason the authorization was voided. */ declare enum Reason { /** Authorization was voided by user. */ MANUAL = "MANUAL", /** Authorization passed execution date. */ SCHEDULED = "SCHEDULED" } /** @enumType */ type ReasonWithLiterals = Reason | 'MANUAL' | 'SCHEDULED'; interface V1ScheduledAction { /** Type of the action. */ actionType?: ActionTypeWithLiterals; /** The date and time of the action. */ executionDate?: Date | null; } declare enum ActionType { VOID = "VOID", CAPTURE = "CAPTURE" } /** @enumType */ type ActionTypeWithLiterals = ActionType | 'VOID' | 'CAPTURE'; interface Chargeback { /** * Chargeback ID. * @format GUID * @readonly * @immutable */ _id?: string; /** * Date and time the chargeback was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. * @readonly * @immutable */ _createdDate?: Date | null; /** * Date and time the chargeback was updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. * @readonly */ _updatedDate?: Date | null; /** * Amount. * @readonly * @immutable */ amount?: Price; /** * Reversal amount. Present only when status is REVERSED. * @readonly */ reversalAmount?: Price; /** * Status. * * Default: `"APPROVED"`. */ status?: ChargebackStatusWithLiterals; /** * External chargeback ID. * @format GUID * @readonly * @immutable */ externalId?: string | null; } declare enum ChargebackStatus { /** Chargeback was approved. */ APPROVED = "APPROVED", /** Chargeback was reversed. */ REVERSED = "REVERSED" } /** @enumType */ type ChargebackStatusWithLiterals = ChargebackStatus | 'APPROVED' | 'REVERSED'; interface PaymentMethodName { /** * Translated payment method name in buyer language. * @maxLength 100 */ buyerLanguageName?: string | null; /** * Translated payment method name in site owner language. * @maxLength 100 */ siteLanguageName?: string | null; /** * User-provided payment method name. * * When set, takes precedence over `buyerLanguageName` and `siteLanguageName`. */ userDefinedName?: UserDefinedPaymentMethodName; } interface GiftCardPaymentDetails { /** * Gift card payment ID. * @minLength 1 * @maxLength 100 */ giftCardPaymentId?: string; /** * ID of the app that created the gift card. * @format GUID */ appId?: string; /** * Whether the gift card is voided. * @readonly */ voided?: boolean; /** * Gift card obfuscated code. * @internal * @maxLength 30 * @immutable */ obfuscatedCode?: string | null; } interface MembershipPaymentDetails { /** * Membership ID. * @minLength 1 * @maxLength 100 */ membershipId?: string; /** * ID of the line item this membership applies to. * @minLength 1 * @maxLength 100 */ lineItemId?: string; /** Payment status. */ status?: MembershipPaymentStatusWithLiterals; /** Membership name. */ name?: MembershipName; /** * The transaction ID in the membership system. Can be used to void the transaction. * @minLength 1 * @maxLength 100 */ externalTransactionId?: string | null; /** * Whether the membership is voided. * @readonly */ voided?: boolean; /** * ID of the application providing this payment option. * @format GUID */ providerAppId?: string; } declare enum MembershipPaymentStatus { /** Payment was charged. */ CHARGED = "CHARGED", /** The attempt to charge the payment failed, for example, due to lack of credits. */ CHARGE_FAILED = "CHARGE_FAILED", /** Payment is pending. */ CHARGE_PENDING = "CHARGE_PENDING", /** Payment was voided. */ VOIDED = "VOIDED" } /** @enumType */ type MembershipPaymentStatusWithLiterals = MembershipPaymentStatus | 'CHARGED' | 'CHARGE_FAILED' | 'CHARGE_PENDING' | 'VOIDED'; interface WixReceiptInfo { /** * Receipt ID * @format GUID */ receiptId?: string; /** * Display number of receipt * @minLength 1 * @maxLength 40 */ displayNumber?: string | null; } interface ExternalReceiptInfo { /** * External receipt ID * @maxLength 100 */ receiptId?: string | null; /** * ID of the app providing the receipt * @format GUID */ appId?: string | null; /** * Display number of receipt * @minLength 1 * @maxLength 40 */ displayNumber?: string | null; } interface CashRoundingDetails { /** * Payment amount before cash rounding was applied. * When provided, balance and status calculations use this value instead of `amount` * to prevent false overpayment or underpayment due to rounding. * @internal */ unroundedAmount?: Price; /** * The difference between 'amount' and 'unroundedAmount' (amount minus unroundedAmount). * A positive value indicates the price was rounded up; a negative value indicates a round-down. * @internal * @readonly */ roundingAdjustment?: CashRounding; } declare enum PaymentStatus { APPROVED = "APPROVED", PENDING = "PENDING", PENDING_MERCHANT = "PENDING_MERCHANT", CANCELED = "CANCELED", DECLINED = "DECLINED", REFUNDED = "REFUNDED", PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", AUTHORIZED = "AUTHORIZED", VOIDED = "VOIDED" } /** @enumType */ type PaymentStatusWithLiterals = PaymentStatus | 'APPROVED' | 'PENDING' | 'PENDING_MERCHANT' | 'CANCELED' | 'DECLINED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'AUTHORIZED' | 'VOIDED'; interface Refund { /** * Refund ID. * @format GUID * @readonly */ _id?: string; /** * List of transactions. * @maxSize 50 */ transactions?: RefundTransaction[]; /** Refund business details. */ details?: RefundDetails; /** * Date and time the refund was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. * @readonly * @immutable */ _createdDate?: Date | null; /** * Aggregated refund summary. * @readonly */ summary?: AggregatedRefundSummary; /** * ID of the app that initiated this refund. * @format GUID * @readonly * @immutable */ requestingServiceAppId?: string | null; } interface RefundTransaction { /** * ID of the payment associated with this refund. * @format GUID * @immutable */ paymentId?: string; /** * Refund amount. * @immutable */ amount?: Price; /** Refund status. */ refundStatus?: RefundStatusWithLiterals; /** Optional details of current refund status. */ refundStatusInfo?: RefundStatusInfo; /** * Payment gateway's refund ID. * This field is only returned when the value of `external_refund` is `false`. * @format GUID */ gatewayRefundId?: string | null; /** ID of the refund in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for external refunds. */ providerRefundId?: string | null; /** * Whether refund was made externally and manually on the payment provider's side. * @immutable */ externalRefund?: boolean; /** * Location where the refund was processed. * @internal * @format GUID * @immutable */ locationId?: string | null; } /** Refund transaction status. */ declare enum RefundStatus { /** Refund was initiated on payment provider side. PENDING status was assigned by provider. */ PENDING = "PENDING", /** Refund transaction succeeded. */ SUCCEEDED = "SUCCEEDED", /** Refund transaction failed. */ FAILED = "FAILED", /** Refund request acknowledged, and will be executed soon. */ SCHEDULED = "SCHEDULED", /** Refund was initiated on payment provider side. */ STARTED = "STARTED" } /** @enumType */ type RefundStatusWithLiterals = RefundStatus | 'PENDING' | 'SUCCEEDED' | 'FAILED' | 'SCHEDULED' | 'STARTED'; interface RefundStatusInfo { /** * Reason code for the refund's current status. * * Learn more about [reason codes](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes). * @minLength 1 * @maxLength 10 */ paymentGatewayReasonCode?: string | null; /** * Free text explanation of current refund status. * @minLength 1 * @maxLength 1000 */ description?: string | null; } interface AggregatedRefundSummary { /** Total amount requested for refund. */ requestedRefund?: Price; /** Pending refund amount - the portion of `requestedRefund` that is still pending. */ pendingRefund?: Price; /** Refunded amount - the portion of `requestedRefund` that refunded successfully. */ refunded?: Price; /** Failed refund amount - the portion of `requestedRefund` that failed. */ failedRefundAmount?: Price; /** Whether at least one refund transaction is still in `"PENDING"` status. */ pending?: boolean; /** Breakdown of refunded items. Available only after refund is complete. */ breakdown?: RefundItemsBreakdown; } interface RefundItemsBreakdown { /** * Refunded line items and the amount refunded for each. * @maxSize 300 */ lineItems?: LineItemRefundSummary[]; } interface LineItemRefundSummary { /** * ID of the refunded line item. * @format GUID */ lineItemId?: string; /** Total refunded amount for the line item. */ totalRefundedAmount?: Price; } interface CalculateRefundRequest { /** * Order ID * @minLength 1 * @maxLength 100 */ ecomOrderId?: string; /** * Refunded line items and quantity * @maxSize 300 */ refundItems?: CalculateRefundItemRequest[]; /** Should include shipping in refund calculation */ refundShipping?: boolean; } interface CalculateRefundItemRequest { /** * ID of the line item being refunded * @format GUID */ _id?: string; /** * How much of that line item is being refunded * @min 1 * @max 100000 */ quantity?: number; } interface CalculateRefundResponse { /** Total refundable amount */ total?: Price; /** Tax cost of the order */ tax?: Price; /** Discount given for this order */ discount?: Price; /** Total cost of the order (without tax) */ subtotal?: Price; /** Total shipping cost for order */ shipping?: Price; /** Previous refund given on that order */ previouslyRefundedAmount?: Price; /** * The refundable items of that order * @maxSize 300 */ items?: CalculateRefundItemResponse[]; } interface CalculateRefundItemResponse { /** * Line item ID * @format GUID */ _id?: string; /** Refundable amount for requested quantity of items (price of requested quantity of items without tax and discount) */ price?: Price; } interface VoidAuthorizedPaymentsRequest { /** * Wix eCommerce order ID * @minLength 1 * @maxLength 100 */ ecomOrderId: string; /** * Payment IDs * @minSize 1 * @maxSize 100 * @format GUID */ paymentIds: string[]; } interface VoidAuthorizedPaymentsResponse { /** All order's transactions after the void was triggered */ orderTransactions?: OrderTransactions; } interface CaptureAuthorizedPaymentsRequest { /** * Wix eCommerce order ID * @minLength 1 * @maxLength 100 */ ecomOrderId: string; /** * Capture payments information * @minSize 1 * @maxSize 100 */ payments: PaymentCapture[]; } interface PaymentCapture { /** * Payment ID * @format GUID */ paymentId?: string | null; /** * Capture amount. * If not provided - full authorized amount will be captured. */ amount?: Price; } interface CaptureAuthorizedPaymentsResponse { /** All order's transactions after the capture was triggered */ orderTransactions?: OrderTransactions; } interface ChargeSavedPaymentMethodRequest { /** * Ecom Order ID. * @minLength 1 * @maxLength 100 */ ecomOrderId?: string; /** Amount to be charged */ amount?: Price; } interface ChargeSavedPaymentMethodResponse { /** Payment gateway's order ID (e.g Wix Payments) */ paymentGatewayOrderId?: string; } interface DiffmatokyPayload { left?: string; right?: string; compareChannel?: string; entityId?: string; errorInformation?: ErrorInformation; tags?: string[]; } interface ErrorInformation { stackTrace?: string; } interface GetOrderRequest { /** * ID of the order to retrieve. * @minLength 1 * @maxLength 100 */ _id: string; } interface GetOrderResponse { /** The requested order. */ order?: Order; } interface InternalQueryOrdersRequest { /** Query options. */ query?: PlatformQuery; } interface PlatformQuery extends PlatformQueryPagingMethodOneOf { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging; /** Filter object. */ filter?: Record | null; /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */ sort?: Sorting[]; } /** @oneof */ interface PlatformQueryPagingMethodOneOf { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface PlatformPaging { /** * Number of items to load. * @max 100 */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface InternalQueryOrdersResponse { /** List of orders. */ orders?: Order[]; /** Details on the paged set of results returned. */ metadata?: PlatformPagingMetadata; } interface PlatformPagingMetadata { /** The number of items returned in this response. */ count?: number | null; /** The offset which was requested. Returned if offset paging was used. */ offset?: number | null; /** The total number of items that match the query. Returned if offset paging was used. */ total?: number | null; /** Cursors to navigate through result pages. Returned if cursor paging was used. */ cursors?: Cursors; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface QueryOrderRequest { /** Query options. */ query?: PlatformQuery; } interface QueryOrderResponse { /** List of orders. */ orders?: Order[]; /** Details on the paged set of results returned. */ metadata?: PlatformPagingMetadata; } interface SearchOrdersRequest { /** Search options. */ search?: CursorSearch; } interface CursorSearch extends CursorSearchPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * List of sort objects. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). * @maxSize 4 */ sort?: Sorting[]; } /** @oneof */ interface CursorSearchPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } interface SearchOrdersResponse { /** List of orders. */ orders?: Order[]; /** Details on the paged set of results returned. */ metadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface CreateOrderRequest { /** Order info. */ order: Order; /** Determine order lifecycle */ settings?: OrderCreationSettings; } interface OrderCreationSettings extends OrderCreationSettingsEditableByOneOf { /** * Allow the order to be editable by any app that has the required permissions. * Use when edits are not restricted to owning apps. * @internal */ editableByEveryone?: boolean; /** * Restrict editing of the order to the specified owning apps only. * Other apps (even with general edit permissions) are not allowed to edit. * @internal */ editableByOwnerApps?: OwnerApps; /** * Condition for the order to be approved. * Default: `DEFAULT` */ orderApprovalStrategy?: OrderApprovalStrategyWithLiterals; /** Notification settings to be applied on order creation */ notifications?: OrderCreateNotifications; } /** @oneof */ interface OrderCreationSettingsEditableByOneOf { /** * Allow the order to be editable by any app that has the required permissions. * Use when edits are not restricted to owning apps. * @internal */ editableByEveryone?: boolean; /** * Restrict editing of the order to the specified owning apps only. * Other apps (even with general edit permissions) are not allowed to edit. * @internal */ editableByOwnerApps?: OwnerApps; } declare enum OrderApprovalStrategy { /** Order is automatically approved when `order.priceSummary.total = 0`, **or** after receiving payment. */ DEFAULT = "DEFAULT", /** Order is automatically approved **only** after receiving payment. */ PAYMENT_RECEIVED = "PAYMENT_RECEIVED", /** Order is automatically approved when payment method is saved for it. */ PAYMENT_METHOD_SAVED = "PAYMENT_METHOD_SAVED" } /** @enumType */ type OrderApprovalStrategyWithLiterals = OrderApprovalStrategy | 'DEFAULT' | 'PAYMENT_RECEIVED' | 'PAYMENT_METHOD_SAVED'; interface OrderCreateNotifications { /** * Whether to send notification to the buyer. * * Default: `true` */ sendNotificationToBuyer?: boolean | null; /** * Whether to send notifications to the business. * * Default: `true` */ sendNotificationsToBusiness?: boolean | null; } interface CreateOrderResponse { /** Newly created order. */ order?: Order; } interface UpdateOrderRequest { /** Order to be updated. */ order: Order; } interface UpdateOrderResponse { /** Newly created order. */ order?: Order; } interface BulkUpdateOrdersRequest { /** * Orders to update. * @minSize 1 * @maxSize 100 */ orders: MaskedOrder[]; /** * Whether to return the full order entities. * * Default: `false` */ returnEntity?: boolean; } interface MaskedOrder { /** Order to be updated. */ order?: Order; } interface BulkUpdateOrdersResponse { /** * Bulk action results. * @minSize 1 * @maxSize 100 */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface CommitDeltasRequest { /** Order id to be updated */ _id?: string; /** * Draft order Id representing this change. * Use this ID to get this specific draft content. call .../v1/draft-orders/{draft_order_id}/get * @format GUID */ draftOrderId?: string; /** Draft order changes to be applied */ changes?: DraftOrderDiffs; /** Side-effects to happen after order is updated */ commitSettings?: DraftOrderCommitSettings; /** * Reason for edit, given by user (optional). * @maxLength 200 */ reason?: string | null; /** * New global coupons calculation logic. * Indicates that line items in deltas contain totals calculated with new logic. * @internal */ specificItemsCouponBehavior?: SpecificItemsCouponBehaviorWithLiterals; } interface DraftOrderDiffs extends DraftOrderDiffsShippingUpdateInfoOneOf, DraftOrderDiffsBuyerUpdateInfoOneOf, DraftOrderDiffsBillingUpdateInfoOneOf, DraftOrderDiffsRecipientUpdateInfoOneOf { /** Shipping info and selected shipping option details. */ changedShippingInfo?: V1ShippingInformation; /** Remove existing shipping info. */ shippingInfoRemoved?: boolean; /** * Buyer info and selected buyer option details. * @internal */ changedBuyerInfo?: BuyerInfo; /** * Remove existing buyer info. * @internal */ buyerInfoRemoved?: boolean; /** * Updated billing info. * @internal */ changedBillingInfo?: AddressWithContact; /** * Remove existing billing info. * @internal */ billingInfoRemoved?: boolean; /** * Updated recipient info. * @internal */ changedRecipientInfo?: AddressWithContact; /** * Remove existing recipient info. * @internal */ recipientInfoRemoved?: boolean; /** * Added/updated/removed order line items. * @maxSize 300 */ lineItems?: V1LineItemDelta[]; /** * Added/updated/removed discounts. * @maxSize 320 */ appliedDiscounts?: AppliedDiscountDelta[]; /** * Added/updated/removed additional fee. * @maxSize 100 */ additionalFees?: AdditionalFeeDelta[]; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Updated Tax summary. overwrites existing tax summary. * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Updated Tax summary. overwrites existing tax summary. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxSummary?: TaxSummary; /** * Updated order price summary. overwrites existing price summary. * balance will be updated automatically. */ priceSummary?: PriceSummary; } /** @oneof */ interface DraftOrderDiffsShippingUpdateInfoOneOf { /** Shipping info and selected shipping option details. */ changedShippingInfo?: V1ShippingInformation; /** Remove existing shipping info. */ shippingInfoRemoved?: boolean; } /** @oneof */ interface DraftOrderDiffsBuyerUpdateInfoOneOf { /** * Buyer info and selected buyer option details. * @internal */ changedBuyerInfo?: BuyerInfo; /** * Remove existing buyer info. * @internal */ buyerInfoRemoved?: boolean; } /** @oneof */ interface DraftOrderDiffsBillingUpdateInfoOneOf { /** * Updated billing info. * @internal */ changedBillingInfo?: AddressWithContact; /** * Remove existing billing info. * @internal */ billingInfoRemoved?: boolean; } /** @oneof */ interface DraftOrderDiffsRecipientUpdateInfoOneOf { /** * Updated recipient info. * @internal */ changedRecipientInfo?: AddressWithContact; /** * Remove existing recipient info. * @internal */ recipientInfoRemoved?: boolean; } interface V1LineItemDelta extends V1LineItemDeltaDeltaOneOf { /** The line item was added. */ lineItemAdded?: boolean; /** The line item was modified. */ changedDetails?: ItemChangedDetails; /** The line item was added. */ lineItemRemoved?: boolean; /** * Line item ID. * @format GUID */ lineItemId?: string; lineItem?: OrderLineItemChangedDetails; } /** @oneof */ interface V1LineItemDeltaDeltaOneOf { /** The line item was added. */ lineItemAdded?: boolean; /** The line item was modified. */ changedDetails?: ItemChangedDetails; /** The line item was added. */ lineItemRemoved?: boolean; } interface CommitDeltasResponse { /** Order after deltas are applied */ order?: Order; } interface ArchiveOrderRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id?: string; } interface ArchiveOrderResponse { /** Archived order. */ order?: Order; } interface BulkArchiveOrdersRequest { /** * IDs of orders to archive. * @minSize 1 * @maxSize 1000 */ ids?: string[]; /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } interface BulkArchiveOrdersResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkArchiveOrdersByFilterRequest { /** Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter?: Record | null; } interface BulkArchiveOrdersByFilterResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface UnArchiveOrderRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id?: string; } interface UnArchiveOrderResponse { /** Unarchived order. */ order?: Order; } interface BulkUnArchiveOrdersRequest { /** * IDs or orders to unarchive. * @minSize 1 * @maxSize 1000 */ ids?: string[]; /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } interface BulkUnArchiveOrdersResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkUnArchiveOrdersByFilterRequest { /** Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter?: Record | null; } interface BulkUnArchiveOrdersByFilterResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface UpdateBuyerInfoRequest { /** * Order ID. * @minLength 1 * @maxLength 100 * @readonly */ _id?: string; /** Buyer info. */ buyerInfo?: BuyerInfoUpdate; } interface BuyerInfoUpdate { /** * Contact ID. * @format GUID */ contactId?: string | null; /** * Email associated with the buyer. * @format EMAIL */ email?: string | null; } interface UpdateBuyerInfoResponse { /** Updated order. */ order?: Order; } interface UpdateBuyerEmailRequest { /** * @minLength 1 * @maxLength 100 * @readonly */ _id?: string; /** @format EMAIL */ email?: string | null; } interface UpdateBuyerEmailResponse { order?: Order; } interface UpdateOrderShippingAddressRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id?: string; /** Shipping address and contact details to be updated. */ shippingAddress?: AddressWithContact; } interface UpdateOrderShippingAddressResponse { /** Updated order. */ order?: Order; } interface UpdateBillingContactDetailsRequest { /** * Order ID. * @minLength 1 * @maxLength 100 * @readonly */ _id?: string; /** Contact details. */ addressContactDetails?: FullAddressContactDetails; } interface UpdateBillingContactDetailsResponse { /** Updated order. */ order?: Order; } interface UpdateOrderLineItemRequest { /** * Order ID * @minLength 1 * @maxLength 100 */ _id: string; /** Order line item to update */ lineItem: OrderLineItem; } interface UpdateOrderLineItemResponse { /** Updated order data */ order?: Order; } interface UpdateOrderLineItemsRequest { /** * Order ID * @minLength 1 * @maxLength 100 */ orderId?: string; /** * Order line items to update * @minSize 1 * @maxSize 300 */ lineItems?: MaskedOrderLineItem[]; } interface MaskedOrderLineItem { /** Order line item to update */ lineItem?: OrderLineItem; } interface UpdateOrderLineItemsResponse { /** Updated order data */ order?: Order; } interface AddInternalActivityRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id?: string; /** Activity info. */ activity?: InternalActivity; } interface InternalActivity extends InternalActivityContentOneOf { /** Order refunded. */ orderRefunded?: OrderRefunded; /** Order placed. */ orderPlaced?: OrderPlaced; /** Order paid. Either by the store owner (for offline orders), or when an online transaction was confirmed. */ orderPaid?: OrderPaid; /** Order shipping status set as fulfilled. */ orderFulfilled?: OrderFulfilled; /** Order shipping status set as not fulfilled. */ orderNotFulfilled?: OrderNotFulfilled; /** Order canceled. */ orderCanceled?: OrderCanceled; /** Download link was sent (relevant for orders with digital line items). */ downloadLinkSent?: DownloadLinkSent; /** Shipping tracking number added to order. */ trackingNumberAdded?: TrackingNumberAdded; /** Shipping tracking number was edited. */ trackingNumberEdited?: TrackingNumberEdited; /** Shipping tracking link added to order. */ trackingLinkAdded?: TrackingLinkAdded; /** An email confirmation of order shipment was sent. */ shippingConfirmationEmailSent?: ShippingConfirmationEmailSent; /** Invoice was added to order. */ invoiceAdded?: InvoiceAdded; /** Invoice sent to customer via email. */ invoiceSent?: InvoiceSent; /** Email sent to fulfiller. */ fulfillerEmailSent?: FulfillerEmailSent; /** Shipping address was updated. */ shippingAddressEdited?: ShippingAddressEdited; /** Order email was updated. */ emailEdited?: EmailEdited; /** Email notification for pickup sent. */ pickupReadyEmailSent?: PickupReadyEmailSent; /** Order created as a result of items exchange. */ orderCreatedFromExchange?: OrderCreatedFromExchange; /** New exchange order created. */ newExchangeOrderCreated?: NewExchangeOrderCreated; /** Order partially paid. During the checkout for orders with deposit items. */ orderPartiallyPaid?: OrderPartiallyPaid; /** Draft order changes applied. */ draftOrderChangesApplied?: DraftOrderChangesApplied; /** Payment method is saved for order. */ savedPaymentMethod?: SavedPaymentMethod; /** Details of an authorized payment created. */ authorizedPaymentCreated?: AuthorizedPaymentCreated; /** Details of an authorized payment captured. */ authorizedPaymentCaptured?: AuthorizedPaymentCaptured; /** Details of an authorized payment voided. */ authorizedPaymentVoided?: AuthorizedPaymentVoided; /** * Details of an initiated refund process. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ refundInitiated?: RefundInitiated; /** * Details of a refunded payment. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ paymentRefunded?: PaymentRefunded; /** * Details of a failed payment refund. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ paymentRefundFailed?: PaymentRefundFailed; /** Details of refund to store credit. */ refundedAsStoreCredit?: RefundedAsStoreCredit; /** Details of a pending payment. */ paymentPending?: PaymentPending; /** Details of a canceled payment. */ paymentCanceled?: PaymentCanceled; /** Details of a declined payment. */ paymentDeclined?: PaymentDeclined; /** Order pending. */ orderPending?: OrderPending; /** Order rejected. */ orderRejected?: OrderRejected; /** Receipt was added for associated payment. */ receiptCreated?: ReceiptCreated; /** Receipt sent to customer. */ receiptSent?: ReceiptSent; /** Chargeback created for one of the order's payments. */ chargebackCreated?: ChargebackCreated; /** Chargeback reversed for one of the order's payments. */ chargebackReversed?: ChargebackReversed; /** * Internal activity ID. * @format GUID * @readonly */ _id?: string | null; /** * Internal activity author's email. * @format EMAIL * @readonly */ authorEmail?: string | null; /** * Internal activity creation date and time. * @readonly */ _createdDate?: Date | null; } /** @oneof */ interface InternalActivityContentOneOf { /** Order refunded. */ orderRefunded?: OrderRefunded; /** Order placed. */ orderPlaced?: OrderPlaced; /** Order paid. Either by the store owner (for offline orders), or when an online transaction was confirmed. */ orderPaid?: OrderPaid; /** Order shipping status set as fulfilled. */ orderFulfilled?: OrderFulfilled; /** Order shipping status set as not fulfilled. */ orderNotFulfilled?: OrderNotFulfilled; /** Order canceled. */ orderCanceled?: OrderCanceled; /** Download link was sent (relevant for orders with digital line items). */ downloadLinkSent?: DownloadLinkSent; /** Shipping tracking number added to order. */ trackingNumberAdded?: TrackingNumberAdded; /** Shipping tracking number was edited. */ trackingNumberEdited?: TrackingNumberEdited; /** Shipping tracking link added to order. */ trackingLinkAdded?: TrackingLinkAdded; /** An email confirmation of order shipment was sent. */ shippingConfirmationEmailSent?: ShippingConfirmationEmailSent; /** Invoice was added to order. */ invoiceAdded?: InvoiceAdded; /** Invoice sent to customer via email. */ invoiceSent?: InvoiceSent; /** Email sent to fulfiller. */ fulfillerEmailSent?: FulfillerEmailSent; /** Shipping address was updated. */ shippingAddressEdited?: ShippingAddressEdited; /** Order email was updated. */ emailEdited?: EmailEdited; /** Email notification for pickup sent. */ pickupReadyEmailSent?: PickupReadyEmailSent; /** Order created as a result of items exchange. */ orderCreatedFromExchange?: OrderCreatedFromExchange; /** New exchange order created. */ newExchangeOrderCreated?: NewExchangeOrderCreated; /** Order partially paid. During the checkout for orders with deposit items. */ orderPartiallyPaid?: OrderPartiallyPaid; /** Draft order changes applied. */ draftOrderChangesApplied?: DraftOrderChangesApplied; /** Payment method is saved for order. */ savedPaymentMethod?: SavedPaymentMethod; /** Details of an authorized payment created. */ authorizedPaymentCreated?: AuthorizedPaymentCreated; /** Details of an authorized payment captured. */ authorizedPaymentCaptured?: AuthorizedPaymentCaptured; /** Details of an authorized payment voided. */ authorizedPaymentVoided?: AuthorizedPaymentVoided; /** * Details of an initiated refund process. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ refundInitiated?: RefundInitiated; /** * Details of a refunded payment. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ paymentRefunded?: PaymentRefunded; /** * Details of a failed payment refund. * * > **Note:** A single `refundInitiated` activity can result in multiple `paymentRefunded` or `paymentRefundFailed` activities. * > In these cases, the `refundId` will be identical across the activities. */ paymentRefundFailed?: PaymentRefundFailed; /** Details of refund to store credit. */ refundedAsStoreCredit?: RefundedAsStoreCredit; /** Details of a pending payment. */ paymentPending?: PaymentPending; /** Details of a canceled payment. */ paymentCanceled?: PaymentCanceled; /** Details of a declined payment. */ paymentDeclined?: PaymentDeclined; /** Order pending. */ orderPending?: OrderPending; /** Order rejected. */ orderRejected?: OrderRejected; /** Receipt was added for associated payment. */ receiptCreated?: ReceiptCreated; /** Receipt sent to customer. */ receiptSent?: ReceiptSent; /** Chargeback created for one of the order's payments. */ chargebackCreated?: ChargebackCreated; /** Chargeback reversed for one of the order's payments. */ chargebackReversed?: ChargebackReversed; } /** Order placed */ interface OrderPlaced { } /** Order marked as paid, either by the store owner (for offline orders), or when an online transaction was confirmed */ interface OrderPaid { } /** Order shipping status set as fulfilled */ interface OrderFulfilled { } /** Order shipping status set as not fulfilled */ interface OrderNotFulfilled { } /** Order canceled. */ interface OrderCanceled { } /** A download link was sent (relevant for orders with digital line items) */ interface DownloadLinkSent { } /** Shipping tracking number was set */ interface TrackingNumberAdded { } /** Shipping tracking number was edited */ interface TrackingNumberEdited { } /** Shipping tracking link was set */ interface TrackingLinkAdded { } /** An email confirmation of order shipment was sent */ interface ShippingConfirmationEmailSent { } /** Invoice was set in the order */ interface InvoiceAdded { } /** Invoice sent to customer via email */ interface InvoiceSent { } /** Email was sent to fulfiller */ interface FulfillerEmailSent { } /** Shipping address was updated */ interface ShippingAddressEdited { } /** Order email was updated */ interface EmailEdited { } /** An email notification for pickup was sent */ interface PickupReadyEmailSent { } /** Order marked as partially paid when an online transaction was confirmed with partial minimal required amount of total sum */ interface OrderPartiallyPaid { } /** Order pending. */ interface OrderPending { } /** Order rejected. */ interface OrderRejected { } interface AddInternalActivityResponse { /** Updated order. */ order?: Order; /** * ID of the added internal activity. * Use this ID to either [update](https://bo.wix.com/wix-docs/rest/ecommerce/orders/update-activity) or [delete](https://bo.wix.com/wix-docs/rest/ecommerce/orders/delete-activity) the activity. * @format GUID */ activityId?: string; } interface AddActivityRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id: string; /** Activity info. */ activity: PublicActivity; } interface PublicActivity extends PublicActivityContentOneOf { /** Custom activity details. */ customActivity?: CustomActivity; /** Merchant commment. */ merchantComment?: MerchantComment; } /** @oneof */ interface PublicActivityContentOneOf { /** Custom activity details. */ customActivity?: CustomActivity; /** Merchant commment. */ merchantComment?: MerchantComment; } interface AddActivityResponse { /** Updated order. */ order?: Order; /** * ID of the added activity. * Use this ID to either [update](https://bo.wix.com/wix-docs/rest/ecommerce/orders/update-activity) or [delete](https://bo.wix.com/wix-docs/rest/ecommerce/orders/delete-activity) the activity. * @format GUID */ activityId?: string; } interface AddActivitiesRequest { /** * ID of the order to add activities to. * @format GUID */ orderId: string; /** * Activities to add to the order. * @maxSize 300 */ orderActivities?: Activity[]; } interface AddActivitiesResponse { /** Updated order. */ order?: Order; /** * IDs of the added activities. * @format GUID * @minSize 1 * @maxSize 300 */ activityIds?: string[]; } interface UpdateActivityRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id: string; /** * ID of the activity to update. * @format GUID */ activityId: string; /** Activity info. */ activity: PublicActivity; } interface UpdateActivityResponse { /** Updated order. */ order?: Order; } interface DeleteActivityRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id: string; /** * ID of the activity to delete. * @format GUID */ activityId: string; } interface DeleteActivityResponse { /** Updated order. */ order?: Order; } interface UpdateLineItemsDescriptionLinesRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id?: string; /** * Line items. * @minSize 1 * @maxSize 300 */ lineItems?: LineItemUpdate[]; } interface LineItemUpdate { /** * Line item ID. * @format GUID */ lineItemId?: string; /** * Description lines' info. * If description line already exists for this name, it will be replaced. * @minSize 1 * @maxSize 20 */ descriptionLines?: DescriptionLine[]; } interface UpdateLineItemsDescriptionLinesResponse { /** Updated order. */ order?: Order; } interface MarkOrderAsSeenByHumanRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id?: string; } interface MarkOrderAsSeenByHumanResponse { /** Updated order. */ order?: Order; } interface CancelOrderRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id: string; /** Whether to send an order canceled email to the buyer. */ sendOrderCanceledEmail?: boolean; /** * Custom note to be added to the email (optional). * @minLength 1 * @maxLength 1000 */ customMessage?: string | null; /** Whether to restock all items in the order. This will only apply to products in the Wix Stores inventory. */ restockAllItems?: boolean; } interface CancelOrderResponse { /** Canceled order. */ order?: Order; } interface UpdateOrderStatusRequest { /** * Order ID. * @format GUID */ orderId: string; /** New order status. */ status: OrderStatusWithLiterals; } interface UpdateOrderStatusResponse { /** Updated order. */ order?: Order; } interface MarkAsFulfilledRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id?: string; } interface MarkAsFulfilledResponse { /** Updated order. */ order?: Order; } interface BulkMarkAsFulfilledRequest { /** * IDs of orders to be marked as fulfilled. * @minSize 1 * @maxSize 1000 */ ids?: string[]; /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } interface BulkMarkAsFulfilledResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkMarkAsFulfilledByFilterRequest { /** Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter?: Record | null; } interface BulkMarkAsFulfilledByFilterResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface MarkAsUnfulfilledRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id?: string; } interface MarkAsUnfulfilledResponse { /** Updated order. */ order?: Order; } interface BulkMarkAsUnfulfilledRequest { /** * IDs of orders to be marked as not fulfilled. * @minSize 1 * @maxSize 1000 */ ids?: string[]; /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } interface BulkMarkAsUnfulfilledResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkMarkAsUnfulfilledByFilterRequest { /** Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter?: Record | null; } interface BulkMarkAsUnfulfilledByFilterResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkSetBusinessLocationRequest { /** * IDs of orders to update location for. * @minSize 1 * @maxSize 100 * @format GUID */ orderIds?: string[]; /** Business location. */ businessLocation?: Location; } interface BulkSetBusinessLocationResponse { /** * Bulk action results. * @minSize 1 * @maxSize 100 */ results?: BulkSetBusinessLocationResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkSetBusinessLocationResult { itemMetadata?: ItemMetadata; } interface V1MarkOrderAsPaidRequest { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id?: string; } interface V1MarkOrderAsPaidResponse { /** Updated order. */ order?: Order; } interface V1BulkMarkOrdersAsPaidRequest { /** * IDs of orders to mark as paid. * @minSize 1 * @maxSize 100 * @minLength 1 * @maxLength 100 */ ids?: string[]; } interface V1BulkMarkOrdersAsPaidResponse { /** * Items updated by the bulk action. * The Order entity within the results optimistically changes its payment status to paid, however this process is async. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface V1CreatePaymentGatewayOrderRequest { /** * eCom Order ID * @minLength 1 * @maxLength 100 */ ecomOrderId?: string; } interface V1CreatePaymentGatewayOrderResponse { /** ID of the order created in the payment gateway */ paymentGatewayOrderId?: string; } interface GetShipmentsRequest { /** * @minLength 1 * @maxLength 100 */ _id?: string; } interface GetShipmentsResponse { shipmentIds?: string[]; } interface AggregateOrdersRequest { /** Filter applied to original data */ filter?: Record | null; /** This is an object defining aggregation itself */ aggregation: Record | null; /** * Optional custom separator string that can be used to override default separator value '|' * for hierarchical responses of multifaceted aggregation requests like: * '{"aggregation": {"example_request_key": {"$count" : ["deliveryMethod", "shippingRegion"]}}}' * with example response for default '|' separator like: * '{"aggregates" :{"example_request_key": {"(Mail|Region 1)": 5, "(Pickup|Region 2)": 10}}}' * @minLength 1 * @maxLength 100 */ hierarchySeparatorOverride?: string | null; } interface AggregateOrdersResponse { aggregates?: Record | null; } interface DecrementItemsQuantityRequest { /** * Order ID * @minLength 1 * @maxLength 100 */ _id?: string; /** * Which items to decrement, and how much to decrement from each one * @minSize 1 * @maxSize 300 */ decrementData?: DecrementData[]; } interface DecrementData { /** * ID of the line item being decremented. * @format GUID */ lineItemId?: string; /** * Line item quantity being decremented. * @min 1 * @max 100000 */ decrementBy?: number; /** Whether to restock the line item (triggers inventory update). */ restock?: boolean; } interface DecrementItemsQuantityResponse { /** Updated order data */ order?: Order; } interface BulkUpdateOrderTagsRequest { /** * IDs of orders to update tags for. * @minSize 1 * @maxSize 100 * @format GUID */ orderIds: string[]; /** Tags to be added to orders */ assignTags?: TagsTags; /** Tags to be removed from orders */ unassignTags?: TagsTags; } /** * Common object for tags. * Should be use as in this example: * message Foo { * string id = 1; * ... * Tags tags = 5 * } * * example of taggable entity * { * id: "123" * tags: { * tags: { * tag_ids:["11","22"] * }, * private_tags: { * tag_ids: ["33", "44"] * } * } * } */ interface TagsTags { /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */ privateTags?: TagsTagList; /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ tags?: TagsTagList; } interface TagsTagList { /** * List of tag IDs * @maxSize 100 * @maxLength 5 */ tagIds?: string[]; } interface BulkUpdateOrderTagsResponse { /** * @minSize 1 * @maxSize 100 */ results?: BulkUpdateOrderTagsResult[]; bulkActionMetadata?: BulkActionMetadata; } interface BulkUpdateOrderTagsResult { itemMetadata?: ItemMetadata; } interface SendOrderUpdatedDomainEventRequest { /** * Order ID * @format GUID */ _id?: string; } interface SendOrderUpdatedDomainEventResponse { } interface Task { key?: TaskKey; executeAt?: Date | null; payload?: string | null; } interface TaskKey { appId?: string; instanceId?: string; subjectId?: string | null; } interface TaskAction extends TaskActionActionOneOf { complete?: Complete; cancel?: Cancel; reschedule?: Reschedule; } /** @oneof */ interface TaskActionActionOneOf { complete?: Complete; cancel?: Cancel; reschedule?: Reschedule; } interface Complete { } interface Cancel { } interface Reschedule { executeAt?: Date | null; payload?: string | null; } interface InvoiceSentEvent { _id?: IdAndVersion; /** @readonly */ data?: InvoiceFields; /** @readonly */ status?: InvoiceStatusWithLiterals; } interface IdAndVersion { /** @format GUID */ _id?: string | null; version?: number | null; } interface InvoiceFields { /** The invoice number allocated the invoice by the server. The number is limited to at most 11 digits. */ number?: string | null; /** * The invoice 3-letter currency code in [ISO-4217 alphabetic](https://www.iso.org/iso-4217-currency-codes.html) format. * @format CURRENCY */ currencyCode?: string | null; /** The invoice customer. The customer must be a contact of the site, with an email. */ customer?: Customer; /** * Invoice dates: issue date and due date are mandatory and provided when the invoice is created. * Last seen date is the optional date when the invoice was last seen be UoU. */ dates?: InvoiceDates; /** * Line items containing the details of the products or services relevant to the invoice, with their name, prices, * and quantity. There must be at least one line item on the invoice. */ lineItems?: LineItems; /** * Locale of the invoice, containing the language. * This field is not mandatory but is used for display purposes, to determine the appearance of numbers and dates * on the invoice. */ locale?: Locale; /** * The totals on the invoice. * The totals.subtotal, totals.total and totals.taxed_amount are calculated by the server based on the line items. * Alternatively, these fields can be provided in the invoice creation request, in this case, these values are fixed. * The totals contain fees and a discount, that apply to the invoice. */ totals?: TotalPrice; /** An optional discount on the invoice. */ discount?: Discount; /** The taxes of the invoice. */ taxes?: CalculatedTaxes; /** The payments on the invoice. The invoice has status paid if its payments cover the invoice total. */ payments?: Payments; /** Invoice metadata */ metaData?: MetaData; /** * Not used * @deprecated */ creationAdditional_BIInformation?: string | null; /** * The balance and amount paid on the invoice. * This read-only field is calculated based on the invoice totals and payments. * @readonly */ dynamicTotals?: InvoiceDynamicPriceTotals; /** The invoice title */ title?: string | null; /** Invoice custom fields */ customFields?: CustomFieldValue[]; /** * Not used * @deprecated */ designTemplateId?: string | null; /** * Not used * @deprecated */ createOrder?: boolean | null; /** The optional deposit of the invoice */ deposit?: Deposit; /** Associated checkout for this invoice */ ecomCheckoutId?: string | null; } interface Customer { contactId?: string | null; name?: string | null; email?: Email; address?: QuotesAddress; phone?: Phone; company?: Company; firstName?: string | null; lastName?: string | null; billingAddress?: CommonAddress; shippingAddress?: CommonAddress; } interface Email { address?: string; } interface QuotesAddress { street?: string | null; city?: string | null; zip?: string | null; state?: string | null; country?: string | null; /** @readonly */ description?: AddressDescription; } interface AddressDescription { content?: string; placement?: PlacementWithLiterals; } declare enum Placement { Unknown = "Unknown", Replace = "Replace", Before = "Before", After = "After" } /** @enumType */ type PlacementWithLiterals = Placement | 'Unknown' | 'Replace' | 'Before' | 'After'; interface Phone { number?: string; } interface Company { name?: string; _id?: string | null; } /** Physical address */ interface CommonAddress extends CommonAddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress; /** Main address line, usually street and number as free text. */ addressLine1?: string | null; /** * Country code. * @format COUNTRY */ country?: string | null; /** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */ subdivision?: string | null; /** City name. */ city?: string | null; /** Zip/postal code. */ postalCode?: string | null; /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string | null; } /** @oneof */ interface CommonAddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress; /** Main address line, usually street and number as free text. */ addressLine?: string | null; } interface Subdivision { /** Short subdivision code. */ code?: string; /** Subdivision full name. */ name?: string; } declare enum SubdivisionType { UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE", /** State */ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1", /** County */ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2", /** City/town */ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3", /** Neighborhood/quarter */ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4", /** Street/block */ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5", /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */ COUNTRY = "COUNTRY" } /** @enumType */ type SubdivisionTypeWithLiterals = SubdivisionType | 'UNKNOWN_SUBDIVISION_TYPE' | 'ADMINISTRATIVE_AREA_LEVEL_1' | 'ADMINISTRATIVE_AREA_LEVEL_2' | 'ADMINISTRATIVE_AREA_LEVEL_3' | 'ADMINISTRATIVE_AREA_LEVEL_4' | 'ADMINISTRATIVE_AREA_LEVEL_5' | 'COUNTRY'; /** Subdivision Concordance values */ interface StandardDetails { /** * subdivision iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. US-NY, GB-SCT, NO-30 * @maxLength 20 */ iso31662?: string | null; } interface InvoiceDates { /** use UTC midnight date to set the issue date according to the site time zone */ issueDate?: Date | null; /** use UTC midnight date to set the due date according to the site time zone */ dueDate?: Date | null; /** Valid time zones */ timeZoneCode?: string | null; /** * ignored in request use in response to get the site time zone * @readonly */ lastSeenDate?: Date | null; } interface LineItems { lineItems?: LineItem[]; } interface LineItem { /** @format GUID */ _id?: string; name?: string; description?: string | null; price?: BigDecimalWrapper; taxedTotal?: BigDecimalWrapper; quantity?: BigDecimalWrapper; taxes?: LineItemTax[]; /** The source of the line item */ source?: Source; /** The line-item level metadata. */ metadata?: LineItemMetaData; } interface BigDecimalWrapper { serializedValue?: number; } interface LineItemTax { name?: string; rate?: BigDecimalWrapper; code?: string | null; } interface Source { /** * Source app or service ID. * @readonly */ sourceId?: string; /** * App or service type. * @readonly */ sourceType?: SourceTypeWithLiterals; } declare enum SourceType { UNKNOWN_SOURCE_TYPE = "UNKNOWN_SOURCE_TYPE", WIX_APP = "WIX_APP", EXTERNAL = "EXTERNAL", ADMIN = "ADMIN", OTHER = "OTHER" } /** @enumType */ type SourceTypeWithLiterals = SourceType | 'UNKNOWN_SOURCE_TYPE' | 'WIX_APP' | 'EXTERNAL' | 'ADMIN' | 'OTHER'; interface LineItemMetaData { metadata?: Record; } interface Locale { /** ISO 639 alpha-2 or alpha-3 language code, or a language subtag */ language?: string; /** An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code. */ country?: string | null; invariant?: string | null; } interface TotalPrice { /** the subtotal of the line items without the tax reduction */ subtotal?: BigDecimalWrapper; /** the total price taking into account the itemized fees and the taxes */ total?: BigDecimalWrapper; fees?: ItemizedFee[]; discountAmount?: BigDecimalWrapper; taxedAmount?: BigDecimalWrapper; } interface ItemizedFee { name?: string; price?: BigDecimalWrapper; } interface Discount extends DiscountOneDiscountTypeOneOf { /** Discount as percentage value. */ percentage?: BigDecimalWrapper; } /** @oneof */ interface DiscountOneDiscountTypeOneOf { /** Discount as percentage value. */ percentage?: BigDecimalWrapper; } interface CalculatedTaxes { /** consider calculated or not - cannot enforce set */ taxes?: CalculatedTax[]; } interface CalculatedTax { name?: string; rate?: BigDecimalWrapper; /** the costs on which the taxes are applied */ taxable?: BigDecimalWrapper; /** the taxes as a result of the */ taxed?: BigDecimalWrapper; code?: string | null; } interface Payments { payments?: InvoicesPayment[]; } interface InvoicesPayment { /** document */ _id?: string; type?: string; amount?: BigDecimalWrapper; date?: Date | null; /** * The orderId of the order in cashier associated with the payment. * This field is populated for external payments that are charged by invoices via AddPayment endpoint. */ orderId?: string | null; /** * The transactionId corresponding to the orderId of the payment which are returned by cashier. * This field is populated for external payments that are charged by invoices via AddPayment endpoint as well. */ transactionId?: string | null; } interface MetaData { notes?: string | null; legalTerms?: string | null; sourceUrl?: string | null; sourceProperties?: Record; source?: string | null; sourceRefId?: string | null; /** Optional indicator whether to allow editing of the invoice by other applications other than the source. Default is true. */ allowEditByOthers?: boolean | null; } interface InvoiceDynamicPriceTotals { paidAmount?: BigDecimalWrapper; balance?: BigDecimalWrapper; } /** * A custom field value is used to add additional data to a financial document or to a financial document template. * The custom field value may be based on a custom field definition. */ interface CustomFieldValue { /** * The unique id of the custom field value * @format GUID * @readonly */ _id?: string | null; /** * The display name of the custom field value * @maxLength 50 */ displayName?: string; /** The optional namespace of the custom field value. This field may be used to indicate intended usage or source. */ namespace?: string | null; /** The group of the custom field indicates its intended placement in the financial document */ group?: CustomFieldGroupWithLiterals; /** The value of the custom field */ value?: Value; /** * The optional key of the custom field definition on which the custom field value is based * @maxLength 50 */ originCustomFieldKey?: string | null; } declare enum CustomFieldGroup { UNKNOWN_CUSTOM_FIELD_GROUP = "UNKNOWN_CUSTOM_FIELD_GROUP", BUSINESS_DETAILS = "BUSINESS_DETAILS", CUSTOMER_DETAILS = "CUSTOMER_DETAILS", DOCUMENT = "DOCUMENT", FOOTER = "FOOTER", OTHER = "OTHER" } /** @enumType */ type CustomFieldGroupWithLiterals = CustomFieldGroup | 'UNKNOWN_CUSTOM_FIELD_GROUP' | 'BUSINESS_DETAILS' | 'CUSTOMER_DETAILS' | 'DOCUMENT' | 'FOOTER' | 'OTHER'; interface Value { value?: string; valueType?: ValueTypeWithLiterals; } declare enum ValueType { UNKNOWN_VALUE_TYPE = "UNKNOWN_VALUE_TYPE", STRING = "STRING", DATE = "DATE", BOOLEAN = "BOOLEAN", NUMBER = "NUMBER" } /** @enumType */ type ValueTypeWithLiterals = ValueType | 'UNKNOWN_VALUE_TYPE' | 'STRING' | 'DATE' | 'BOOLEAN' | 'NUMBER'; interface Deposit { /** * The flat amount of the deposit. The flat amount of the deposit must be less than the invoice total. * @format DECIMAL_VALUE * @decimalValue options { gt:0.00 } */ flatAmount?: string; /** * The read-only percentage value of the deposit. * It is computed according to the flat_amount and the invoice total and is rounded to 2 digits precision. * @format DECIMAL_VALUE * @decimalValue options { gt:0.00, lte:100 } * @readonly */ percentage?: string; /** The type of the deposit. The default is FLAT. */ type?: DepositTypeWithLiterals; } declare enum DepositType { UNKNOWN = "UNKNOWN", FLAT = "FLAT", PERCENTAGE = "PERCENTAGE" } /** @enumType */ type DepositTypeWithLiterals = DepositType | 'UNKNOWN' | 'FLAT' | 'PERCENTAGE'; /** * InvoiceStatus allowed transitions based on current status: * Draft -> Deleted, Paid, Partially Paid, Sent * Sent -> Draft, Deleted, Void, Paid, Partially Paid, Processing, (Overdue) * Processing -> PartiallyPaid, Paid, Sent * Paid -> Void * PartiallyPaid -> Void, (PartialAndOverdue) * Void -> Deleted * Deleted */ declare enum InvoiceStatus { Draft = "Draft", Sent = "Sent", Processing = "Processing", Paid = "Paid", Overdue = "Overdue", Void = "Void", Deleted = "Deleted", PartiallyPaid = "PartiallyPaid", PartialAndOverdue = "PartialAndOverdue" } /** @enumType */ type InvoiceStatusWithLiterals = InvoiceStatus | 'Draft' | 'Sent' | 'Processing' | 'Paid' | 'Overdue' | 'Void' | 'Deleted' | 'PartiallyPaid' | 'PartialAndOverdue'; /** @docsIgnore */ type PreparePaymentCollectionApplicationErrors = { code?: 'PAYMENT_METHODS_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'ORDER_CANCELED'; description?: string; data?: Record; } | { code?: 'INVALID_AMOUNT'; description?: string; data?: Record; } | { code?: 'ORDER_ALREADY_PAID'; description?: string; data?: Record; } | { code?: 'NO_ASSOCIATED_ECOM_ORDER'; description?: string; data?: Record; } | { code?: 'ORDER_HAS_CHARGEBACKS'; description?: string; data?: Record; }; /** @docsIgnore */ type RecordManuallyCollectedPaymentApplicationErrors = { code?: 'ORDER_ALREADY_PAID'; description?: string; data?: Record; } | { code?: 'INVALID_AMOUNT'; description?: string; data?: Record; } | { code?: 'ORDER_CANCELED'; description?: string; data?: Record; }; /** @docsIgnore */ type PaymentCollectionMarkOrderAsPaidApplicationErrors = { code?: 'ORDER_ALREADY_PAID'; description?: string; data?: Record; } | { code?: 'PAYMENT_GATEWAY_ID_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'ORDER_HAS_CHARGEBACKS'; description?: string; data?: Record; }; /** @docsIgnore */ type PaymentCollectionCreatePaymentGatewayOrderApplicationErrors = { code?: 'ORDER_ALREADY_PAID'; description?: string; data?: Record; } | { code?: 'ORDER_CANCELED'; description?: string; data?: Record; }; /** @docsIgnore */ type TriggerRefundApplicationErrors = { code?: 'PAYMENTS_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'REFUND_NOT_AVAILABLE'; description?: string; data?: Record; } | { code?: 'INVALID_AMOUNT'; description?: string; data?: Record; }; /** @docsIgnore */ type VoidAuthorizedPaymentsApplicationErrors = { code?: 'PAYMENT_ALREADY_VOIDED'; description?: string; data?: Record; } | { code?: 'PAYMENT_ALREADY_CAPTURED'; description?: string; data?: Record; } | { code?: 'PAYMENT_NOT_AUTHORIZED'; description?: string; data?: Record; } | { code?: 'PAYMENT_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'PAYMENT_GATEWAY_ID_NOT_FOUND'; description?: string; data?: Record; }; /** @docsIgnore */ type CaptureAuthorizedPaymentsApplicationErrors = { code?: 'INVALID_AMOUNT'; description?: string; data?: Record; } | { code?: 'NOT_REGULAR_ONLINE_PAYMENT'; description?: string; data?: Record; } | { code?: 'PAYMENT_ALREADY_VOIDED'; description?: string; data?: Record; } | { code?: 'PAYMENT_ALREADY_CAPTURED'; description?: string; data?: Record; } | { code?: 'PAYMENT_NOT_AUTHORIZED'; description?: string; data?: Record; } | { code?: 'PAYMENT_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'PAYMENT_GATEWAY_ID_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'PAYMENT_HAS_PENDING_CAPTURE'; description?: string; data?: Record; }; /** @docsIgnore */ type GetOrderApplicationErrors = { code?: 'ORDER_NOT_FOUND'; description?: string; data?: Record; }; /** @docsIgnore */ type CreateOrderApplicationErrors = { code?: 'PURCHASED_DATE_CANNOT_BE_IN_FUTURE'; description?: string; data?: Record; }; /** @docsIgnore */ type UpdateOrderApplicationErrors = { code?: 'ORDER_IS_PENDING'; description?: string; data?: Record; } | { code?: 'ORDER_IS_REJECTED'; description?: string; data?: Record; }; /** @docsIgnore */ type CancelOrderApplicationErrors = { code?: 'ORDER_HAS_AUTHORIZED_TRANSACTION'; description?: string; data?: Record; } | { code?: 'ORDER_IS_PENDING'; description?: string; data?: Record; } | { code?: 'ORDER_IS_REJECTED'; description?: string; data?: Record; }; /** @docsIgnore */ type UpdateOrderStatusApplicationErrors = { code?: 'STATUS_NOT_SUPPORTED'; description?: string; data?: Record; } | { code?: 'UNSUPPORTED_TRANSITION'; description?: string; data?: Record; } | { code?: 'STATUS_ALREADY_SET'; description?: string; data?: Record; }; interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface OrderApprovedEnvelope { data: OrderApproved; metadata: EventMetadata; } /** * Triggered when an order is approved. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId ECOM.READ_ORDERS * @webhook * @eventType wix.ecom.v1.order_approved * @slug approved */ declare function onOrderApproved(handler: (event: OrderApprovedEnvelope) => void | Promise): void; interface OrderCanceledEnvelope { data: OrderCanceledEventOrderCanceled; metadata: EventMetadata; } /** * Triggered when an order is canceled. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId ECOM.READ_ORDERS * @webhook * @eventType wix.ecom.v1.order_canceled * @slug canceled */ declare function onOrderCanceled(handler: (event: OrderCanceledEnvelope) => void | Promise): void; interface OrderCommittedEnvelope { data: OrderDeltasCommitted; metadata: EventMetadata; } /** * Triggered when draft order changes are committed. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId ECOM.READ_ORDERS * @webhook * @eventType wix.ecom.v1.order_committed * @slug committed * @documentationMaturity preview */ declare function onOrderCommitted(handler: (event: OrderCommittedEnvelope) => void | Promise): void; interface OrderCreatedEnvelope { entity: Order; metadata: EventMetadata; } /** * Triggered when an order is created. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId ECOM.READ_ORDERS * @webhook * @eventType wix.ecom.v1.order_created * @slug created */ declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise): void; interface OrderFulfilledEnvelope { data: FulfillmentStatusUpdated; metadata: EventMetadata; } /** * Triggered when order fulfillment status is updated. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId ECOM.READ_ORDERS * @webhook * @eventType wix.ecom.v1.order_fulfilled * @slug fulfilled * @documentationMaturity preview */ declare function onOrderFulfilled(handler: (event: OrderFulfilledEnvelope) => void | Promise): void; interface OrderPaymentStatusUpdatedEnvelope { data: PaymentStatusUpdated; metadata: EventMetadata; } /** * Triggered when the payment status of an order is updated. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId ECOM.READ_ORDERS * @webhook * @eventType wix.ecom.v1.order_payment_status_updated * @slug payment_status_updated */ declare function onOrderPaymentStatusUpdated(handler: (event: OrderPaymentStatusUpdatedEnvelope) => void | Promise): void; interface OrderUpdatedEnvelope { entity: Order; metadata: EventMetadata; /** @hidden */ modifiedFields: Record; } /** * Triggered when an order is updated. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId ECOM.READ_ORDERS * @webhook * @eventType wix.ecom.v1.order_updated * @slug updated */ declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise): void; /** * Imports a single order with historical data while preserving original details and controlling side effects. * Can be used for initial import or update (delete-insert). * Only imported via ImportOrder API orders can be updated, Order.id used as key for update. * Order will be fully overridden. * @param order - Order to be imported * If order.order_settings.order_type and order.order_settings.custom_order_type not set than VIEW_ONLY will be used * @internal * @documentationMaturity preview * @requiredField order * @requiredField order.billingInfo.contactDetails * @requiredField order.channelInfo * @requiredField order.currencyConversionDetails.conversionRate * @requiredField order.currencyConversionDetails.originalCurrency * @requiredField order.fulfillmentStatus * @requiredField order.lineItems * @requiredField order.lineItems.catalogReference.appId * @requiredField order.lineItems.catalogReference.catalogItemId * @requiredField order.lineItems.itemType * @requiredField order.lineItems.price * @requiredField order.lineItems.productName * @requiredField order.lineItems.productName.original * @requiredField order.lineItems.quantity * @requiredField order.paymentStatus * @requiredField order.priceSummary * @requiredField order.status * @permissionId ecom:v1:order:imports:import_order * @fqn com.wix.ecom.orders.importer.v1.OrderImports.ImportOrder */ declare function importOrder(order: NonNullablePaths): Promise>; /** * Sets the current order increment ID for a site. This defines the starting number * for subsequent new orders created after migration. * @param counter - Order number counter to set. * Counter will be used as start of number sequence and used as order number with increment * @internal * @documentationMaturity preview * @requiredField counter * @permissionId ecom:v1:order:imports:set_order_number_counter * @fqn com.wix.ecom.orders.importer.v1.OrderImports.SetOrderNumberCounter */ declare function setOrderNumberCounter(counter: string, options?: SetOrderNumberCounterOptions): Promise>; interface SetOrderNumberCounterOptions { /** Whether to allow setting a lower counter than current value */ allowLowerCounter?: boolean; } /** * Bulk deletes previously imported orders. Only works on orders * that were created through the import process. * @param orderIds - List of order ids to be deleted. * Only orders imported via ImportOrders API can be deleted. * @internal * @documentationMaturity preview * @requiredField orderIds * @permissionId ecom:v1:order:imports:bulk_delete_imported_orders * @fqn com.wix.ecom.orders.importer.v1.OrderImports.BulkDeleteImportedOrders */ declare function bulkDeleteImportedOrders(orderIds: string[]): Promise>; /** * Prepares payment collection for given ecom order. This is the first of 2-step process of payment collection. * Here we ensure that payment collection is possible for given order and store and prepare payment gateway order for future charge. * 2nd step is an actual charge of prepared payment gateway order. This could be done either * via Wix-Cashier's API (https://bo.wix.com/wix-docs/rest/wix-cashier/pay/charge/charge-for-order) * or using Cashier Payments Widget (https://github.com/wix-private/cashier-client/tree/master/packages/cashier-payments-widget) * @param ecomOrderId - Ecom order ID. * @param amount - Amount to collect * @public * @documentationMaturity preview * @requiredField amount * @requiredField ecomOrderId * @permissionId ECOM.COLLECT_PAYMENTS * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.PreparePaymentCollection */ declare function preparePaymentCollection(ecomOrderId: string, amount: Price, options?: PreparePaymentCollectionOptions): Promise & { __applicationErrorsType?: PreparePaymentCollectionApplicationErrors; }>; interface PreparePaymentCollectionOptions { /** * Optional parameter. When present, payment collection will be performed using given payment gateway order. * Existing payment gateway order will be updated with a new amount. * When parameter is absent, new payment gateway order will be created and used for payment collection. */ paymentGatewayOrderId?: string | null; /** * Whether to delay capture of the payment. * Default: false * @deprecated Whether to delay capture of the payment. * Default: false * @replacedBy delayed_capture_settings.scheduled_action * @targetRemovalDate 2024-09-30 */ delayedCapture?: boolean; /** * Specifies whether payment collection is initiated by Merchant or User of User * Default: `true` * @internal */ merchantInitiated?: boolean | null; /** * Redirect urls which are used to return buyer to third party system. * @internal */ redirectUrls?: RedirectUrls; /** Delayed capture payment settings */ delayedCaptureSettings?: DelayedCaptureSettings; } /** * Provides payment collectability status for given order. If payment collection is possible * response will contain collectable amount for given ecom order. If not - response will contain * reason why payment collection is not possible. * @param ecomOrderId - Ecom order ID. * @public * @documentationMaturity preview * @requiredField ecomOrderId * @permissionId ECOM.COLLECT_PAYMENTS * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.GetPaymentCollectabilityStatus */ declare function getPaymentCollectabilityStatus(ecomOrderId: string): Promise>; /** * Records and approves new manual payment with provided custom amount on given order. * Existing pending payments are ignored. * Custom amount is expected to be less or equal remaining amount to be paid on order (affected by approved payments, refunds and gift card payments) * @param orderId - Order ID. * @param amount - Amount to be recorded as approved manual payment for given order * @internal * @documentationMaturity preview * @requiredField amount * @requiredField orderId * @permissionId ECOM.COLLECT_PAYMENTS * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.RecordManuallyCollectedPayment */ declare function recordManuallyCollectedPayment(orderId: string, amount: Price, options?: RecordManuallyCollectedPaymentOptions): Promise; interface RecordManuallyCollectedPaymentOptions { /** * Payment method name provided by user. * * For example, `"Wire transfer"`, `"Money order"`, `"Venmo"` or any other custom name. * @internal */ userDefinedPaymentMethodName?: UserDefinedPaymentMethodName; } /** * Marks the order as paid. `order.paymentStatus` field *eventually* changes to `PAID`. * In case the order already has an offline payment transaction associated with it * (usually when manual payment method is chosen at checkout) - This transaction will become approved. * In case the order has no payment transactions associated with it * (usually when the item is set to be paid offline after checkout or when an order is created from the backoffice) - A payment transaction * will be created and approved. * @param ecomOrderId - Ecom order ID. * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @permissionId ECOM.MODIFY_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.MarkOrderAsPaid */ declare function paymentCollectionMarkOrderAsPaid(ecomOrderId: string, options?: PaymentCollectionMarkOrderAsPaidOptions): Promise & { __applicationErrorsType?: PaymentCollectionMarkOrderAsPaidApplicationErrors; }>; interface PaymentCollectionMarkOrderAsPaidOptions { /** * Payment method name provided by user. * * For example, `"Wire transfer"`, `"Money order"`, `"Venmo"` or any other custom name. * @internal */ userDefinedPaymentMethodName?: UserDefinedPaymentMethodName; } /** * Marks multiple orders as paid. `order.paymentStatus` field *eventually* changes to `PAID`. * @param ecomOrderIds - IDs of orders to mark as paid. * @internal * @documentationMaturity preview * @requiredField ecomOrderIds * @permissionId ECOM.MODIFY_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.BulkMarkOrdersAsPaid */ declare function paymentCollectionBulkMarkOrdersAsPaid(ecomOrderIds: string[]): Promise>; /** * Checks whether this order can be refunded. * @param ecomOrderId - Order ID. * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @permissionId ECOM.READ_TRANSACTIONS * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.GetRefundabilityStatus */ declare function getRefundabilityStatus(ecomOrderId: string): Promise>; /** * Call this endpoint to create an order in the payment gateway system. The amount of the order would be either: * 1. An explicit amount provided in the request, or; * 2. If an explicit amount is not provided - the remaining amount to complete the payment of that eCom order. * As a result, an ID of the created payment gateway order would be returned. * You can then use Wix Payments APIs to approve that order or collect payment, which will eventually change the eCom order state (e.g mark it as paid). * @param ecomOrderId - Ecom order ID. * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @permissionId ECOM.MODIFY_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.CreatePaymentGatewayOrder */ declare function paymentCollectionCreatePaymentGatewayOrder(ecomOrderId: string, options?: PaymentCollectionCreatePaymentGatewayOrderOptions): Promise & { __applicationErrorsType?: PaymentCollectionCreatePaymentGatewayOrderApplicationErrors; }>; interface PaymentCollectionCreatePaymentGatewayOrderOptions { /** Information about the user who initiated the payment. */ chargedBy?: ChargedBy; } /** @param ecomOrderId - Order ID. * @param memberId - The member id. Do not attempt to get it from the request context, since in some cases the caller is not a member * but a user which is using the membership on behalf of the a member * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @requiredField memberId * @requiredField options.membershipCharges.appId * @requiredField options.membershipCharges.catalogReference * @requiredField options.membershipCharges.catalogReference.appId * @requiredField options.membershipCharges.catalogReference.catalogItemId * @requiredField options.membershipCharges.membershipId * @requiredField options.membershipCharges.membershipName * @requiredField options.membershipCharges.membershipName.original * @requiredField options.membershipCharges.rootCatalogItemId * @permissionId ECOM.MODIFY_TRANSACTIONS * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.ChargeMemberships */ declare function chargeMemberships(ecomOrderId: string, memberId: string, options?: NonNullablePaths): Promise; interface ChargeMembershipsOptions { /** * List of items to be paid by memberships * @minSize 1 * @maxSize 300 */ membershipCharges?: MembershipChargeItem[]; } /** * Calls corresponding payment providers and creates refund transactions for requested payments. * Updates order transactions based on refund results. * For requested payments with `TriggerRefundRequest.payments.external_refund = true` will not call payment providers and * will only update order transactions. * @param ecomOrderId - The order this refund related to * @param payments - Refund operations information * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @requiredField payments * @requiredField payments.paymentId * @permissionId ECOM.MODIFY_TRANSACTIONS * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.TriggerRefund */ declare function triggerRefund(ecomOrderId: string, payments: NonNullablePaths[], options?: TriggerRefundOptions): Promise & { __applicationErrorsType?: TriggerRefundApplicationErrors; }>; interface TriggerRefundOptions { /** Business model of a refund */ details?: RefundDetails; /** Side effect details related to refund */ sideEffects?: RefundSideEffects; } /** * Void authorized payments * Transaction statuses for related payments will be updated in async way * @param ecomOrderId - Wix eCommerce order ID * @param paymentIds - Payment IDs * @public * @documentationMaturity preview * @requiredField ecomOrderId * @requiredField paymentIds * @permissionId ECOM.ORDER_VOID_AUTHORIZED_PAYMENT * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.VoidAuthorizedPayments */ declare function voidAuthorizedPayments(ecomOrderId: string, paymentIds: string[]): Promise & { __applicationErrorsType?: VoidAuthorizedPaymentsApplicationErrors; }>; /** * Capture authorized payments * Transaction statuses for related payments will be updated in async way * @param ecomOrderId - Wix eCommerce order ID * @param payments - Capture payments information * @public * @documentationMaturity preview * @requiredField ecomOrderId * @requiredField payments * @requiredField payments.paymentId * @permissionId ECOM.ORDER_CAPTURE_AUTHORIZED_PAYMENT * @applicableIdentity APP * @fqn com.wix.ecom.orders.payments_collector.v1.PaymentsCollector.CaptureAuthorizedPayments */ declare function captureAuthorizedPayments(ecomOrderId: string, payments: NonNullablePaths[]): Promise & { __applicationErrorsType?: CaptureAuthorizedPaymentsApplicationErrors; }>; /** * Retrieves an order. * * * The `getOrder()` function returns a Promise that resolves when the specified order is retrieved. * * To retrieve an order's payment and refund details, including amounts, payment methods, and payment statuses, pass the order ID to [`listTransactionsForSingleOrder( )`](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/listtransactionsforsingleorder). * @param _id - ID of the order to retrieve. * @public * @requiredField _id * @permissionId ECOM.READ_ORDERS * @permissionId ECOM.ORDER_READ_ALL_EXTENDED_FIELDS * @applicableIdentity APP * @returns Fulfilled - The requested order. * @fqn com.wix.ecom.orders.v1.Orders.GetOrder */ declare function getOrder(_id: string): Promise & { __applicationErrorsType?: GetOrderApplicationErrors; }>; interface OrderSearchSpec extends SearchSpec { paging: 'cursor'; wql: [ { operators: ['$eq', '$in', '$ne', '$nin']; fields: [ 'channelInfo.type', 'fulfillmentStatus', 'paymentStatus', 'shippingInfo.region.name', 'shippingInfo.title', 'status' ]; sort: 'BOTH'; }, { operators: '*'; fields: [ '_createdDate', '_updatedDate', 'balanceSummary.authorized.amount', 'balanceSummary.pending.amount', 'balanceSummary.pendingRefund.amount', 'billingInfo.contactDetails.firstName', 'billingInfo.contactDetails.lastName', 'businessLocation._id', 'businessLocation.name', 'buyerInfo.email', 'number', 'priceSummary.total.amount', 'purchasedDate', 'shippingInfo.logistics.deliveryTime', 'shippingInfo.logistics.deliveryTimeSlot.from', 'shippingInfo.logistics.deliveryTimeSlot.to', 'taxInfo.totalExempt.amount', 'taxInfo.totalTax.amount' ]; sort: 'BOTH'; }, { operators: '*'; fields: ['archived', 'seenByAHuman']; sort: 'NONE'; }, { operators: ['$eq', '$in', '$ne', '$nin']; fields: [ '_id', 'buyerInfo.contactId', 'buyerInfo.memberId', 'channelInfo.externalOrderId', 'checkoutId', 'createdBy.userId', 'lineItems.subscriptionInfo._id' ]; sort: 'NONE'; }, { operators: ['$hasAll', '$hasSome']; fields: [ 'lineItems.catalogReference.appId', 'lineItems.catalogReference.catalogItemId', 'lineItems.locations._id' ]; sort: 'NONE'; }, { operators: ['$hasAll', '$hasSome']; fields: [ 'fulfillmentStatusesAggregate.statuses', 'lineItems.productName.original' ]; sort: 'BOTH'; } ]; } type CommonSearchWithEntityContext = Search; type OrderSearch = { /** Cursor paging options. Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | null; /** Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. @maxLength: 16000 */ cursor?: NonNullable['cursor'] | null; }; /** Filter object. Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: CommonSearchWithEntityContext['filter'] | null; /** List of sort objects. Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). @maxSize: 4 */ sort?: { /** Name of the field to sort by. @maxLength: 512 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { search: { SearchBuilder: () => _wix_sdk_types.SearchBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; SearchParams: _wix_sdk_types.SearchParamsFactory; Aggregation: _wix_sdk_types.AggregationFactory; }; }; /** * Creates an order. * * * The `createOrder()` function returns a Promise that resolves when the order is created. * * > **Notes:** * > + If an item is digital - `lineItems[i].itemType.preset: DIGITAL` - then `lineItems[i].digitalFile` must be provided. * > + If `lineItems[i].id` is passed, it must be either a valid GUID, or empty. * @param order - Order info. * @public * @requiredField order * @requiredField order.channelInfo * @requiredField order.currencyConversionDetails.conversionRate * @requiredField order.currencyConversionDetails.originalCurrency * @requiredField order.lineItems * @requiredField order.lineItems.catalogReference.appId * @requiredField order.lineItems.catalogReference.catalogItemId * @requiredField order.lineItems.itemType * @requiredField order.lineItems.price * @requiredField order.lineItems.productName * @requiredField order.lineItems.productName.original * @requiredField order.lineItems.quantity * @requiredField order.priceSummary * @permissionId ECOM.CREATE_ORDERS * @permissionId ECOM.ORDER_WRITE_ALL_EXTENDED_FIELDS * @applicableIdentity APP * @returns Newly created order. * @fqn com.wix.ecom.orders.v1.Orders.CreateOrder */ declare function createOrder(order: NonNullablePaths, options?: CreateOrderOptions): Promise & { __applicationErrorsType?: CreateOrderApplicationErrors; }>; interface CreateOrderOptions { /** Determine order lifecycle */ settings?: OrderCreationSettings; } /** * Updates an order. * * * The `updateOrder()` function returns a Promise that resolves when the specified order's information is updated. * * Currently, the following fields can be updated: * + `order.buyerInfo.email` * + `order.buyerLanguage` * + `order.weightUnit` * + `order.billingInfo.address` * + `order.billingInfo.contactDetails` * + `order.archived` * + `order.attributionSource` * + `order.seenByAHuman` * + `order.recipientInfo.address` * + `order.recipientInfo.contactDetails` * + `order.shippingInfo.logistics.shippingDestination.address` * + `order.shippingInfo.logistics.shippingDestination.contactDetails` * * To update a field's value, include the new value in the `order` object in the method parameters. * To remove a field's value, pass `null`. * * > **Note:** Removing `buyerInfo` or `contactDetails` fields results in an error. * * To update an order's payment status, use [`updatePaymentStatus( )`](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/updatepaymentstatus). * @param _id - Order ID. * @public * @requiredField _id * @requiredField order * @permissionId ECOM.MODIFY_ORDERS * @permissionId ECOM.ORDER_WRITE_ALL_EXTENDED_FIELDS * @applicableIdentity APP * @returns Newly created order. * @fqn com.wix.ecom.orders.v1.Orders.UpdateOrder */ declare function updateOrder(_id: string, order: UpdateOrder): Promise & { __applicationErrorsType?: UpdateOrderApplicationErrors; }>; interface UpdateOrder { /** * Order ID. * @format GUID * @readonly */ _id?: string | null; /** * Order number displayed in the site owner's dashboard (auto-generated). * @readonly */ number?: string; /** * Date and time the order was created. * @readonly * @immutable */ _createdDate?: Date | null; /** * Date and time the order was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** * Order line items. * @minSize 1 * @maxSize 300 * @readonly */ lineItems?: OrderLineItem[]; /** Buyer information. */ buyerInfo?: BuyerInfo; /** Order payment status. */ paymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals; /** * Order fulfillment status. * @readonly */ fulfillmentStatus?: FulfillmentStatusWithLiterals; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string | null; /** Weight measurement unit - defaults to site's weight unit. */ weightUnit?: WeightUnitWithLiterals; /** * Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. * @format CURRENCY */ currency?: string | null; /** Currency conversion details. For use with multi-currency sites. */ currencyConversionDetails?: CurrencyConversionDetails; /** * Whether tax is included in line item prices. * @immutable */ taxIncludedInPrices?: boolean; /** * Site language in which original values are shown. * @readonly * @immutable */ siteLanguage?: string | null; /** * Order price summary. * @readonly */ priceSummary?: PriceSummary; /** Billing address and contact details. */ billingInfo?: AddressWithContact; /** Shipping info and selected shipping option details. */ shippingInfo?: V1ShippingInformation; /** * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. * @maxLength 1000 */ buyerNote?: string | null; /** Order status. */ status?: OrderStatusWithLiterals; /** Whether order is archived. */ archived?: boolean | null; /** * Tax summary. * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * @deprecated Tax summary. * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxSummary?: TaxSummary; /** Tax information. */ taxInfo?: OrderTaxInfo; /** * Applied discounts. * @maxSize 320 */ appliedDiscounts?: AppliedDiscount[]; /** * Order activities. * @readonly * @maxSize 1000 */ activities?: Activity[]; /** Order attribution source. */ attributionSource?: AttributionSourceWithLiterals; /** * ID of the order's initiator. * @readonly */ createdBy?: CreatedBy; /** Information about the sales channel that submitted this order. */ channelInfo?: ChannelInfo; /** Whether a human has seen the order. Set when an order is clicked on in the dashboard. */ seenByAHuman?: boolean | null; /** * Checkout ID. * @format GUID */ checkoutId?: string | null; /** Custom fields. */ customFields?: CustomField[]; /** * Balance summary. * @readonly */ balanceSummary?: BalanceSummary; /** * Additional fees applied to the order. * @maxSize 100 */ additionalFees?: AdditionalFee[]; /** * Custom field data for the order object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. * @format GUID */ purchaseFlowId?: string | null; /** * Final recipient's address and contact details. * * This field represents who will ultimately receive the order. It may differ from `shippingInfo.logistics.shippingDestination` when: * + The chosen shipping option is a pickup point or store pickup, where `shippingDestination` contains the pickup location. * + No shipping option is selected. */ recipientInfo?: AddressWithContact; /** * Order tags. * * [Tags](https://dev.wix.com/docs/rest/business-management/tags/introduction) are labels attached to entities, allowing for flexible categorization and data management. */ tags?: Tags; /** * Date and time the order was originally purchased in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * Used for migration from external systems. * @immutable */ purchasedDate?: Date | null; /** Order location. */ businessLocation?: Location; /** * Pay after free trial price summary. Price summary that should be paid for subscriptions after free trial period. * @readonly */ payAfterFreeTrial?: PriceSummary; /** * Deposit price summary. Part of `priceSummary` that must be paid at checkout. * @internal * @readonly */ deposit?: PriceSummary; /** * Order-level settings and allowed actions. * @internal * @readonly * @immutable */ settings?: OrderSettings; /** * Forms associated with the Order's line items. * @internal * @readonly * @maxSize 1000 */ forms?: FormInfo[]; /** Summary of platform fees for this order, including totals by charge type and a breakdown of individual fees. */ platformFeeSummary?: PlatformFeeSummary; } /** * Updates up to 100 orders. * * * The `bulkUpdateOrders()` function returns a Promise that resolves when the specified orders' information is updated. * * Currently, the following fields can be updated: * + `order.buyerInfo.email` * + `order.buyerLanguage` * + `order.weightUnit` * + `order.billingInfo.address` * + `order.billingInfo.contactDetails` * + `order.archived` * + `order.attributionSource` * + `order.seenByAHuman` * + `order.recipientInfo.address` * + `order.recipientInfo.contactDetails` * + `order.shippingInfo.logistics.shippingDestination.address` * + `order.shippingInfo.logistics.shippingDestination.contactDetails` * * To update a field's value, include the new value in the `orders.order` object in the method parameters. * To remove a field's value, pass `null`. * * > **Note:** Removing `buyerInfo` or `contactDetails` fields results in an error. * * To update an order's payment status, use [`updatePaymentStatus( )`](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/updatepaymentstatus). * @param orders - Orders to update. * @public * @requiredField orders * @requiredField orders.order * @requiredField orders.order._id * @permissionId ECOM.MODIFY_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.v1.Orders.BulkUpdateOrders */ declare function bulkUpdateOrders(orders: NonNullablePaths[], options?: BulkUpdateOrdersOptions): Promise>; interface BulkUpdateOrdersOptions { /** * Whether to return the full order entities. * * Default: `false` */ returnEntity?: boolean; } /** @internal * @documentationMaturity preview * @requiredField identifiers * @requiredField identifiers._id * @requiredField identifiers.lineItemId * @requiredField lineItem * @permissionId ECOM.MODIFY_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.v1.Orders.UpdateOrderLineItem * @deprecated * @targetRemovalDate 2024-02-15 */ declare function updateOrderLineItem(identifiers: NonNullablePaths, lineItem: UpdateOrderLineItem): Promise>; interface UpdateOrderLineItemIdentifiers { /** * Order ID * @minLength 1 * @maxLength 100 */ _id: string; /** * Line item ID. * @immutable */ lineItemId?: string; } interface UpdateOrderLineItem { /** * Line item ID. * @immutable */ _id?: string; /** * Item name. * * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName; /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference; /** * Line item quantity. * @min 1 * @max 100000 */ quantity?: number; /** * Total discount for this line item's entire quantity. * @readonly */ totalDiscount?: Price; /** * Line item description lines. Used for display purposes for the cart, checkout and order. * @maxSize 20 */ descriptionLines?: DescriptionLine[]; /** Line item image. */ image?: string; /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: PhysicalProperties; /** Item type. Either a preset type or custom. */ itemType?: ItemType; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * * To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://www.wix.com/velo/reference/wix-ecom-backend/orderfulfillments/listfulfillmentsforsingleorder). * @format GUID */ fulfillerId?: string | null; /** * Number of items that were refunded. * @max 100000 */ refundQuantity?: number | null; /** * Number of items restocked. * * For a per-location breakdown, see `restockLocations`. * @max 100000 */ restockQuantity?: number | null; /** * Per-location restock breakdown. * * Populated when items are restocked to specific locations. * The sum of all `quantity` values equals `restockQuantity`. * Empty when no location-specific restock was performed. * @internal * @maxSize 5 * @readonly */ restockLocations?: RestockLocation[]; /** Line item price after line item discounts for display purposes. */ price?: Price; /** * Line item price before line item discounts for display purposes. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: Price; /** * Total price after discounts, and before tax. * @readonly */ totalPriceBeforeTax?: Price; /** * Total price after all discounts and tax. * @readonly */ totalPriceAfterTax?: Price; /** * Type of selected payment option for current item. * * Default: `FULL_PAYMENT_ONLINE` */ paymentOption?: PaymentOptionTypeWithLiterals; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxDetails?: ItemTaxFullDetails; /** Represents all the relevant tax details for a specific line item. */ taxInfo?: LineItemTaxInfo; /** Digital file identifier, relevant only for items with type DIGITAL. */ digitalFile?: DigitalFile; /** Subscription info. */ subscriptionInfo?: SubscriptionInfo; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription; /** * Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`. * @readonly */ depositAmount?: Price; /** * Line item locations. * * The location's total quantity must not exceed the line item quantity. * @maxSize 5 */ locations?: LocationAndQuantity[]; /** Total price **after** catalog discounts and line item discounts. */ lineItemPrice?: Price; /** Address used for tax calculation. */ taxableAddress?: TaxableAddress; /** * ID of the app managing the inventory. * @internal * @format GUID */ inventoryAppId?: string | null; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` */ priceUndetermined?: boolean; /** * Custom extended fields for the line item object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** * Modifier groups that were added to the item. * @readonly * @maxSize 10 */ modifierGroups?: ModifierGroup[]; /** * Line item ID in external systems. * @internal * @minLength 1 * @maxLength 100 * @immutable */ externalLineItemId?: string | null; } /** * Adds a merchant comment to an order. * > **Note:** Activities with type CustomActivity not supported * @param _id - Order ID. * @param activity - Activity info. * @internal * @documentationMaturity preview * @requiredField _id * @requiredField activity * @permissionId ECOM.MODIFY_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.v1.Orders.AddActivity * @deprecated * @replacedBy com.wix.ecom.orders.v1.OrdersService.AddActivities * @targetRemovalDate 2024-11-01 */ declare function addActivity(_id: string, activity: PublicActivity): Promise>; /** * Adds up to 300 activities to an order in a single request. * * * An order activity is a record of an action taken on an order. Use this endpoint to add merchant comments or record order-related events. * @param orderId - ID of the order to add activities to. * @public * @requiredField options.orderActivities.activityType * @requiredField orderId * @permissionId ECOM.MODIFY_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.v1.Orders.AddActivities */ declare function addActivities(orderId: string, options?: NonNullablePaths): Promise>; interface AddActivitiesOptions { /** * Activities to add to the order. * @maxSize 300 */ orderActivities?: Activity[]; } /** * Updates an order's activity. * @param activity - Activity info. * @internal * @documentationMaturity preview * @requiredField activity * @requiredField identifiers * @requiredField identifiers._id * @requiredField identifiers.activityId * @permissionId ECOM.MODIFY_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.v1.Orders.UpdateActivity */ declare function updateActivity(identifiers: NonNullablePaths, activity: PublicActivity): Promise>; interface UpdateActivityIdentifiers { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id: string; /** * ID of the activity to update. * @format GUID */ activityId: string; } /** * Delete's an order's activity. * * Only custom activities and merchant comments can be deleted. * @internal * @documentationMaturity preview * @requiredField identifiers * @requiredField identifiers._id * @requiredField identifiers.activityId * @permissionId ECOM.MODIFY_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.v1.Orders.DeleteActivity */ declare function deleteActivity(identifiers: NonNullablePaths): Promise>; interface DeleteActivityIdentifiers { /** * Order ID. * @minLength 1 * @maxLength 100 */ _id: string; /** * ID of the activity to delete. * @format GUID */ activityId: string; } /** * Cancels an order. * * * The `cancelOrder()` function returns a Promise that resolves when the specified order is canceled and the `order.status` field changes to `CANCELED`. * @param _id - Order ID. * @public * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.v1.Orders.CancelOrder */ declare function cancelOrder(_id: string, options?: CancelOrderOptions): Promise & { __applicationErrorsType?: CancelOrderApplicationErrors; }>; interface CancelOrderOptions { /** Whether to send an order canceled email to the buyer. */ sendOrderCanceledEmail?: boolean; /** * Custom note to be added to the email (optional). * @minLength 1 * @maxLength 1000 */ customMessage?: string | null; /** Whether to restock all items in the order. This will only apply to products in the Wix Stores inventory. */ restockAllItems?: boolean; } /** * Updates order status. * * >CANCELED and REJECTED are final statuses. Update from either of those will fail. * >Updates into INITIALIZED are not supported. * * Approving order: * APPROVED status can be set while order has one of [INITIALIZED, PENDING] statuses. * * Approving an order which was created with CreateOrderRequest.settings.order_approval_strategy = PAYMENT_METHOD_SAVED * will cause an error. * * Setting PENDING status: * Only orders in INITIALIZED status can be updated into PENDING. * @param orderId - Order ID. * @param status - New order status. * @internal * @documentationMaturity preview * @requiredField orderId * @requiredField status * @permissionId ECOM.ORDER_UPDATE_STATUS * @applicableIdentity APP * @fqn com.wix.ecom.orders.v1.Orders.UpdateOrderStatus */ declare function updateOrderStatus(orderId: string, status: OrderStatusWithLiterals): Promise & { __applicationErrorsType?: UpdateOrderStatusApplicationErrors; }>; /** @internal * @documentationMaturity preview * @requiredField options.aggregation * @permissionId ECOM.READ_ORDERS * @applicableIdentity APP * @fqn com.wix.ecom.orders.v1.Orders.AggregateOrders */ declare function aggregateOrders(options?: NonNullablePaths): Promise; interface AggregateOrdersOptions { /** Filter applied to original data */ filter?: Record | null; /** This is an object defining aggregation itself */ aggregation: Record | null; /** * Optional custom separator string that can be used to override default separator value '|' * for hierarchical responses of multifaceted aggregation requests like: * '{"aggregation": {"example_request_key": {"$count" : ["deliveryMethod", "shippingRegion"]}}}' * with example response for default '|' separator like: * '{"aggregates" :{"example_request_key": {"(Mail|Region 1)": 5, "(Pickup|Region 2)": 10}}}' * @minLength 1 * @maxLength 100 */ hierarchySeparatorOverride?: string | null; } /** * Synchronously update tags on multiple orders, by list of order IDs. * * > **Note:** If the same tag is passed to both the `assignTags` and `unassignTags` fields, it will be assigned. * @param orderIds - IDs of orders to update tags for. * @public * @requiredField orderIds * @permissionId ECOM.MODIFY_ORDERS * @permissionId ECOM.ORDER_MODIFY_PRIVATE_TAGS * @applicableIdentity APP * @fqn com.wix.ecom.orders.v1.Orders.BulkUpdateOrderTags */ declare function bulkUpdateOrderTags(orderIds: string[], options?: BulkUpdateOrderTagsOptions): Promise>; interface BulkUpdateOrderTagsOptions { /** Tags to be added to orders */ assignTags?: TagsTags; /** Tags to be removed from orders */ unassignTags?: TagsTags; } export { type CancelOrderApplicationErrors as $, type BulkUpdateOrdersOptions as A, type BulkDeleteImportedOrdersResponse as B, type CreatePaymentGatewayOrderResponse as C, type BulkUpdateOrdersResponse as D, type UpdateOrderLineItemIdentifiers as E, type UpdateOrderLineItem as F, type GetPaymentCollectabilityStatusResponse as G, type UpdateOrderLineItemResponse as H, type ImportOrderResponse as I, type PublicActivity as J, type AddActivityResponse as K, type AddActivitiesOptions as L, type MarkOrderAsPaidResponse as M, type AddActivitiesResponse as N, type Order as O, type Price as P, type UpdateActivityIdentifiers as Q, type RecordManuallyCollectedPaymentOptions as R, type SetOrderNumberCounterOptions as S, type TriggerRefundOptions as T, type UpdateOrder as U, type VoidAuthorizedPaymentsResponse as V, type UpdateActivityResponse as W, type DeleteActivityIdentifiers as X, type DeleteActivityResponse as Y, type CancelOrderOptions as Z, type CancelOrderResponse as _, type SetOrderNumberCounterResponse as a, MembershipPaymentStatus as a$, type OrderStatusWithLiterals as a0, type UpdateOrderStatusResponse as a1, type UpdateOrderStatusApplicationErrors as a2, type AggregateOrdersOptions as a3, type AggregateOrdersResponse as a4, type BulkUpdateOrderTagsOptions as a5, type BulkUpdateOrderTagsResponse as a6, type OrderApprovedEnvelope as a7, type OrderCanceledEnvelope as a8, type OrderCommittedEnvelope as a9, OrderActionType as aA, SpecificItemsCouponBehavior as aB, ChargeType as aC, DeltaPaymentOptionType as aD, InventoryAction as aE, WebhookIdentityType as aF, VersioningMode as aG, PreviewEmailType as aH, State as aI, SiteCreatedContext as aJ, Namespace as aK, DeleteStatus as aL, Origin as aM, ScheduledAction as aN, DurationUnit as aO, PaymentCollectabilityStatus as aP, PredefinedPaymentMethod as aQ, RefundableStatus as aR, NonRefundableReason as aS, ManuallyRefundableReason as aT, RestockType as aU, TransactionStatus as aV, AuthorizationCaptureStatus as aW, AuthorizationVoidStatus as aX, Reason as aY, ActionType as aZ, ChargebackStatus as a_, type OrderCreatedEnvelope as aa, type OrderFulfilledEnvelope as ab, type OrderPaymentStatusUpdatedEnvelope as ac, type OrderUpdatedEnvelope as ad, DescriptionLineType as ae, DimensionsUnit as af, ItemTypePreset as ag, PaymentOptionType as ah, JurisdictionType as ai, SubscriptionFrequency as aj, AdjustmentType as ak, TaxableAddressType as al, PaymentStatusEnumPaymentStatus as am, FulfillmentStatus as an, WeightUnit as ao, VatType as ap, PickupMethod as aq, OrderStatus as ar, DiscountType as as, DiscountReason as at, LineItemQuantityChangeType as au, ActivityType as av, OrderActivityTypeEnumActivityType as aw, AttributionSource as ax, ChannelType as ay, AdditionalFeeSource as az, type PreparePaymentCollectionOptions as b, type ShippingRegion as b$, PaymentStatus as b0, RefundStatus as b1, SortOrder as b2, OrderApprovalStrategy as b3, Placement as b4, SubdivisionType as b5, SourceType as b6, CustomFieldGroup as b7, ValueType as b8, DepositType as b9, type BillingAdjustment as bA, type BillingAdjustmentPriceSummary as bB, type PriceDescription as bC, type LocationAndQuantity as bD, type TaxableAddress as bE, type TaxableAddressTaxableAddressDataOneOf as bF, type ExtendedFields as bG, type ModifierGroup as bH, type TranslatableString as bI, type ItemModifier as bJ, type BuyerInfo as bK, type BuyerInfoIdOneOf as bL, type CurrencyConversionDetails as bM, type PriceSummary as bN, type AddressWithContact as bO, type Address as bP, type StreetAddress as bQ, type AddressLocation as bR, type FullAddressContactDetails as bS, type VatId as bT, type V1ShippingInformation as bU, type DeliveryLogistics as bV, type DeliveryLogisticsAddressOneOf as bW, type PickupDetails as bX, type PickupAddress as bY, type DeliveryTimeSlot as bZ, type ShippingPrice as b_, InvoiceStatus as ba, type OrderLineItem as bb, type ProductName as bc, type CatalogReference as bd, type DescriptionLine as be, type DescriptionLineValueOneOf as bf, type DescriptionLineDescriptionLineValueOneOf as bg, type DescriptionLineName as bh, type PlainTextValue as bi, type Color as bj, type FocalPoint as bk, type PhysicalProperties as bl, type Dimensions as bm, type ItemType as bn, type ItemTypeItemTypeDataOneOf as bo, type RestockLocation as bp, type ItemTaxFullDetails as bq, type LineItemTaxInfo as br, type LineItemTaxBreakdown as bs, type DigitalFile as bt, type SubscriptionInfo as bu, type SubscriptionTitle as bv, type SubscriptionDescription as bw, type SubscriptionSettings as bx, type FreeTrialPeriod as by, type BillingSettings as bz, type PreparePaymentCollectionResponse as c, type ExternalReceipt as c$, type TaxSummary as c0, type OrderTaxInfo as c1, type OrderTaxBreakdown as c2, type AppliedDiscount as c3, type AppliedDiscountDiscountSourceOneOf as c4, type Coupon as c5, type MerchantDiscount as c6, type MerchantDiscountMerchantDiscountReasonOneOf as c7, type DiscountRule as c8, type DiscountRuleName as c9, type ShippingInformationChange as cA, type ShippingInformation as cB, type SavedPaymentMethod as cC, type AuthorizedPaymentCreated as cD, type AuthorizedPaymentCaptured as cE, type AuthorizedPaymentVoided as cF, type RefundInitiated as cG, type RefundedPayment as cH, type RefundedPaymentKindOneOf as cI, type RegularPaymentRefund as cJ, type GiftCardPaymentRefund as cK, type MembershipPaymentRefund as cL, type PaymentRefunded as cM, type PaymentRefundFailed as cN, type RefundedAsStoreCredit as cO, type PaymentPending as cP, type PaymentPendingPaymentDetailsOneOf as cQ, type RegularPayment as cR, type RegularPaymentPaymentMethodDetailsOneOf as cS, type CreditCardDetails as cT, type PaymentCanceled as cU, type PaymentCanceledPaymentDetailsOneOf as cV, type PaymentDeclined as cW, type PaymentDeclinedPaymentDetailsOneOf as cX, type ReceiptCreated as cY, type ReceiptCreatedReceiptInfoOneOf as cZ, type WixReceipt as c_, type LineItemDiscount as ca, type ItemCombination as cb, type ItemCombinationLineItem as cc, type Activity as cd, type ActivityContentOneOf as ce, type CustomActivity as cf, type MerchantComment as cg, type OrderRefunded as ch, type OrderCreatedFromExchange as ci, type NewExchangeOrderCreated as cj, type LineItemExchangeData as ck, type DraftOrderChangesApplied as cl, type OrderChange as cm, type OrderChangeValueOneOf as cn, type LineItemChanges as co, type LineItemQuantityChange as cp, type LineItemPriceChange as cq, type LineItemProductNameChange as cr, type LineItemDescriptionLineChange as cs, type LineItemModifiersChange as ct, type ManagedLineItem as cu, type ManagedDiscount as cv, type TranslatedValue as cw, type LineItemAmount as cx, type ManagedAdditionalFee as cy, type TotalPriceChange as cz, type PreparePaymentCollectionApplicationErrors as d, type UpdateInternalDocumentsEvent as d$, type ReceiptSent as d0, type ReceiptSentReceiptInfoOneOf as d1, type ChargebackCreated as d2, type ChargebackReversed as d3, type CreatedBy as d4, type CreatedByStringOneOf as d5, type ChannelInfo as d6, type CustomField as d7, type BalanceSummary as d8, type Balance as d9, type OrderDeltasCommitted as dA, type CommittedDiffs as dB, type CommittedDiffsShippingUpdateInfoOneOf as dC, type ItemChangedDetails as dD, type OrderLineItemChangedDetails as dE, type LineItemDelta as dF, type LineItemDeltaDeltaOneOf as dG, type AppliedDiscountDelta as dH, type AppliedDiscountDeltaDeltaOneOf as dI, type AdditionalFeeDelta as dJ, type AdditionalFeeDeltaDeltaOneOf as dK, type DraftOrderCommitSettings as dL, type InventoryUpdateDetails as dM, type ImportOrderRequest as dN, type SetOrderNumberCounterRequest as dO, type BulkDeleteImportedOrdersRequest as dP, type DomainEvent as dQ, type DomainEventBodyOneOf as dR, type EntityCreatedEvent as dS, type RestoreInfo as dT, type EntityUpdatedEvent as dU, type EntityDeletedEvent as dV, type ActionEvent as dW, type MessageEnvelope as dX, type IdentificationData as dY, type IdentificationDataIdOneOf as dZ, type AccountInfo as d_, type CashRounding as da, type AdditionalFee as db, type FulfillmentStatusesAggregate as dc, type Tags as dd, type TagList as de, type Location as df, type OrderSettings as dg, type OrderSettingsAllowedActionsOneOf as dh, type OrderSettingsEditableByOneOf as di, type CustomAllowedActions as dj, type OwnerApps as dk, type FormInfo as dl, type FormIdentifier as dm, type PlatformFeeSummary as dn, type PlatformFee as dp, type OrderApproved as dq, type OrdersExperiments as dr, type OrderRejectedEventOrderRejected as ds, type OrderItemsRestocked as dt, type V1RestockItem as du, type OrderImported as dv, type ImportedOrderDeleted as dw, type PaymentStatusUpdated as dx, type FulfillmentStatusUpdated as dy, type OrderCanceledEventOrderCanceled as dz, type RecordManuallyCollectedPaymentApplicationErrors as e, type SiteTransferred as e$, type UpdateInternalDocumentsEventOperationOneOf as e0, type InternalDocument as e1, type InternalDocumentUpdateOperation as e2, type DeleteByIdsOperation as e3, type DeleteByFilterOperation as e4, type InternalDocumentUpdateByFilterOperation as e5, type InternalUpdateExistingOperation as e6, type VersionedDocumentUpdateOperation as e7, type VersionedDeleteByIdsOperation as e8, type VersionedDocumentId as e9, type PreviewEmailByTypeRequest as eA, type PreviewEmailByTypeResponse as eB, type PreviewRefundEmailRequest as eC, type RefundDetails as eD, type RefundItem as eE, type LineItemRefund as eF, type AdditionalFeeRefund as eG, type ShippingRefund as eH, type PreviewRefundEmailResponse as eI, type PreviewCancelEmailRequest as eJ, type PreviewCancelEmailResponse as eK, type PreviewCancelRefundEmailRequest as eL, type PreviewCancelRefundEmailResponse as eM, type PreviewBuyerPaymentsReceivedEmailRequest as eN, type PreviewBuyerPaymentsReceivedEmailResponse as eO, type PreviewBuyerConfirmationEmailRequest as eP, type PreviewBuyerConfirmationEmailResponse as eQ, type PreviewBuyerPickupConfirmationEmailRequest as eR, type PreviewBuyerPickupConfirmationEmailResponse as eS, type PreviewShippingConfirmationEmailRequest as eT, type PreviewShippingConfirmationEmailResponse as eU, type PreviewResendDownloadLinksEmailRequest as eV, type PreviewResendDownloadLinksEmailResponse as eW, type MetaSiteSpecialEvent as eX, type MetaSiteSpecialEventPayloadOneOf as eY, type Asset as eZ, type SiteCreated as e_, type TriggerReindexRequest as ea, type TriggerReindexResponse as eb, type Empty as ec, type TriggerReindexOrderRequest as ed, type SendBuyerConfirmationEmailRequest as ee, type SendBuyerConfirmationEmailResponse as ef, type SendBuyerPaymentsReceivedEmailRequest as eg, type SendBuyerPaymentsReceivedEmailResponse as eh, type SendBuyerPickupConfirmationEmailRequest as ei, type SendBuyerPickupConfirmationEmailResponse as ej, type BulkSendBuyerPickupConfirmationEmailsRequest as ek, type BulkSendBuyerPickupConfirmationEmailsResponse as el, type SendBuyerShippingConfirmationEmailRequest as em, type SendBuyerShippingConfirmationEmailResponse as en, type BulkSendBuyerShippingConfirmationEmailsRequest as eo, type BulkSendBuyerShippingConfirmationEmailsResponse as ep, type SendMerchantOrderReceivedNotificationRequest as eq, type SendMerchantOrderReceivedNotificationResponse as er, type SendCancelRefundEmailRequest as es, type SendCancelRefundEmailResponse as et, type SendRefundEmailRequest as eu, type SendRefundEmailResponse as ev, type SendFulfillmentEmailRequest as ew, type SendFulfillmentEmailResponse as ex, type SendMerchantOrderReceivedPushRequest as ey, type SendMerchantOrderReceivedPushResponse as ez, type PaymentCollectionMarkOrderAsPaidOptions as f, type OrderTransactions as f$, type SiteDeleted as f0, type DeleteContext as f1, type SiteUndeleted as f2, type SitePublished as f3, type SiteUnpublished as f4, type SiteMarkedAsTemplate as f5, type SiteMarkedAsWixSite as f6, type ServiceProvisioned as f7, type ServiceRemoved as f8, type SiteRenamed as f9, type DelayedCaptureSettings as fA, type Duration as fB, type GetPaymentCollectabilityStatusRequest as fC, type RecordManuallyCollectedPaymentRequest as fD, type UserDefinedPaymentMethodName as fE, type UserDefinedPaymentMethodNameKindOneOf as fF, type RecordManuallyCollectedPaymentResponse as fG, type MarkOrderAsPaidRequest as fH, type BulkMarkOrdersAsPaidRequest as fI, type BulkOrderResult as fJ, type ItemMetadata as fK, type ApplicationError as fL, type BulkActionMetadata as fM, type GetRefundabilityStatusRequest as fN, type Refundability as fO, type RefundabilityAdditionalRefundabilityInfoOneOf as fP, type CreatePaymentGatewayOrderRequest as fQ, type ChargedBy as fR, type ChargeMembershipsRequest as fS, type MembershipChargeItem as fT, type MembershipName as fU, type ServiceProperties as fV, type ChargeMembershipsResponse as fW, type TriggerRefundRequest as fX, type RefundSideEffects as fY, type RestockInfo as fZ, type RestockItem as f_, type SiteHardDeleted as fa, type NamespaceChanged as fb, type StudioAssigned as fc, type StudioUnassigned as fd, type SiteUrlChanged as fe, type SitePurgedExternally as ff, type OdeditorAssigned as fg, type OdeditorUnassigned as fh, type PicassoAssigned as fi, type PicassoUnassigned as fj, type WixelAssigned as fk, type WixelUnassigned as fl, type StudioTwoAssigned as fm, type StudioTwoUnassigned as fn, type UserDomainMediaEnabled as fo, type UserDomainMediaDisabled as fp, type EditorlessAssigned as fq, type EditorlessUnassigned as fr, type HasCustomEmailConfigurationsRequest as fs, type HasCustomEmailConfigurationsResponse as ft, type AddToAutomationMigrationPopulationRequest as fu, type AddToAutomationMigrationPopulationResponse as fv, type IsInAutomationMigrationPopulationRequest as fw, type IsInAutomationMigrationPopulationResponse as fx, type PreparePaymentCollectionRequest as fy, type RedirectUrls as fz, type PaymentCollectionMarkOrderAsPaidApplicationErrors as g, type DraftOrderDiffsBillingUpdateInfoOneOf as g$, type Payment as g0, type PaymentPaymentDetailsOneOf as g1, type PaymentReceiptInfoOneOf as g2, type RegularPaymentDetails as g3, type RegularPaymentDetailsPaymentMethodDetailsOneOf as g4, type CreditCardPaymentMethodDetails as g5, type AuthorizationDetails as g6, type AuthorizationCapture as g7, type AuthorizationActionFailureDetails as g8, type AuthorizationVoid as g9, type InternalQueryOrdersRequest as gA, type PlatformQuery as gB, type PlatformQueryPagingMethodOneOf as gC, type Sorting as gD, type PlatformPaging as gE, type CursorPaging as gF, type InternalQueryOrdersResponse as gG, type PlatformPagingMetadata as gH, type Cursors as gI, type QueryOrderRequest as gJ, type QueryOrderResponse as gK, type SearchOrdersRequest as gL, type CursorSearch as gM, type CursorSearchPagingMethodOneOf as gN, type CursorPagingMetadata as gO, type CreateOrderRequest as gP, type OrderCreationSettings as gQ, type OrderCreationSettingsEditableByOneOf as gR, type OrderCreateNotifications as gS, type CreateOrderResponse as gT, type UpdateOrderRequest as gU, type UpdateOrderResponse as gV, type BulkUpdateOrdersRequest as gW, type CommitDeltasRequest as gX, type DraftOrderDiffs as gY, type DraftOrderDiffsShippingUpdateInfoOneOf as gZ, type DraftOrderDiffsBuyerUpdateInfoOneOf as g_, type V1ScheduledAction as ga, type Chargeback as gb, type PaymentMethodName as gc, type GiftCardPaymentDetails as gd, type MembershipPaymentDetails as ge, type WixReceiptInfo as gf, type ExternalReceiptInfo as gg, type CashRoundingDetails as gh, type Refund as gi, type RefundTransaction as gj, type RefundStatusInfo as gk, type AggregatedRefundSummary as gl, type RefundItemsBreakdown as gm, type LineItemRefundSummary as gn, type CalculateRefundRequest as go, type CalculateRefundItemRequest as gp, type CalculateRefundResponse as gq, type CalculateRefundItemResponse as gr, type VoidAuthorizedPaymentsRequest as gs, type CaptureAuthorizedPaymentsRequest as gt, type ChargeSavedPaymentMethodRequest as gu, type ChargeSavedPaymentMethodResponse as gv, type DiffmatokyPayload as gw, type ErrorInformation as gx, type GetOrderRequest as gy, type GetOrderResponse as gz, type BulkMarkOrdersAsPaidResponse as h, type UpdateOrderStatusRequest as h$, type DraftOrderDiffsRecipientUpdateInfoOneOf as h0, type V1LineItemDelta as h1, type V1LineItemDeltaDeltaOneOf as h2, type CommitDeltasResponse as h3, type ArchiveOrderRequest as h4, type ArchiveOrderResponse as h5, type BulkArchiveOrdersRequest as h6, type BulkArchiveOrdersResponse as h7, type BulkArchiveOrdersByFilterRequest as h8, type BulkArchiveOrdersByFilterResponse as h9, type OrderCanceled as hA, type DownloadLinkSent as hB, type TrackingNumberAdded as hC, type TrackingNumberEdited as hD, type TrackingLinkAdded as hE, type ShippingConfirmationEmailSent as hF, type InvoiceAdded as hG, type InvoiceSent as hH, type FulfillerEmailSent as hI, type ShippingAddressEdited as hJ, type EmailEdited as hK, type PickupReadyEmailSent as hL, type OrderPartiallyPaid as hM, type OrderPending as hN, type OrderRejected as hO, type AddInternalActivityResponse as hP, type AddActivityRequest as hQ, type PublicActivityContentOneOf as hR, type AddActivitiesRequest as hS, type UpdateActivityRequest as hT, type DeleteActivityRequest as hU, type UpdateLineItemsDescriptionLinesRequest as hV, type LineItemUpdate as hW, type UpdateLineItemsDescriptionLinesResponse as hX, type MarkOrderAsSeenByHumanRequest as hY, type MarkOrderAsSeenByHumanResponse as hZ, type CancelOrderRequest as h_, type UnArchiveOrderRequest as ha, type UnArchiveOrderResponse as hb, type BulkUnArchiveOrdersRequest as hc, type BulkUnArchiveOrdersResponse as hd, type BulkUnArchiveOrdersByFilterRequest as he, type BulkUnArchiveOrdersByFilterResponse as hf, type UpdateBuyerInfoRequest as hg, type BuyerInfoUpdate as hh, type UpdateBuyerInfoResponse as hi, type UpdateBuyerEmailRequest as hj, type UpdateBuyerEmailResponse as hk, type UpdateOrderShippingAddressRequest as hl, type UpdateOrderShippingAddressResponse as hm, type UpdateBillingContactDetailsRequest as hn, type UpdateBillingContactDetailsResponse as ho, type UpdateOrderLineItemRequest as hp, type UpdateOrderLineItemsRequest as hq, type MaskedOrderLineItem as hr, type UpdateOrderLineItemsResponse as hs, type AddInternalActivityRequest as ht, type InternalActivity as hu, type InternalActivityContentOneOf as hv, type OrderPlaced as hw, type OrderPaid as hx, type OrderFulfilled as hy, type OrderNotFulfilled as hz, type GetRefundabilityStatusResponse as i, type TotalPrice as i$, type MarkAsFulfilledRequest as i0, type MarkAsFulfilledResponse as i1, type BulkMarkAsFulfilledRequest as i2, type BulkMarkAsFulfilledResponse as i3, type BulkMarkAsFulfilledByFilterRequest as i4, type BulkMarkAsFulfilledByFilterResponse as i5, type MarkAsUnfulfilledRequest as i6, type MarkAsUnfulfilledResponse as i7, type BulkMarkAsUnfulfilledRequest as i8, type BulkMarkAsUnfulfilledResponse as i9, type TaskKey as iA, type TaskAction as iB, type TaskActionActionOneOf as iC, type Complete as iD, type Cancel as iE, type Reschedule as iF, type InvoiceSentEvent as iG, type IdAndVersion as iH, type InvoiceFields as iI, type Customer as iJ, type Email as iK, type QuotesAddress as iL, type AddressDescription as iM, type Phone as iN, type Company as iO, type CommonAddress as iP, type CommonAddressStreetOneOf as iQ, type Subdivision as iR, type StandardDetails as iS, type InvoiceDates as iT, type LineItems as iU, type LineItem as iV, type BigDecimalWrapper as iW, type LineItemTax as iX, type Source as iY, type LineItemMetaData as iZ, type Locale as i_, type BulkMarkAsUnfulfilledByFilterRequest as ia, type BulkMarkAsUnfulfilledByFilterResponse as ib, type BulkSetBusinessLocationRequest as ic, type BulkSetBusinessLocationResponse as id, type BulkSetBusinessLocationResult as ie, type V1MarkOrderAsPaidRequest as ig, type V1MarkOrderAsPaidResponse as ih, type V1BulkMarkOrdersAsPaidRequest as ii, type V1BulkMarkOrdersAsPaidResponse as ij, type V1CreatePaymentGatewayOrderRequest as ik, type V1CreatePaymentGatewayOrderResponse as il, type GetShipmentsRequest as im, type GetShipmentsResponse as io, type AggregateOrdersRequest as ip, type DecrementItemsQuantityRequest as iq, type DecrementData as ir, type DecrementItemsQuantityResponse as is, type BulkUpdateOrderTagsRequest as it, type TagsTags as iu, type TagsTagList as iv, type BulkUpdateOrderTagsResult as iw, type SendOrderUpdatedDomainEventRequest as ix, type SendOrderUpdatedDomainEventResponse as iy, type Task as iz, type PaymentCollectionCreatePaymentGatewayOrderOptions as j, type ActionTypeWithLiterals as j$, type ItemizedFee as j0, type Discount as j1, type DiscountOneDiscountTypeOneOf as j2, type CalculatedTaxes as j3, type CalculatedTax as j4, type Payments as j5, type InvoicesPayment as j6, type MetaData as j7, type InvoiceDynamicPriceTotals as j8, type CustomFieldValue as j9, type ChannelTypeWithLiterals as jA, type AdditionalFeeSourceWithLiterals as jB, type OrderActionTypeWithLiterals as jC, type SpecificItemsCouponBehaviorWithLiterals as jD, type ChargeTypeWithLiterals as jE, type DeltaPaymentOptionTypeWithLiterals as jF, type InventoryActionWithLiterals as jG, type WebhookIdentityTypeWithLiterals as jH, type VersioningModeWithLiterals as jI, type PreviewEmailTypeWithLiterals as jJ, type StateWithLiterals as jK, type SiteCreatedContextWithLiterals as jL, type NamespaceWithLiterals as jM, type DeleteStatusWithLiterals as jN, type OriginWithLiterals as jO, type ScheduledActionWithLiterals as jP, type DurationUnitWithLiterals as jQ, type PaymentCollectabilityStatusWithLiterals as jR, type PredefinedPaymentMethodWithLiterals as jS, type RefundableStatusWithLiterals as jT, type NonRefundableReasonWithLiterals as jU, type ManuallyRefundableReasonWithLiterals as jV, type RestockTypeWithLiterals as jW, type TransactionStatusWithLiterals as jX, type AuthorizationCaptureStatusWithLiterals as jY, type AuthorizationVoidStatusWithLiterals as jZ, type ReasonWithLiterals as j_, type Value as ja, type Deposit as jb, type BaseEventMetadata as jc, type EventMetadata as jd, type AccountInfoMetadata as je, type OrderSearchSpec as jf, utils as jg, type DescriptionLineTypeWithLiterals as jh, type DimensionsUnitWithLiterals as ji, type ItemTypePresetWithLiterals as jj, type PaymentOptionTypeWithLiterals as jk, type JurisdictionTypeWithLiterals as jl, type SubscriptionFrequencyWithLiterals as jm, type AdjustmentTypeWithLiterals as jn, type TaxableAddressTypeWithLiterals as jo, type PaymentStatusEnumPaymentStatusWithLiterals as jp, type FulfillmentStatusWithLiterals as jq, type WeightUnitWithLiterals as jr, type VatTypeWithLiterals as js, type PickupMethodWithLiterals as jt, type DiscountTypeWithLiterals as ju, type DiscountReasonWithLiterals as jv, type LineItemQuantityChangeTypeWithLiterals as jw, type ActivityTypeWithLiterals as jx, type OrderActivityTypeEnumActivityTypeWithLiterals as jy, type AttributionSourceWithLiterals as jz, type PaymentCollectionCreatePaymentGatewayOrderApplicationErrors as k, type ChargebackStatusWithLiterals as k0, type MembershipPaymentStatusWithLiterals as k1, type PaymentStatusWithLiterals as k2, type RefundStatusWithLiterals as k3, type SortOrderWithLiterals as k4, type OrderApprovalStrategyWithLiterals as k5, type PlacementWithLiterals as k6, type SubdivisionTypeWithLiterals as k7, type SourceTypeWithLiterals as k8, type CustomFieldGroupWithLiterals as k9, createOrder as kA, updateOrder as kB, bulkUpdateOrders as kC, updateOrderLineItem as kD, addActivity as kE, addActivities as kF, updateActivity as kG, deleteActivity as kH, cancelOrder as kI, updateOrderStatus as kJ, aggregateOrders as kK, bulkUpdateOrderTags as kL, type ValueTypeWithLiterals as ka, type DepositTypeWithLiterals as kb, type InvoiceStatusWithLiterals as kc, type CommonSearchWithEntityContext as kd, onOrderApproved as ke, onOrderCanceled as kf, onOrderCommitted as kg, onOrderCreated as kh, onOrderFulfilled as ki, onOrderPaymentStatusUpdated as kj, onOrderUpdated as kk, importOrder as kl, setOrderNumberCounter as km, bulkDeleteImportedOrders as kn, preparePaymentCollection as ko, getPaymentCollectabilityStatus as kp, recordManuallyCollectedPayment as kq, paymentCollectionMarkOrderAsPaid as kr, paymentCollectionBulkMarkOrdersAsPaid as ks, getRefundabilityStatus as kt, paymentCollectionCreatePaymentGatewayOrder as ku, chargeMemberships as kv, triggerRefund as kw, voidAuthorizedPayments as kx, captureAuthorizedPayments as ky, getOrder as kz, type ChargeMembershipsOptions as l, type PaymentRefund as m, type TriggerRefundResponse as n, type TriggerRefundApplicationErrors as o, type VoidAuthorizedPaymentsApplicationErrors as p, type PaymentCapture as q, type CaptureAuthorizedPaymentsResponse as r, type CaptureAuthorizedPaymentsApplicationErrors as s, type GetOrderApplicationErrors as t, type OrderSearch as u, type SearchOrdersResponse as v, type CreateOrderOptions as w, type CreateOrderApplicationErrors as x, type UpdateOrderApplicationErrors as y, type MaskedOrder as z };