> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Package: subscriptions

# Namespace: draftSubscriptionContracts

# Webhook link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/draft-subscription-contracts/draft-subscription-contract-updated.md

# Webhook Permissions Scopes IDs:
Read draft subscription contracts: SCOPE.ECOM.DRAFT-SUBSCRIPTION-CONTRACT-READ

## Introduction

Triggered when a draft subscription contract is updated. Fires when line items are added or updated, and when the draft subscription contract is committed.

To react to the changes applied to a subscription, listen to the [Subscription Contract Committed](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/subscription-contracts/subscription-contract-committed.md) event instead. It holds every change that was applied.

---

## REST API

### Schema

```
Webhook: Draft Subscription Contract Updated
Description: Triggered when a draft subscription contract is updated. Fires when line items are added or updated, and when the draft subscription contract is committed.  To react to the changes applied to a subscription, listen to the [Subscription Contract Committed](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/subscription-contracts/subscription-contract-committed.md) event instead. It holds every change that was applied.
Event body:
 - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events.
 - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event.
 - name: slug | type: string | description: Event name.
 - name: entityId | type: string | description: ID of the entity associated with the event.
 - name: eventTime | type: string (date-time) | description: Event timestamp.
 - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR.
 - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
 - name: updatedEvent | type: object | description: Updated event details.
    - name: currentEntity | type: DraftSubscriptionContract | description: The entity after the update.
        - name: id | type: string | description: Draft subscription contract GUID.
        - name: subscriptionContractId | type: string | description: GUID of the subscription contract that the draft subscription contract was created from.
        - name: target | type: Target | description: Billing cycles that the draft subscription contract applies to.
           - ONE-OF:
              - name: contractTarget | type: ContractTarget | description: Applies the changes to the subscription contract, from the next billing cycle onward.
                 - name: nextCycleNumber | type: integer | description: Number of the next billing cycle.  Set it to `currentCycleNumber` + 1, where `currentCycleNumber` is returned by [Get Subscription Contract Draftability](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/draft-subscription-contracts/get-subscription-contract-draftability.md).
        - name: createdDate | type: string | description: Date and time the draft subscription contract was created.
        - name: updatedDate | type: string | description: Date and time the draft subscription contract was updated.  A draft subscription contract with the `DRAFT` status expires 24 hours after this time.
        - name: createdBy | type: CreatedBy | description: Identity that created the draft subscription contract.  Only this identity can retrieve, update, commit, or delete the draft subscription contract.
           - ONE-OF:
              - name: userId | type: string | description: User GUID. Returned when a Wix user created the draft subscription contract.
              - name: appId | type: string | description: App GUID. Returned when an app created the draft subscription contract.
              - name: memberId | type: string | description: Member GUID. Returned when a site member created the draft subscription contract.
           - name: identityType | type: IdentityType | description: Type of identity that created the draft subscription contract.
               - enum:
               -     USER: A Wix user.
               -     APP: An app.
               -     MEMBER: A site member.
        - name: status | type: DraftStatus | description: Status of the draft subscription contract.
           - enum:
           -     DRAFT: The draft subscription contract can be edited and committed.
           -     COMMITTED: The draft subscription contract was committed and its changes were applied to the subscription contract. It can't be edited or deleted.
        - name: lineItems | type: array<LineItemDetails> | description: Line items, each with how it changed compared to the subscription contract.  Removed line items are returned with `changeType` set to `REMOVED`.  In a draft subscription contract, `lineItem.subscriptionInfo.cycleNumber` is `0`.
           - ONE-OF:
              - name: changedDetails | type: LineItemChangedDetails | description: Line item values before the change.
                 - name: quantityBeforeChange | type: integer | description: Quantity before the change. Set only when the quantity changed.
                 - name: priceBeforeChange | type: Price | description: Price before the change. Set only when the price changed.
                    - name: amount | type: string | description: Amount.
                    - name: formattedAmount | type: string | description: Amount formatted with currency symbol.
                 - name: catalogReferenceOptionsBeforeChange | type: CatalogReferenceOptionsBeforeChange | description: Catalog reference options before the change. Set only when the catalog reference options changed.
                    - name: options | type: object | description: Catalog reference options. Absent when the line item had no options.
                 - name: productNameBeforeChange | type: ProductNameBeforeChange | description: Product name before the change. Set only when the product name changed.
                    - name: productName | type: ProductName | description: Product name. Absent when the line item had no product name.
                       - name: original | type: string | description: __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.md#request-envelope).  Min: 1 character. Max: 200 characters.
                       - name: translated | type: string | description: Item name translated into the buyer's language.  Min: 1 character. Max: 400 characters. Default: Same as `original`.
                 - name: descriptionLinesBeforeChange | type: DescriptionLinesBeforeChange | description: Description lines before the change. Set only when the description lines changed.
                    - name: descriptionLines | type: array<DescriptionLine> | description: Description lines. Empty when the line item had no description lines.
                       - ONE-OF:
                          - name: plainText | type: PlainTextValue | description: Description line plain text value.
                             - name: original | type: string | description: 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.md#request-envelope).
                             - name: translated | type: string | description: Description line plain text value translated into the buyer's language.  Default: Same as `original`.
                          - name: colorInfo | type: Color | description: Description line color value.
                             - name: original | type: string | description: 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.md#request-envelope).
                             - name: translated | type: string | description: Description line color name translated into the buyer's language.  Default: Same as `original`.
                             - name: code | type: string | description: HEX or RGB color code for display.
                       - name: name | type: DescriptionLineName | description: Description line name.
                          - name: original | type: string | description: 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.md#request-envelope).
                          - name: translated | type: string | description: Description line name translated into the buyer's language.  Default: Same as `original`.
                 - name: imageBeforeChange | type: ImageBeforeChange | description: Image before the change. Set only when the image changed.
                    - name: image | type: Image | description: Image. Absent when the line item had no image.
                       - name: id | type: string | description: Wix Media image GUID.
                       - name: url | type: string | description: Image URL.
                       - name: height | type: integer | description: Original image height.
                       - name: width | type: integer | description: Original image width.
                       - name: altText | type: string | description: Image alt text.
                       - name: filename | type: string | description: Image filename.
                 - name: physicalPropertiesBeforeChange | type: PhysicalPropertiesBeforeChange | description: Physical properties before the change. Set only when the physical properties changed.
                    - name: physicalProperties | type: PhysicalProperties | description: Physical properties. Absent when the line item had no physical properties.
                       - name: weight | type: number | description: Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request.
                       - name: sku | type: string | description: Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
                       - name: shippable | type: boolean | description: Whether this line item is shippable.
                 - name: itemTypeBeforeChange | type: ItemTypeBeforeChange | description: Item type before the change. Set only when the item type changed.
                    - name: itemType | type: ItemType | description: Item type. Absent when the line item had no item type.
                       - ONE-OF:
                          - name: preset | type: ItemTypePreset | description: Preset item type.
                                   - enum: UNRECOGNISED, PHYSICAL, DIGITAL, GIFT_CARD, SERVICE
                          - name: custom | type: string | description: Custom item type. When none of the preset types are suitable, specifies the custom type.
                 - name: fulfillerIdBeforeChange | type: FulfillerIdBeforeChange | description: Fulfiller GUID before the change. Set only when the fulfiller GUID changed.
                    - name: fulfillerId | type: string | description: Fulfiller GUID. Absent when the line item had no fulfiller.
                 - name: digitalFileBeforeChange | type: DigitalFileBeforeChange | description: Digital file before the change. Set only when the digital file changed.
                    - name: digitalFile | type: DigitalFile | description: Digital file. Absent when the line item had no digital file.
                       - name: fileId | type: string | description: GUID of the secure file in media.
                       - name: link | type: string | description: Link will exist after the digital links have been generated on the order.
                       - name: expirationDate | type: string | description: Link expiration time and date.
                 - name: priceDescriptionBeforeChange | type: PriceDescriptionBeforeChange | description: Price description before the change. Set only when the price description changed.
                    - name: priceDescription | type: PriceDescription | description: Price description. Absent when the line item had no price description.
                       - name: original | type: string | description: __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.md#request-envelope).
                       - name: translated | type: string | description: Price description translated into the buyer's language.  Default: Same as `original`.
                 - name: taxInfoBeforeChange | type: TaxInfoBeforeChange | description: Tax info before the change. Set only when the line item's tax group changed.
                    - name: taxInfo | type: LineItemTaxInfo | description: Tax info. Absent when the line item had no tax info.
                       - name: taxAmount | type: Price | description: Calculated tax, based on `taxable_amount` and `tax_rate`.
                       - name: taxableAmount | type: Price | description: Amount for which tax is calculated.
                       - name: taxRate | type: string | description: Tax rate %, as a decimal point.
                       - name: taxGroupId | type: string | description: Tax group GUID.
                       - name: taxIncludedInPrice | type: boolean | description: Indicates whether the price already includes tax.
                       - name: taxBreakdown | type: array<LineItemTaxBreakdown> | description: Tax information for a line item.
                          - name: jurisdiction | type: string | description: Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec".
                          - name: rate | type: string | description: Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000.
                          - name: taxAmount | type: Price | description: Amount of tax calculated for this line item.
                          - name: taxType | type: string | description: The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
                          - name: taxName | type: string | description: 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.
                          - name: jurisdictionType | type: JurisdictionType | description: Type of jurisdiction that taxes were calculated for.
                                   - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL
                          - name: nonTaxableAmount | type: Price | description: Non-taxable amount of the line item price.
                          - name: taxableAmount | type: Price | description: Taxable amount of the line item price.
                 - name: inventoryAppIdBeforeChange | type: InventoryAppIdBeforeChange | description: Inventory app GUID before the change. Set only when the inventory app GUID changed.
                    - name: inventoryAppId | type: string | description: Inventory app GUID. Absent when the line item had no inventory app.
                 - name: modifierGroupsBeforeChange | type: ModifierGroupsBeforeChange | description: Modifier groups before the change. Set only when the modifier groups changed.
                    - name: modifierGroups | type: array<ModifierGroup> | description: Modifier groups. Empty when the line item had no modifier groups.
                       - name: id | type: string | description: Modifier group GUID.
                       - name: name | type: TranslatableString | description: Modifier group name.
                          - name: original | type: string | description: __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.md#request-envelope).  Min: 1 character. Max: 200 characters.
                          - name: translated | type: string | description: String translated into the buyer's language.  Min: 1 character. Max: 400 characters. Default: Same as `original`.
                       - name: modifiers | type: array<ItemModifier> | description: List of modifiers in this group.
                          - name: id | type: string | description: Modifier GUID.
                          - name: quantity | type: integer | description: The quantity of this modifier.
                          - name: label | type: TranslatableString | description: Primary display label for the modifier.
                          - name: details | type: TranslatableString | description: Additional details.
                          - name: price | type: Price | description: The price of the modifier.
                 - name: priceUndeterminedBeforeChange | type: PriceUndeterminedBeforeChange | description: Price undetermined flag before the change. Set only when the price undetermined flag changed.
                    - name: priceUndetermined | type: boolean | description: Whether the price of the line item was undetermined.
           - name: lineItem | type: OrderLineItem | description: Line item.
              - name: id | type: string | description: Line item GUID.
              - name: productName | type: ProductName | description: Item name.  + Stores - `product.name` + Bookings - `service.info.name` + Events - `ticket.name`
              - name: catalogReference | type: CatalogReference | description: References to the line item's origin catalog. Empty for custom line items.
                 - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to.
                 - name: appId | type: string | description: GUID of the app providing the catalog.  You can get your app's GUID 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"`
                 - name: options | type: object | description: Additional item details in `key:value` pairs.  Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.  For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md).
              - name: quantity | type: integer | description: Line item quantity.
              - name: totalDiscount | type: Price | description: Total discount for this line item's entire quantity.
              - name: descriptionLines | type: array<DescriptionLine> | description: Line item description lines. Used for display purposes for the cart, checkout and order.
              - name: image | type: Image | description: Line item image.
                 - name: id | type: string | description: WixMedia image GUID.
                 - name: url | type: string | description: Image URL.
                 - name: height | type: integer | description: Original image height.
                 - name: width | type: integer | description: Original image width.
                 - name: altText | type: string | description: Image alt text.
                 - name: filename | type: string | description: Image filename.
              - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item. When relevant, contains information such as SKU and item weight.
              - name: itemType | type: ItemType | description: Item type. Either a preset type or custom.
              - name: fulfillerId | type: string | description: Fulfiller GUID. Field is empty when the line item is self-fulfilled. To get fulfillment information, pass the order GUID to [List Fulfillments For Single Order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-fulfillments/list-fulfillments-for-single-order.md).
              - name: refundQuantity | type: integer | description: Number of items that were refunded.
              - name: restockQuantity | type: integer | description: Number of items restocked.  For a per-location breakdown, see `restockLocations`.
              - name: price | type: Price | description: Line item price after line item discounts for display purposes.
              - name: priceBeforeDiscounts | type: Price | description: Line item price before line item discounts for display purposes. Defaults to `price` when not provided.
              - name: totalPriceBeforeTax | type: Price | description: Total price after discounts, and before tax.
              - name: totalPriceAfterTax | type: Price | description: Total price after all discounts and tax.
              - name: paymentOption | type: PaymentOptionType | description: Type of selected payment option for current item.  Default: `FULL_PAYMENT_ONLINE`
                   - enum:
                   -     FULL_PAYMENT_ONLINE: The entire payment for this item happens as part of the checkout.
                   -     FULL_PAYMENT_OFFLINE: The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods.
                   -     MEMBERSHIP: 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.
                   -     DEPOSIT_ONLINE: Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`.
                   -     MEMBERSHIP_OFFLINE: 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_ONLINE_WITH_OFFLINE_REMAINDER: Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.
              - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for a specific line item.
              - name: digitalFile | type: DigitalFile | description: Digital file identifier, relevant only for items with type DIGITAL.
              - name: subscriptionInfo | type: SubscriptionInfo | description: Subscription info.
                 - name: id | type: string | description: Subscription GUID.  For a subscription bought through Wix eCommerce, this is the GUID of the subscription contract the order was created from. To retrieve the subscription contract, call [Get Subscription Contract](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/subscription-contracts/get-subscription-contract.md).
                 - name: cycleNumber | type: integer | description: Billing cycle the order is for. For example, `3` for the third billing cycle of a subscription. When a subscription starts with a free trial, the order created at checkout is for cycle `0`.
                 - name: subscriptionSettings | type: SubscriptionSettings | description: Subscription detailed information.
                    - name: frequency | type: SubscriptionFrequency | description: Frequency unit of the billing cycle.
                           - enum: UNDEFINED, DAY, WEEK, MONTH, YEAR
                    - name: interval | type: integer | description: Number of frequency units in a billing cycle. For example, frequency `MONTH` with interval `3` means billing every 3 months.
                    - name: autoRenewal | type: boolean | description: Whether the subscription renews automatically at the end of each billing cycle.
                    - name: billingCycles | type: integer | description: Number of billing cycles before the subscription ends. Ignored when `autoRenewal` is `true`.
                    - name: enableCustomerCancellation | type: boolean | description: Whether the buyer can cancel the subscription.
                    - name: freeTrialPeriod | type: FreeTrialPeriod | description: Free trial period before the first billing cycle starts.  Returned only when the subscription has a free trial.
                       - name: frequency | type: SubscriptionFrequency | description: Frequency unit of the free trial period.
                               - enum: UNDEFINED, DAY, WEEK, MONTH, YEAR
                       - name: interval | type: integer | description: Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial.
                 - name: chargesDescription | type: string | description: Description of the charges that will be applied for subscription.
              - name: priceDescription | type: PriceDescription | description: Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
              - name: depositAmount | type: Price | description: Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`.
              - name: locations | type: array<LocationAndQuantity> | description: Line item locations.  The location's total quantity must not exceed the line item quantity.
                 - name: id | type: string | description: Location id in the associated owner app.
                 - name: quantity | type: integer | description: Quantity for specific location.
                 - name: name | type: string | description: Location name.
              - name: lineItemPrice | type: Price | description: Total price **after** catalog discounts and line item discounts.
              - name: taxableAddress | type: TaxableAddress | description: Address used for tax calculation.
                 - ONE-OF:
                    - name: addressType | type: TaxableAddressType | description: taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly.
                           - enum: BUSINESS, BILLING, SHIPPING
              - name: priceUndetermined | type: boolean | description: Whether the price is not yet defined, and will be updated after the order is created.  Default: `false`
              - name: fixedQuantity | type: boolean | description: Whether the line item quantity is fixed and cannot be changed.  Default: `false`
              - name: decimalQuantity | type: DecimalQuantity | description: Decimal-quantity metadata. Set when the line represents a non-integer purchase (e.g. 2.75 m² of fake grass).  When set, the line item must have `fixedQuantity` = true and be set with `quantity` = 1. The decimal value lives in `decimalQuantity.value`.
                 - ONE-OF:
                    - name: measurementUnit | type: MeasurementUnit | description: Unit the value is expressed in, selected from the standard `measurementUnit` enum.
                           - enum: UNSPECIFIED, ML, CL, L, CBM, MG, G, KG, MM, CM, M, SQM, OZ, LB, FLOZ, PT, QT, GAL, IN, FT, YD, SQFT
                    - name: otherUnit | type: string | description: Free-form unit name for standard units not in the `measurementUnit` enum (e.g. "hour", "minute", "session").
                 - name: value | type: string | description: The decimal quantity the buyer / merchant entered.  String-encoded decimal. The exact value is preserved — no rounding, no conversion to an integer.  Examples: "2.75", "1.5", "0.75".
                 - name: description | type: TranslatableString | description: Human-readable, pre-formatted display string for the quantity. For example, "2.75 square meters of fake grass". Always set alongside `value`; use this directly for display rather than composing your own string from `value` and `unit`.
              - name: extendedFields | type: ExtendedFields | description: Custom extended fields for the line item object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.
                 - name: namespaces | type: object | description: 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.md).
              - name: modifierGroups | type: array<ModifierGroup> | description: Modifier groups that were added to the item.
           - name: changeType | type: ChangeType | description: How the line item changed compared to the subscription contract.
               - enum:
               -     UNCHANGED: The value didn't change.
               -     ADDED: The value was added. It doesn't exist in the subscription contract.
               -     CHANGED: The value was changed.
               -     REMOVED: The value was removed.
        - name: discounts | type: array<DiscountDetails> | description: Discounts, each with its source and whether it's applied.
           - name: discount | type: AppliedDiscount | description: Discount.
              - ONE-OF:
                 - name: coupon | type: Coupon | description: Coupon applied by the customer.
                    - name: id | type: string | description: Coupon GUID.
                    - name: code | type: string | description: Coupon code.
                    - name: name | type: string | description: Coupon name.
                    - name: amount | type: Price | description: Total amount the coupon took off.
                 - name: merchantDiscount | type: MerchantDiscount | description: Discount applied manually by the merchant.
                    - ONE-OF:
                       - name: discountReason | type: DiscountReason | description: Predefined discount reason.
                               - enum:
                               -     UNSPECIFIED: Unknown discount reason.
                               -     EXCHANGED_ITEMS: Balance adjustment resulting from an item exchange.
                               -     BILLING_ADJUSTMENT: Proportional discount for a shortened subscription billing cycle. Applied when a subscription's billing date is moved earlier, reducing the cycle length.
                       - name: description | type: string | description: Custom discount description as free text.
                    - name: amount | type: Price | description: Discount amount.
                 - name: discountRule | type: DiscountRule | description: Automatic discount applied by the system based on configured discount rules.
                    - name: id | type: string | description: Discount rule GUID
                    - name: name | type: DiscountRuleName | description: Discount rule name
                       - name: original | type: string | description: Original discount rule name (in site's default language).
                       - name: translated | type: string | description: Translated discount rule name according to buyer language. Defaults to `original` when not provided.
                    - name: amount | type: Price | description: Total amount the discount rule took off.
              - name: discountType | type: DiscountType | description: Discount type.
                   - enum:
                   -     GLOBAL: Discount applies to the entire order.
                   -     SPECIFIC_ITEMS: Discount applies to specific items.
                   -     SHIPPING: Discount applies to shipping. For example, free shipping.
              - name: id | type: string | description: Discount GUID.
              - name: lineItemDiscounts | type: array<LineItemDiscount> | description: Line items the discount applies to, including the discount amount for each.
                 - name: id | type: string | description: Line item GUID.
                 - name: totalDiscount | type: Price | description: Total discount amount for this line item.
           - name: source | type: SourceType | description: Source of the discount.  Discounts are copied from the subscription contract, so `source` is `ORIGINAL_CONTRACT`.
               - enum:
               -     ORIGINAL_CONTRACT: Copied from the subscription contract.
               -     AUTOMATIC: Additional fee added automatically by the totals recalculation, as a result of changes in the draft subscription contract. A commit adds it to the subscription contract when its `applied` is `true`.
           - name: applied | type: boolean | description: Whether the discount is applied.  Set to `false` when a linked line item is removed, or when its price or catalog reference options change. Exception: when `settings.specificItemsCouponBehavior` is `ITEM_SUBTOTAL_INCLUDES_DISCOUNT`, a `GLOBAL` discount stays applied when a linked line item's price or catalog reference options change, and while it's still linked to another line item.  When you commit the draft subscription contract, a discount with `applied` set to `false` is removed from the subscription contract.
        - name: additionalFees | type: array<AdditionalFeeDetails> | description: Additional fees, each with its source and whether it's applied.
           - name: additionalFee | type: AdditionalFee | description: Additional fee.
              - name: code | type: string | description: Additional fee's unique code for future processing.
              - name: name | type: string | description: Name of additional fee.
              - name: price | type: Price | description: Additional fee's price.
              - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for additional fee.
              - name: providerAppId | type: string | description: SPI implementer's `appId`.
              - name: priceBeforeTax | type: Price | description: Additional fee's price before tax.
              - name: priceAfterTax | type: Price | description: Additional fee's price after tax.
              - name: id | type: string | description: Additional fee's id.
              - name: lineItemIds | type: array<string> | description: Optional - Line items associated with this additional fee. If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
              - name: source | type: AdditionalFeeSource | description: Specifies the entity that added the additional fee.
                   - enum:
                   -     SERVICE_PLUGIN: The additional fee was added by an additional fee service plugin.
                   -     ITEM: The additional fee was added to the item by a catalog or custom line item.
                   -     MANUAL: The additional fee was added manually on request.
                   -     SHIPPING: The additional fee was added by the shipping provider.
                   -     PLATFORM: The additional fee was added by the Wix eCommerce platform.
              - name: taxableAddress | type: TaxableAddress | description: Address type tax was calculated against for this fee.
           - name: taxDetails | type: AdditionalFeeTaxDetails | description: Tax details of the additional fee.
              - name: taxable | type: boolean | description: Whether the additional fee is taxable.
              - name: taxGroupId | type: string | description: GUID of the tax group used to calculate tax for the additional fee.
           - name: source | type: SourceType | description: Source of the additional fee.
               - enum:
               -     ORIGINAL_CONTRACT: Copied from the subscription contract.
               -     AUTOMATIC: Additional fee added automatically by the totals recalculation, as a result of changes in the draft subscription contract. A commit adds it to the subscription contract when its `applied` is `true`.
           - name: applied | type: boolean | description: Whether the additional fee is applied.  Set to `false` when a line item linked to the additional fee is removed.  When you commit the draft subscription contract, an additional fee with `applied` set to `false` is removed from the subscription contract.
        - name: priceSummary | type: PriceSummary | description: Price summary for the next billing cycle.  Recalculated and saved each time the draft subscription contract changes and when it's committed. Retrieving a draft subscription contract with the `DRAFT` status also recalculates it. For a draft subscription contract with the `COMMITTED` status, this is the price summary applied to the subscription contract.
           - name: subtotal | type: Price | description: Subtotal of all line items, before discounts and before tax.
           - name: shipping | type: Price | description: Total shipping price, before discounts and before tax.
           - name: tax | type: Price | description: Total tax applied to the order.
           - name: discount | type: Price | description: Total discount amount applied to the order.
           - name: total | type: Price | description: Order's total price after discounts and tax.
           - name: totalAdditionalFees | type: Price | description: Total additional fees before tax.
        - name: taxInfo | type: OrderTaxInfo | description: Tax information for the next billing cycle.  Recalculated and saved each time the draft subscription contract changes and when it's committed. Retrieving a draft subscription contract with the `DRAFT` status also recalculates it. For a draft subscription contract with the `COMMITTED` status, this is the tax information at the time of the commit.
           - name: totalTax | type: Price | description: Calculated tax, added from line items.
           - name: taxBreakdown | type: array<OrderTaxBreakdown> | description: 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.
              - name: taxName | type: string | description: The name of the tax against which this tax amount was calculated.
              - name: taxType | type: string | description: The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
              - name: jurisdiction | type: string | description: The name of the jurisdiction in which this tax detail applies.
              - name: jurisdictionType | type: JurisdictionType | description: The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special).
                   - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL
              - name: rate | type: string | description: The rate at which this tax detail was calculated.
              - name: aggregatedTaxAmount | type: Price | description: The sum of all the tax from line items that calculated by the tax identifiers.
           - name: taxExempt | type: boolean | description: Whether the order is exempt from tax calculations.  Default: `false`
        - name: weightUnit | type: WeightUnit | description: Weight measurement unit.
           - enum:
           -     UNSPECIFIED_WEIGHT_UNIT: Weight unit can't be classified due to an error.
           -     KG: Kilograms.
           -     LB: Pounds.
        - name: currency | type: string | description: Currency used for the draft subscription contract's pricing, as a three-letter currency code in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) alphabetic format.
        - name: tags | type: Tags | description: Tags assigned to the draft subscription contract.
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.
              - name: tagIds | type: array<string> | description: List of tag GUIDs.
           - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the draft subscription contract object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  Copied from the subscription contract when the draft subscription contract is created. Committing the draft subscription contract doesn't change the subscription contract's extended fields.
        - name: buyerInfoDetails | type: BuyerInfoDetails | description: Buyer information, with how it changed compared to the subscription contract.
           - name: buyerInfo | type: BuyerInfo | description: Buyer information for the next billing cycle.
              - ONE-OF:
                 - name: visitorId | type: string | description: Visitor GUID. Returned when the buyer isn't a logged-in site member.
                 - name: memberId | type: string | description: Member GUID. Returned when the buyer is a logged-in site member.
              - name: contactId | type: string | description: Contact GUID. Automatically created if one doesn't exist. For more information, see [Contacts API](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/introduction.md).
              - name: email | type: string | description: Buyer's email address.
           - name: changeType | type: ChangeType | description: How the value changed compared to the subscription contract.
               - enum:
               -     UNCHANGED: The value didn't change.
               -     ADDED: The value was added. It doesn't exist in the subscription contract.
               -     CHANGED: The value was changed.
               -     REMOVED: The value was removed.
        - name: shippingInfoDetails | type: ShippingInfoDetails | description: Shipping info, with how it changed compared to the subscription contract.
           - ONE-OF:
              - name: changedDetails | type: ShippingInfoChangedDetails | description: Shipping info before the change.
                 - name: shippingInfoBeforeChange | type: ShippingInformation | description: Shipping info before the change.
                    - name: carrierId | type: string | description: App Def Id of external provider which was a source of shipping info
                    - name: code | type: string | description: Unique code (or GUID) of selected shipping option. For example, `"usps_std_overnight"`.
                    - name: title | type: string | description: Shipping option title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
                    - name: logistics | type: DeliveryLogistics | description: Shipping logistics.
                       - ONE-OF:
                          - name: shippingDestination | type: AddressWithContact | description: Shipping destination address and contact details. For pickup orders, this contains the pickup location address, not the recipient's address.
                             - name: address | type: Address | description: Address.
                                - name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
                                - name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
                                - name: city | type: string | description: City name.
                                - name: postalCode | type: string | description: Postal or zip code.
                                - name: streetAddress | type: StreetAddress | description: Street address.
                                   - name: number | type: string | description: Street number.
                                   - name: name | type: string | description: Street name.
                                - name: addressLine | type: string | description: Main address line (usually street name and number).
                                - name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains apt, suite, floor.
                                - name: geocode | type: AddressLocation | description: Geocode object containing latitude and longitude coordinates.
                                   - name: latitude | type: number | description: Address latitude.
                                   - name: longitude | type: number | description: Address longitude.
                                - name: countryFullname | type: string | description: Country's full name.
                                - name: subdivisionFullname | type: string | description: Subdivision full-name.
                             - name: contactDetails | type: FullAddressContactDetails | description: Contact details.
                                - name: firstName | type: string | description: First name.
                                - name: lastName | type: string | description: Last name.
                                - name: phone | type: string | description: Phone number.
                                - name: company | type: string | description: Company name.
                                - name: vatId | type: VatId | description: Tax information (for Brazil only). If GUID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed.
                                   - name: id | type: string | description: Customer's tax GUID.
                                   - name: type | type: VatType | description: Tax type.  Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations
                                               - enum:
                                               -     UNSPECIFIED: 
                                               -     CPF: CPF - for individual tax payers.
                                               -     CNPJ: CNPJ - for corporations
                          - name: pickupDetails | type: PickupDetails | description: Pickup details for store pickup or pickup point orders.
                             - name: address | type: PickupAddress | description: Pickup address.
                                - name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
                                - name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
                                - name: city | type: string | description: City name.
                                - name: postalCode | type: string | description: Postal or zip code.
                                - name: streetAddress | type: StreetAddress | description: Street address object, with number, name, and apartment number in separate fields.
                                - name: addressLine | type: string | description: Main address line (usually street name and number).
                                - name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains apt, suite, floor.
                                - name: countryFullname | type: string | description: Country's full name.
                                - name: subdivisionFullname | type: string | description: Subdivision full-name.
                             - name: pickupMethod | type: PickupMethod | description: Pickup method
                                       - enum: STORE_PICKUP, PICKUP_POINT
                       - name: deliveryTime | type: string | description: Expected delivery time in free text. For example, `"3-5 business days"`.
                       - name: instructions | type: string | description: Instructions for the carrier. For example, `"Please knock on the door. If unanswered, please call contact number."`.
                       - name: deliveryTimeSlot | type: DeliveryTimeSlot | description: Expected delivery time slot with start and end times.
                          - name: from | type: string | description: Delivery slot starting time.
                          - name: to | type: string | description: Delivery slot ending time.
                    - name: cost | type: ShippingPrice | description: Shipping costs.
                       - name: price | type: Price | description: Shipping price for display purposes.
                       - name: totalPriceBeforeTax | type: Price | description: Total price of shipping after discounts (when relevant), and before tax.
                       - name: totalPriceAfterTax | type: Price | description: Shipping price after all discounts (if any exist), and after tax.
                       - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for a shipping.
                       - name: discount | type: Price | description: Shipping discount before tax.
                    - name: region | type: ShippingRegion | description: Shipping region.
                       - name: name | type: string | description: Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`.
           - name: shippingInfo | type: ShippingInformation | description: Shipping info for the next billing cycle.
           - name: changeType | type: ChangeType | description: How the value changed compared to the subscription contract.
               - enum:
               -     UNCHANGED: The value didn't change.
               -     ADDED: The value was added. It doesn't exist in the subscription contract.
               -     CHANGED: The value was changed.
               -     REMOVED: The value was removed.
        - name: billingInfoDetails | type: BillingInfoDetails | description: Billing address and contact details, with how they changed compared to the subscription contract.
           - ONE-OF:
              - name: changedDetails | type: BillingInfoChangedDetails | description: Billing address before the change.
                 - name: billingInfoBeforeChange | type: AddressWithContact | description: Billing address and contact details before the change.
           - name: billingInfo | type: AddressWithContact | description: Billing address and contact details for the next billing cycle.
           - name: changeType | type: ChangeType | description: How the value changed compared to the subscription contract.
               - enum:
               -     UNCHANGED: The value didn't change.
               -     ADDED: The value was added. It doesn't exist in the subscription contract.
               -     CHANGED: The value was changed.
               -     REMOVED: The value was removed.
        - name: recipientInfoDetails | type: RecipientInfoDetails | description: Recipient address and contact details, with how they changed compared to the subscription contract.
           - ONE-OF:
              - name: changedDetails | type: RecipientInfoChangedDetails | description: Recipient address before the change.
                 - name: recipientInfoBeforeChange | type: AddressWithContact | description: Recipient address and contact details before the change.
           - name: recipientInfo | type: AddressWithContact | description: Recipient address and contact details for the next billing cycle.
           - name: changeType | type: ChangeType | description: How the value changed compared to the subscription contract.
               - enum:
               -     UNCHANGED: The value didn't change.
               -     ADDED: The value was added. It doesn't exist in the subscription contract.
               -     CHANGED: The value was changed.
               -     REMOVED: The value was removed.
        - name: businessLocationDetails | type: BusinessLocationDetails | description: Business location for the next billing cycle. Copied from the subscription contract.
           - ONE-OF:
              - name: changedDetails | type: BusinessLocationChangedDetails | description: Business location before the change.
                 - name: businessLocationBeforeChange | type: Location | description: Business location before the change.
                    - name: id | type: string | description: Location GUID. Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction.md).
                    - name: name | type: string | description: Location name.
           - name: businessLocation | type: Location | description: Business location for the next billing cycle.
           - name: changeType | type: ChangeType | description: How the value changed compared to the subscription contract.
               - enum:
               -     UNCHANGED: The value didn't change.
               -     ADDED: The value was added. It doesn't exist in the subscription contract.
               -     CHANGED: The value was changed.
               -     REMOVED: The value was removed.
        - name: platformFeeSummary | type: PlatformFeeSummary | description: Summary of the platform fees of the order created at checkout, including totals by charge type and a breakdown of individual fees.  Copied from the subscription contract. Not recalculated in the draft subscription contract.
           - name: total | type: Price | description: Total sum of all platform fees.
           - name: totalPassOn | type: Price | description: Total amount of platform fees with `PASS_ON` charge type.
           - name: totalAbsorbed | type: Price | description: Total amount of platform fees with `ABSORBED` charge type.
           - name: fees | type: array<PlatformFee> | description: Specific information about each platform fee.
              - name: name | type: TranslatableString | description: Platform fee name.
              - name: amount | type: Price | description: Platform fee amount.
              - name: lineItemId | type: string | description: GUID of the line item the platform fee applies to.
              - name: chargeType | type: ChargeType | description: Platform fee charge type.
                   - enum:
                   -     PASS_ON: Platform fee passed on to buyer.  This type increases the order total, and is visible to the buyer and merchant as an additional fee.
                   -     ABSORBED: Platform fee absorbed by merchant.  This type does not increase the order total, and is only visible to the merchant.
              - name: percentageRate | type: string | description: 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%.
        - name: settings | type: DraftSubscriptionContractSettings | description: Draft subscription contract settings.
           - name: specificItemsCouponBehavior | type: SpecificItemsCouponBehavior | description: How coupons that apply to specific items were calculated for the subscription contract.
               - enum:
               -     UNDEFINED_COUPON_BEHAVIOR: Coupon calculation behavior was not specified.
               -     ITEM_SUBTOTAL_INCLUDES_DISCOUNT: Item subtotal includes coupon discount.
               -     LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT: Legacy flow. Discount is applied as to specific items after subtotal calculation.
        - name: subscriptionSettings | type: SubscriptionSettings | description: Billing schedule of the subscription contract.  Line items that you add to the draft subscription contract get these settings.
    - name: modifiedFields | type: Map<string,Value> | description: Fields that were updated and their values before the update.

```

---

## JavaScript SDK

### Schema

```
Webhook: onDraftSubscriptionContractUpdated
Description: Triggered when a draft subscription contract is updated. Fires when line items are added or updated, and when the draft subscription contract is committed.  To react to the changes applied to a subscription, listen to the [Subscription Contract Committed](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/subscription-contracts/subscription-contract-committed.md) event instead. It holds every change that was applied.
Payload: DraftSubscriptionContractUpdatedEnvelope
  - name: entity | type: DraftSubscriptionContract | description: none
     - name: _id | type: string | description: Draft subscription contract GUID.
     - name: subscriptionContractId | type: string | description: GUID of the subscription contract that the draft subscription contract was created from.
     - name: target | type: Target | description: Billing cycles that the draft subscription contract applies to.
        - ONE-OF:
           - name: contractTarget | type: ContractTarget | description: Applies the changes to the subscription contract, from the next billing cycle onward.
              - name: nextCycleNumber | type: integer | description: Number of the next billing cycle.  Set it to `currentCycleNumber` + 1, where `currentCycleNumber` is returned by [Get Subscription Contract Draftability](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/draft-subscription-contracts/get-subscription-contract-draftability.md).
     - name: _createdDate | type: Date | description: Date and time the draft subscription contract was created.
     - name: _updatedDate | type: Date | description: Date and time the draft subscription contract was updated.  A draft subscription contract with the `DRAFT` status expires 24 hours after this time.
     - name: createdBy | type: CreatedBy | description: Identity that created the draft subscription contract.  Only this identity can retrieve, update, commit, or delete the draft subscription contract.
        - ONE-OF:
           - name: userId | type: string | description: User GUID. Returned when a Wix user created the draft subscription contract.
           - name: appId | type: string | description: App GUID. Returned when an app created the draft subscription contract.
           - name: memberId | type: string | description: Member GUID. Returned when a site member created the draft subscription contract.
        - name: identityType | type: IdentityType | description: Type of identity that created the draft subscription contract.
             - enum:
             -     USER: A Wix user.
             -     APP: An app.
             -     MEMBER: A site member.
     - name: status | type: DraftStatus | description: Status of the draft subscription contract.
         - enum:
         -     DRAFT: The draft subscription contract can be edited and committed.
         -     COMMITTED: The draft subscription contract was committed and its changes were applied to the subscription contract. It can't be edited or deleted.
     - name: lineItems | type: array<LineItemDetails> | description: Line items, each with how it changed compared to the subscription contract.  Removed line items are returned with `changeType` set to `REMOVED`.  In a draft subscription contract, `lineItem.subscriptionInfo.cycleNumber` is `0`.
        - ONE-OF:
           - name: changedDetails | type: LineItemChangedDetails | description: Line item values before the change.
              - name: quantityBeforeChange | type: integer | description: Quantity before the change. Set only when the quantity changed.
              - name: priceBeforeChange | type: Price | description: Price before the change. Set only when the price changed.
                 - name: amount | type: string | description: Amount.
                 - name: formattedAmount | type: string | description: Amount formatted with currency symbol.
              - name: catalogReferenceOptionsBeforeChange | type: CatalogReferenceOptionsBeforeChange | description: Catalog reference options before the change. Set only when the catalog reference options changed.
                 - name: options | type: object | description: Catalog reference options. Absent when the line item had no options.
              - name: productNameBeforeChange | type: ProductNameBeforeChange | description: Product name before the change. Set only when the product name changed.
                 - name: productName | type: ProductName | description: Product name. Absent when the line item had no product name.
                    - name: original | type: string | description: __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.md#request-envelope).  Min: 1 character. Max: 200 characters.
                    - name: translated | type: string | description: Item name translated into the buyer's language.  Min: 1 character. Max: 400 characters. Default: Same as `original`.
              - name: descriptionLinesBeforeChange | type: DescriptionLinesBeforeChange | description: Description lines before the change. Set only when the description lines changed.
                 - name: descriptionLines | type: array<DescriptionLine> | description: Description lines. Empty when the line item had no description lines.
                    - ONE-OF:
                       - name: plainText | type: PlainTextValue | description: Description line plain text value.
                          - name: original | type: string | description: 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.md#request-envelope).
                          - name: translated | type: string | description: Description line plain text value translated into the buyer's language.  Default: Same as `original`.
                       - name: colorInfo | type: Color | description: Description line color value.
                          - name: original | type: string | description: 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.md#request-envelope).
                          - name: translated | type: string | description: Description line color name translated into the buyer's language.  Default: Same as `original`.
                          - name: code | type: string | description: HEX or RGB color code for display.
                    - name: name | type: DescriptionLineName | description: Description line name.
                       - name: original | type: string | description: 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.md#request-envelope).
                       - name: translated | type: string | description: Description line name translated into the buyer's language.  Default: Same as `original`.
              - name: imageBeforeChange | type: ImageBeforeChange | description: Image before the change. Set only when the image changed.
                 - name: image | type: string | description: Image. Absent when the line item had no image.
              - name: physicalPropertiesBeforeChange | type: PhysicalPropertiesBeforeChange | description: Physical properties before the change. Set only when the physical properties changed.
                 - name: physicalProperties | type: PhysicalProperties | description: Physical properties. Absent when the line item had no physical properties.
                    - name: weight | type: number | description: Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request.
                    - name: sku | type: string | description: Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
                    - name: shippable | type: boolean | description: Whether this line item is shippable.
              - name: itemTypeBeforeChange | type: ItemTypeBeforeChange | description: Item type before the change. Set only when the item type changed.
                 - name: itemType | type: ItemType | description: Item type. Absent when the line item had no item type.
                    - ONE-OF:
                       - name: preset | type: ItemTypePreset | description: Preset item type.
                                 - enum: UNRECOGNISED, PHYSICAL, DIGITAL, GIFT_CARD, SERVICE
                       - name: custom | type: string | description: Custom item type. When none of the preset types are suitable, specifies the custom type.
              - name: fulfillerIdBeforeChange | type: FulfillerIdBeforeChange | description: Fulfiller GUID before the change. Set only when the fulfiller GUID changed.
                 - name: fulfillerId | type: string | description: Fulfiller GUID. Absent when the line item had no fulfiller.
              - name: digitalFileBeforeChange | type: DigitalFileBeforeChange | description: Digital file before the change. Set only when the digital file changed.
                 - name: digitalFile | type: DigitalFile | description: Digital file. Absent when the line item had no digital file.
                    - name: fileId | type: string | description: GUID of the secure file in media.
                    - name: link | type: string | description: Link will exist after the digital links have been generated on the order.
                    - name: expirationDate | type: Date | description: Link expiration time and date.
              - name: priceDescriptionBeforeChange | type: PriceDescriptionBeforeChange | description: Price description before the change. Set only when the price description changed.
                 - name: priceDescription | type: PriceDescription | description: Price description. Absent when the line item had no price description.
                    - name: original | type: string | description: __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.md#request-envelope).
                    - name: translated | type: string | description: Price description translated into the buyer's language.  Default: Same as `original`.
              - name: taxInfoBeforeChange | type: TaxInfoBeforeChange | description: Tax info before the change. Set only when the line item's tax group changed.
                 - name: taxInfo | type: LineItemTaxInfo | description: Tax info. Absent when the line item had no tax info.
                    - name: taxAmount | type: Price | description: Calculated tax, based on `taxable_amount` and `tax_rate`.
                    - name: taxableAmount | type: Price | description: Amount for which tax is calculated.
                    - name: taxRate | type: string | description: Tax rate %, as a decimal point.
                    - name: taxGroupId | type: string | description: Tax group GUID.
                    - name: taxIncludedInPrice | type: boolean | description: Indicates whether the price already includes tax.
                    - name: taxBreakdown | type: array<LineItemTaxBreakdown> | description: Tax information for a line item.
                       - name: jurisdiction | type: string | description: Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec".
                       - name: rate | type: string | description: Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000.
                       - name: taxAmount | type: Price | description: Amount of tax calculated for this line item.
                       - name: taxType | type: string | description: The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
                       - name: taxName | type: string | description: 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.
                       - name: jurisdictionType | type: JurisdictionType | description: Type of jurisdiction that taxes were calculated for.
                                 - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL
                       - name: nonTaxableAmount | type: Price | description: Non-taxable amount of the line item price.
                       - name: taxableAmount | type: Price | description: Taxable amount of the line item price.
              - name: inventoryAppIdBeforeChange | type: InventoryAppIdBeforeChange | description: Inventory app GUID before the change. Set only when the inventory app GUID changed.
                 - name: inventoryAppId | type: string | description: Inventory app GUID. Absent when the line item had no inventory app.
              - name: modifierGroupsBeforeChange | type: ModifierGroupsBeforeChange | description: Modifier groups before the change. Set only when the modifier groups changed.
                 - name: modifierGroups | type: array<ModifierGroup> | description: Modifier groups. Empty when the line item had no modifier groups.
                    - name: _id | type: string | description: Modifier group GUID.
                    - name: name | type: TranslatableString | description: Modifier group name.
                       - name: original | type: string | description: __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.md#request-envelope).  Min: 1 character. Max: 200 characters.
                       - name: translated | type: string | description: String translated into the buyer's language.  Min: 1 character. Max: 400 characters. Default: Same as `original`.
                    - name: modifiers | type: array<ItemModifier> | description: List of modifiers in this group.
                       - name: _id | type: string | description: Modifier GUID.
                       - name: quantity | type: integer | description: The quantity of this modifier.
                       - name: label | type: TranslatableString | description: Primary display label for the modifier.
                       - name: details | type: TranslatableString | description: Additional details.
                       - name: price | type: Price | description: The price of the modifier.
              - name: priceUndeterminedBeforeChange | type: PriceUndeterminedBeforeChange | description: Price undetermined flag before the change. Set only when the price undetermined flag changed.
                 - name: priceUndetermined | type: boolean | description: Whether the price of the line item was undetermined.
        - name: lineItem | type: OrderLineItem | description: Line item.
           - name: _id | type: string | description: Line item GUID.
           - name: productName | type: ProductName | description: Item name.  + Stores - `product.name` + Bookings - `service.info.name` + Events - `ticket.name`
           - name: catalogReference | type: CatalogReference | description: References to the line item's origin catalog. Empty for custom line items.
              - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to.
              - name: appId | type: string | description: GUID of the app providing the catalog.  You can get your app's GUID 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"`
              - name: options | type: object | description: Additional item details in `key:value` pairs.  Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.  For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md).
           - name: quantity | type: integer | description: Line item quantity.
           - name: totalDiscount | type: Price | description: Total discount for this line item's entire quantity.
           - name: descriptionLines | type: array<DescriptionLine> | description: Line item description lines. Used for display purposes for the cart, checkout and order.
           - name: image | type: string | description: Line item image.
           - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item. When relevant, contains information such as SKU and item weight.
           - name: itemType | type: ItemType | description: Item type. Either a preset type or custom.
           - name: fulfillerId | type: string | description: Fulfiller GUID. Field is empty when the line item is self-fulfilled. To get fulfillment information, pass the order GUID to [List Fulfillments For Single Order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-fulfillments/list-fulfillments-for-single-order.md).
           - name: refundQuantity | type: integer | description: Number of items that were refunded.
           - name: restockQuantity | type: integer | description: Number of items restocked.  For a per-location breakdown, see `restockLocations`.
           - name: price | type: Price | description: Line item price after line item discounts for display purposes.
           - name: priceBeforeDiscounts | type: Price | description: Line item price before line item discounts for display purposes. Defaults to `price` when not provided.
           - name: totalPriceBeforeTax | type: Price | description: Total price after discounts, and before tax.
           - name: totalPriceAfterTax | type: Price | description: Total price after all discounts and tax.
           - name: paymentOption | type: PaymentOptionType | description: Type of selected payment option for current item.  Default: `FULL_PAYMENT_ONLINE`
                 - enum:
                 -     FULL_PAYMENT_ONLINE: The entire payment for this item happens as part of the checkout.
                 -     FULL_PAYMENT_OFFLINE: The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods.
                 -     MEMBERSHIP: 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.
                 -     DEPOSIT_ONLINE: Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`.
                 -     MEMBERSHIP_OFFLINE: 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_ONLINE_WITH_OFFLINE_REMAINDER: Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.
           - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for a specific line item.
           - name: digitalFile | type: DigitalFile | description: Digital file identifier, relevant only for items with type DIGITAL.
           - name: subscriptionInfo | type: SubscriptionInfo | description: Subscription info.
              - name: _id | type: string | description: Subscription GUID.  For a subscription bought through Wix eCommerce, this is the GUID of the subscription contract the order was created from. To retrieve the subscription contract, call [Get Subscription Contract](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/subscription-contracts/get-subscription-contract.md).
              - name: cycleNumber | type: integer | description: Billing cycle the order is for. For example, `3` for the third billing cycle of a subscription. When a subscription starts with a free trial, the order created at checkout is for cycle `0`.
              - name: subscriptionSettings | type: SubscriptionSettings | description: Subscription detailed information.
                 - name: frequency | type: SubscriptionFrequency | description: Frequency unit of the billing cycle.
                         - enum: UNDEFINED, DAY, WEEK, MONTH, YEAR
                 - name: interval | type: integer | description: Number of frequency units in a billing cycle. For example, frequency `MONTH` with interval `3` means billing every 3 months.
                 - name: autoRenewal | type: boolean | description: Whether the subscription renews automatically at the end of each billing cycle.
                 - name: billingCycles | type: integer | description: Number of billing cycles before the subscription ends. Ignored when `autoRenewal` is `true`.
                 - name: enableCustomerCancellation | type: boolean | description: Whether the buyer can cancel the subscription.
                 - name: freeTrialPeriod | type: FreeTrialPeriod | description: Free trial period before the first billing cycle starts.  Returned only when the subscription has a free trial.
                    - name: frequency | type: SubscriptionFrequency | description: Frequency unit of the free trial period.
                             - enum: UNDEFINED, DAY, WEEK, MONTH, YEAR
                    - name: interval | type: integer | description: Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial.
              - name: chargesDescription | type: string | description: Description of the charges that will be applied for subscription.
           - name: priceDescription | type: PriceDescription | description: Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
           - name: depositAmount | type: Price | description: Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`.
           - name: locations | type: array<LocationAndQuantity> | description: Line item locations.  The location's total quantity must not exceed the line item quantity.
              - name: _id | type: string | description: Location id in the associated owner app.
              - name: quantity | type: integer | description: Quantity for specific location.
              - name: name | type: string | description: Location name.
           - name: lineItemPrice | type: Price | description: Total price **after** catalog discounts and line item discounts.
           - name: taxableAddress | type: TaxableAddress | description: Address used for tax calculation.
              - ONE-OF:
                 - name: addressType | type: TaxableAddressType | description: taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly.
                         - enum: BUSINESS, BILLING, SHIPPING
           - name: priceUndetermined | type: boolean | description: Whether the price is not yet defined, and will be updated after the order is created.  Default: `false`
           - name: fixedQuantity | type: boolean | description: Whether the line item quantity is fixed and cannot be changed.  Default: `false`
           - name: decimalQuantity | type: DecimalQuantity | description: Decimal-quantity metadata. Set when the line represents a non-integer purchase (e.g. 2.75 m² of fake grass).  When set, the line item must have `fixedQuantity` = true and be set with `quantity` = 1. The decimal value lives in `decimalQuantity.value`.
              - ONE-OF:
                 - name: measurementUnit | type: MeasurementUnit | description: Unit the value is expressed in, selected from the standard `measurementUnit` enum.
                         - enum: UNSPECIFIED, ML, CL, L, CBM, MG, G, KG, MM, CM, M, SQM, OZ, LB, FLOZ, PT, QT, GAL, IN, FT, YD, SQFT
                 - name: otherUnit | type: string | description: Free-form unit name for standard units not in the `measurementUnit` enum (e.g. "hour", "minute", "session").
              - name: value | type: string | description: The decimal quantity the buyer / merchant entered.  String-encoded decimal. The exact value is preserved — no rounding, no conversion to an integer.  Examples: "2.75", "1.5", "0.75".
              - name: description | type: TranslatableString | description: Human-readable, pre-formatted display string for the quantity. For example, "2.75 square meters of fake grass". Always set alongside `value`; use this directly for display rather than composing your own string from `value` and `unit`.
           - name: extendedFields | type: ExtendedFields | description: Custom extended fields for the line item object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.
              - name: namespaces | type: object | description: 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.md).
           - name: modifierGroups | type: array<ModifierGroup> | description: Modifier groups that were added to the item.
        - name: changeType | type: ChangeType | description: How the line item changed compared to the subscription contract.
             - enum:
             -     UNCHANGED: The value didn't change.
             -     ADDED: The value was added. It doesn't exist in the subscription contract.
             -     CHANGED: The value was changed.
             -     REMOVED: The value was removed.
     - name: discounts | type: array<DiscountDetails> | description: Discounts, each with its source and whether it's applied.
        - name: discount | type: AppliedDiscount | description: Discount.
           - ONE-OF:
              - name: coupon | type: Coupon | description: Coupon applied by the customer.
                 - name: _id | type: string | description: Coupon GUID.
                 - name: code | type: string | description: Coupon code.
                 - name: name | type: string | description: Coupon name.
                 - name: amount | type: Price | description: Total amount the coupon took off.
              - name: merchantDiscount | type: MerchantDiscount | description: Discount applied manually by the merchant.
                 - ONE-OF:
                    - name: discountReason | type: DiscountReason | description: Predefined discount reason.
                             - enum:
                             -     UNSPECIFIED: Unknown discount reason.
                             -     EXCHANGED_ITEMS: Balance adjustment resulting from an item exchange.
                             -     BILLING_ADJUSTMENT: Proportional discount for a shortened subscription billing cycle. Applied when a subscription's billing date is moved earlier, reducing the cycle length.
                    - name: description | type: string | description: Custom discount description as free text.
                 - name: amount | type: Price | description: Discount amount.
              - name: discountRule | type: DiscountRule | description: Automatic discount applied by the system based on configured discount rules.
                 - name: _id | type: string | description: Discount rule GUID
                 - name: name | type: DiscountRuleName | description: Discount rule name
                    - name: original | type: string | description: Original discount rule name (in site's default language).
                    - name: translated | type: string | description: Translated discount rule name according to buyer language. Defaults to `original` when not provided.
                 - name: amount | type: Price | description: Total amount the discount rule took off.
           - name: discountType | type: DiscountType | description: Discount type.
                 - enum:
                 -     GLOBAL: Discount applies to the entire order.
                 -     SPECIFIC_ITEMS: Discount applies to specific items.
                 -     SHIPPING: Discount applies to shipping. For example, free shipping.
           - name: _id | type: string | description: Discount GUID.
           - name: lineItemDiscounts | type: array<LineItemDiscount> | description: Line items the discount applies to, including the discount amount for each.
              - name: _id | type: string | description: Line item GUID.
              - name: totalDiscount | type: Price | description: Total discount amount for this line item.
        - name: source | type: SourceType | description: Source of the discount.  Discounts are copied from the subscription contract, so `source` is `ORIGINAL_CONTRACT`.
             - enum:
             -     ORIGINAL_CONTRACT: Copied from the subscription contract.
             -     AUTOMATIC: Additional fee added automatically by the totals recalculation, as a result of changes in the draft subscription contract. A commit adds it to the subscription contract when its `applied` is `true`.
        - name: applied | type: boolean | description: Whether the discount is applied.  Set to `false` when a linked line item is removed, or when its price or catalog reference options change. Exception: when `settings.specificItemsCouponBehavior` is `ITEM_SUBTOTAL_INCLUDES_DISCOUNT`, a `GLOBAL` discount stays applied when a linked line item's price or catalog reference options change, and while it's still linked to another line item.  When you commit the draft subscription contract, a discount with `applied` set to `false` is removed from the subscription contract.
     - name: additionalFees | type: array<AdditionalFeeDetails> | description: Additional fees, each with its source and whether it's applied.
        - name: additionalFee | type: AdditionalFee | description: Additional fee.
           - name: code | type: string | description: Additional fee's unique code for future processing.
           - name: name | type: string | description: Name of additional fee.
           - name: price | type: Price | description: Additional fee's price.
           - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for additional fee.
           - name: providerAppId | type: string | description: SPI implementer's `appId`.
           - name: priceBeforeTax | type: Price | description: Additional fee's price before tax.
           - name: priceAfterTax | type: Price | description: Additional fee's price after tax.
           - name: _id | type: string | description: Additional fee's id.
           - name: lineItemIds | type: array<string> | description: Optional - Line items associated with this additional fee. If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
           - name: source | type: AdditionalFeeSource | description: Specifies the entity that added the additional fee.
                 - enum:
                 -     SERVICE_PLUGIN: The additional fee was added by an additional fee service plugin.
                 -     ITEM: The additional fee was added to the item by a catalog or custom line item.
                 -     MANUAL: The additional fee was added manually on request.
                 -     SHIPPING: The additional fee was added by the shipping provider.
                 -     PLATFORM: The additional fee was added by the Wix eCommerce platform.
           - name: taxableAddress | type: TaxableAddress | description: Address type tax was calculated against for this fee.
        - name: taxDetails | type: AdditionalFeeTaxDetails | description: Tax details of the additional fee.
           - name: taxable | type: boolean | description: Whether the additional fee is taxable.
           - name: taxGroupId | type: string | description: GUID of the tax group used to calculate tax for the additional fee.
        - name: source | type: SourceType | description: Source of the additional fee.
             - enum:
             -     ORIGINAL_CONTRACT: Copied from the subscription contract.
             -     AUTOMATIC: Additional fee added automatically by the totals recalculation, as a result of changes in the draft subscription contract. A commit adds it to the subscription contract when its `applied` is `true`.
        - name: applied | type: boolean | description: Whether the additional fee is applied.  Set to `false` when a line item linked to the additional fee is removed.  When you commit the draft subscription contract, an additional fee with `applied` set to `false` is removed from the subscription contract.
     - name: priceSummary | type: PriceSummary | description: Price summary for the next billing cycle.  Recalculated and saved each time the draft subscription contract changes and when it's committed. Retrieving a draft subscription contract with the `DRAFT` status also recalculates it. For a draft subscription contract with the `COMMITTED` status, this is the price summary applied to the subscription contract.
        - name: subtotal | type: Price | description: Subtotal of all line items, before discounts and before tax.
        - name: shipping | type: Price | description: Total shipping price, before discounts and before tax.
        - name: tax | type: Price | description: Total tax applied to the order.
        - name: discount | type: Price | description: Total discount amount applied to the order.
        - name: total | type: Price | description: Order's total price after discounts and tax.
        - name: totalAdditionalFees | type: Price | description: Total additional fees before tax.
     - name: taxInfo | type: OrderTaxInfo | description: Tax information for the next billing cycle.  Recalculated and saved each time the draft subscription contract changes and when it's committed. Retrieving a draft subscription contract with the `DRAFT` status also recalculates it. For a draft subscription contract with the `COMMITTED` status, this is the tax information at the time of the commit.
        - name: totalTax | type: Price | description: Calculated tax, added from line items.
        - name: taxBreakdown | type: array<OrderTaxBreakdown> | description: 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.
           - name: taxName | type: string | description: The name of the tax against which this tax amount was calculated.
           - name: taxType | type: string | description: The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
           - name: jurisdiction | type: string | description: The name of the jurisdiction in which this tax detail applies.
           - name: jurisdictionType | type: JurisdictionType | description: The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special).
                 - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL
           - name: rate | type: string | description: The rate at which this tax detail was calculated.
           - name: aggregatedTaxAmount | type: Price | description: The sum of all the tax from line items that calculated by the tax identifiers.
        - name: taxExempt | type: boolean | description: Whether the order is exempt from tax calculations.  Default: `false`
     - name: weightUnit | type: WeightUnit | description: Weight measurement unit.
         - enum:
         -     UNSPECIFIED_WEIGHT_UNIT: Weight unit can't be classified due to an error.
         -     KG: Kilograms.
         -     LB: Pounds.
     - name: currency | type: string | description: Currency used for the draft subscription contract's pricing, as a three-letter currency code in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) alphabetic format.
     - name: tags | type: Tags | description: Tags assigned to the draft subscription contract.
        - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.
           - name: tagIds | type: array<string> | description: List of tag GUIDs.
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the draft subscription contract object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  Copied from the subscription contract when the draft subscription contract is created. Committing the draft subscription contract doesn't change the subscription contract's extended fields.
     - name: buyerInfoDetails | type: BuyerInfoDetails | description: Buyer information, with how it changed compared to the subscription contract.
        - name: buyerInfo | type: BuyerInfo | description: Buyer information for the next billing cycle.
           - ONE-OF:
              - name: visitorId | type: string | description: Visitor GUID. Returned when the buyer isn't a logged-in site member.
              - name: memberId | type: string | description: Member GUID. Returned when the buyer is a logged-in site member.
           - name: contactId | type: string | description: Contact GUID. Automatically created if one doesn't exist. For more information, see [Contacts API](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/introduction.md).
           - name: email | type: string | description: Buyer's email address.
        - name: changeType | type: ChangeType | description: How the value changed compared to the subscription contract.
             - enum:
             -     UNCHANGED: The value didn't change.
             -     ADDED: The value was added. It doesn't exist in the subscription contract.
             -     CHANGED: The value was changed.
             -     REMOVED: The value was removed.
     - name: shippingInfoDetails | type: ShippingInfoDetails | description: Shipping info, with how it changed compared to the subscription contract.
        - ONE-OF:
           - name: changedDetails | type: ShippingInfoChangedDetails | description: Shipping info before the change.
              - name: shippingInfoBeforeChange | type: ShippingInformation | description: Shipping info before the change.
                 - name: carrierId | type: string | description: App Def Id of external provider which was a source of shipping info
                 - name: code | type: string | description: Unique code (or GUID) of selected shipping option. For example, `"usps_std_overnight"`.
                 - name: title | type: string | description: Shipping option title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
                 - name: logistics | type: DeliveryLogistics | description: Shipping logistics.
                    - ONE-OF:
                       - name: shippingDestination | type: AddressWithContact | description: Shipping destination address and contact details. For pickup orders, this contains the pickup location address, not the recipient's address.
                          - name: address | type: Address | description: Address.
                             - name: streetAddress | type: StreetAddress | description: none
                                - name: name | type: string | description: none
                                - name: number | type: string | description: none
                             - name: city | type: string | description: none
                             - name: subdivision | type: string | description: none
                             - name: country | type: string | description: none
                             - name: postalCode | type: string | description: none
                             - name: addressLine2 | type: string | description: none
                          - name: contactDetails | type: FullAddressContactDetails | description: Contact details.
                             - name: firstName | type: string | description: First name.
                             - name: lastName | type: string | description: Last name.
                             - name: phone | type: string | description: Phone number.
                             - name: company | type: string | description: Company name.
                             - name: vatId | type: VatId | description: Tax information (for Brazil only). If GUID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed.
                                - name: _id | type: string | description: Customer's tax GUID.
                                - name: type | type: VatType | description: Tax type.  Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations
                                             - enum:
                                             -     UNSPECIFIED: 
                                             -     CPF: CPF - for individual tax payers.
                                             -     CNPJ: CNPJ - for corporations
                       - name: pickupDetails | type: PickupDetails | description: Pickup details for store pickup or pickup point orders.
                          - name: address | type: PickupAddress | description: Pickup address.
                             - name: streetAddress | type: StreetAddress | description: none
                             - name: city | type: string | description: none
                             - name: subdivision | type: string | description: none
                             - name: country | type: string | description: none
                             - name: postalCode | type: string | description: none
                             - name: addressLine2 | type: string | description: none
                          - name: pickupMethod | type: PickupMethod | description: Pickup method
                                     - enum: STORE_PICKUP, PICKUP_POINT
                    - name: deliveryTime | type: string | description: Expected delivery time in free text. For example, `"3-5 business days"`.
                    - name: instructions | type: string | description: Instructions for the carrier. For example, `"Please knock on the door. If unanswered, please call contact number."`.
                    - name: deliveryTimeSlot | type: DeliveryTimeSlot | description: Expected delivery time slot with start and end times.
                       - name: from | type: Date | description: Delivery slot starting time.
                       - name: to | type: Date | description: Delivery slot ending time.
                 - name: cost | type: ShippingPrice | description: Shipping costs.
                    - name: price | type: Price | description: Shipping price for display purposes.
                    - name: totalPriceBeforeTax | type: Price | description: Total price of shipping after discounts (when relevant), and before tax.
                    - name: totalPriceAfterTax | type: Price | description: Shipping price after all discounts (if any exist), and after tax.
                    - name: taxInfo | type: LineItemTaxInfo | description: Represents all the relevant tax details for a shipping.
                    - name: discount | type: Price | description: Shipping discount before tax.
                 - name: region | type: ShippingRegion | description: Shipping region.
                    - name: name | type: string | description: Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`.
        - name: shippingInfo | type: ShippingInformation | description: Shipping info for the next billing cycle.
        - name: changeType | type: ChangeType | description: How the value changed compared to the subscription contract.
             - enum:
             -     UNCHANGED: The value didn't change.
             -     ADDED: The value was added. It doesn't exist in the subscription contract.
             -     CHANGED: The value was changed.
             -     REMOVED: The value was removed.
     - name: billingInfoDetails | type: BillingInfoDetails | description: Billing address and contact details, with how they changed compared to the subscription contract.
        - ONE-OF:
           - name: changedDetails | type: BillingInfoChangedDetails | description: Billing address before the change.
              - name: billingInfoBeforeChange | type: AddressWithContact | description: Billing address and contact details before the change.
        - name: billingInfo | type: AddressWithContact | description: Billing address and contact details for the next billing cycle.
        - name: changeType | type: ChangeType | description: How the value changed compared to the subscription contract.
             - enum:
             -     UNCHANGED: The value didn't change.
             -     ADDED: The value was added. It doesn't exist in the subscription contract.
             -     CHANGED: The value was changed.
             -     REMOVED: The value was removed.
     - name: recipientInfoDetails | type: RecipientInfoDetails | description: Recipient address and contact details, with how they changed compared to the subscription contract.
        - ONE-OF:
           - name: changedDetails | type: RecipientInfoChangedDetails | description: Recipient address before the change.
              - name: recipientInfoBeforeChange | type: AddressWithContact | description: Recipient address and contact details before the change.
        - name: recipientInfo | type: AddressWithContact | description: Recipient address and contact details for the next billing cycle.
        - name: changeType | type: ChangeType | description: How the value changed compared to the subscription contract.
             - enum:
             -     UNCHANGED: The value didn't change.
             -     ADDED: The value was added. It doesn't exist in the subscription contract.
             -     CHANGED: The value was changed.
             -     REMOVED: The value was removed.
     - name: businessLocationDetails | type: BusinessLocationDetails | description: Business location for the next billing cycle. Copied from the subscription contract.
        - ONE-OF:
           - name: changedDetails | type: BusinessLocationChangedDetails | description: Business location before the change.
              - name: businessLocationBeforeChange | type: Location | description: Business location before the change.
                 - name: _id | type: string | description: Location GUID. Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction.md).
                 - name: name | type: string | description: Location name.
        - name: businessLocation | type: Location | description: Business location for the next billing cycle.
        - name: changeType | type: ChangeType | description: How the value changed compared to the subscription contract.
             - enum:
             -     UNCHANGED: The value didn't change.
             -     ADDED: The value was added. It doesn't exist in the subscription contract.
             -     CHANGED: The value was changed.
             -     REMOVED: The value was removed.
     - name: platformFeeSummary | type: PlatformFeeSummary | description: Summary of the platform fees of the order created at checkout, including totals by charge type and a breakdown of individual fees.  Copied from the subscription contract. Not recalculated in the draft subscription contract.
        - name: total | type: Price | description: Total sum of all platform fees.
        - name: totalPassOn | type: Price | description: Total amount of platform fees with `PASS_ON` charge type.
        - name: totalAbsorbed | type: Price | description: Total amount of platform fees with `ABSORBED` charge type.
        - name: fees | type: array<PlatformFee> | description: Specific information about each platform fee.
           - name: name | type: TranslatableString | description: Platform fee name.
           - name: amount | type: Price | description: Platform fee amount.
           - name: lineItemId | type: string | description: GUID of the line item the platform fee applies to.
           - name: chargeType | type: ChargeType | description: Platform fee charge type.
                 - enum:
                 -     PASS_ON: Platform fee passed on to buyer.  This type increases the order total, and is visible to the buyer and merchant as an additional fee.
                 -     ABSORBED: Platform fee absorbed by merchant.  This type does not increase the order total, and is only visible to the merchant.
           - name: percentageRate | type: string | description: 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%.
     - name: settings | type: DraftSubscriptionContractSettings | description: Draft subscription contract settings.
        - name: specificItemsCouponBehavior | type: SpecificItemsCouponBehavior | description: How coupons that apply to specific items were calculated for the subscription contract.
             - enum:
             -     UNDEFINED_COUPON_BEHAVIOR: Coupon calculation behavior was not specified.
             -     ITEM_SUBTOTAL_INCLUDES_DISCOUNT: Item subtotal includes coupon discount.
             -     LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT: Legacy flow. Discount is applied as to specific items after subtotal calculation.
     - name: subscriptionSettings | type: SubscriptionSettings | description: Billing schedule of the subscription contract.  Line items that you add to the draft subscription contract get these settings.
  - name: modifiedFields | type: Map<string,Value> | description: Fields that were updated and their values before the update.
     - ONE-OF:
        - name: nullValue | type:  | description: 
        - name: numberValue | type: number | description: 
        - name: stringValue | type: string | description: 
        - name: boolValue | type: boolean | description: 
        - name: structValue | type: object | description: 
        - name: listValue | type: ListValue | description: 
           - name: values | type: array<Value> | description: 
  - name: metadata | type: EventMetadata | description: none
     - name: instanceId | type: string | description: App instance GUID.
     - name: eventType | type: string | description: Event type.
     - name: identity | type: IdentificationData | description: The identification type and identity data.
        - ONE-OF:
           - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site.
           - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site.
           - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.).
           - name: appId | type: string | description: GUID of an app.
        - name: identityType | type: WebhookIdentityType | description: 
             - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
     - name: accountInfo | type: AccountInfo | description: Details related to the account
        - name: accountId | type: string | description: GUID of the Wix account associated with the event.
        - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account.
        - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site.
     - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them.
     - name: entityFqdn | type: string | description: 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`.
     - name: slug | type: string | description: 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`.
     - name: entityId | type: string | description: GUID of the entity associated with the event.
     - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`.
     - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
     - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
     - name: entityEventSequence | type: string | description: 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.

```

### Examples


```javascript
import { draftSubscriptionContracts } from '@wix/ecom';

draftSubscriptionContracts.onDraftSubscriptionContractUpdated((event) => {
    // handle your event here
});
```


```javascript
import { createClient, AppStrategy } from '@wix/sdk';
import { draftSubscriptionContracts } from '@wix/ecom';

const wixClient = createClient({
  auth: AppStrategy({
    appId: 'MY-APP-ID',
    publicKey: 'YOUR_APP_PUBLIC_KEY',
  }),
  modules: {
      draftSubscriptionContracts,
    },
});

wixClient.draftSubscriptionContracts.onDraftSubscriptionContractUpdated((event) => {
    // handle your event here
});
```

---