> 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

# Resource: Draft Subscription Contracts

# Type: Draft Subscription Contract Object

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

## Description: A draft subscription contract is a temporary, editable copy of a subscription contract.
You create it from an existing subscription contract, add, update, or remove line items,
and review the recalculated totals. When you commit it, the changes apply to the
subscription contract from the next billing cycle onward.
Each line item, discount, and additional fee shows how it changed compared to the subscription contract.

## Schema:

```json
 Type: Draft Subscription Contract Object | type: DraftSubscriptionContract
 Description: A draft subscription contract is a temporary, editable copy of a subscription contract.
You create it from an existing subscription contract, add, update, or remove line items,
and review the recalculated totals. When you commit it, the changes apply to the
subscription contract from the next billing cycle onward.
Each line item, discount, and additional fee shows how it changed compared to the subscription contract.
       - name: id  | type: string | description: Draft subscription contract ID.
       - name: subscriptionContractId  | type: string | description: ID 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.
       - name: createdDate  | type: string | description: Date and time the draft subscription contract was created.
           - name: seconds  | type: string | description: 
           - name: nanos  | type: number | description: 
       - 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.
           - name: identityType  | type: string | description: Type of identity that created the draft subscription contract.
               enum: USER, APP, MEMBER
       - name: status  | type: string | description: Status of the draft subscription contract.
           enum: DRAFT, COMMITTED
       - 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`.
           - name: lineItem  | type: OrderLineItem | description: Line item.
               - name: id  | type: string | description: Line item ID.
               - 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: quantity  | type: number | 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: 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 ID. Field is empty when the line item is self-fulfilled. To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-fulfillments/list-fulfillments-for-single-order.md).
               - name: refundQuantity  | type: number | description: Number of items that were refunded.
               - name: restockQuantity  | type: number | 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: string | description: Type of selected payment option for current item.  Default: `FULL_PAYMENT_ONLINE`
               - name: taxDetails  | type: ItemTaxFullDetails | description: Deprecated. Use `taxInfo` instead. This field will be removed on September 30, 2024. Tax details for this line item.
               - 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: 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: lineItemPrice  | type: Price | description: Total price **after** catalog discounts and line item discounts.
               - name: taxableAddress  | type: TaxableAddress | description: Address used for tax calculation.
               - 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`.
               - 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: modifierGroups  | type: Array<ModifierGroup> | description: Modifier groups that were added to the item.
           - name: changeType  | type: string | description: How the line item changed compared to the subscription contract.
               enum: UNCHANGED, ADDED, CHANGED, REMOVED
       - name: discounts  | type: Array<DiscountDetails> | description: Discounts, each with its source and whether it's applied.
           - name: discount  | type: AppliedDiscount | description: Discount.
               - name: discountType  | type: string | description: Discount type.
               - name: lineItemIds  | type: Array<string> | description: __Deprecated.__ Use `lineItemDiscounts` instead.  IDs of line items the discount applies to.
               - name: id  | type: string | description: Discount ID.
               - name: lineItemDiscounts  | type: Array<LineItemDiscount> | description: Line items the discount applies to, including the discount amount for each.
           - name: source  | type: string | description: Source of the discount.  Discounts are copied from the subscription contract, so `source` is `ORIGINAL_CONTRACT`.
               enum: ORIGINAL_CONTRACT, AUTOMATIC
           - 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: taxDetails  | type: ItemTaxFullDetails | description: Tax details.
               - 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: string | description: Specifies the entity that added the additional fee.
               - 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: ID of the tax group used to calculate tax for the additional fee.
           - name: source  | type: string | description: Source of the additional fee.
           - 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: amount  | type: string | description: Amount.
               - name: formattedAmount  | type: string | description: Amount formatted with currency symbol.
           - 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: string | description: The type of the jurisdiction in which this tax detail applies (e.g. 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: value  | type: boolean | description: 
       - name: weightUnit  | type: string | description: Weight measurement unit.
           enum: UNSPECIFIED_WEIGHT_UNIT, KG, LB
       - 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: value  | type: string | description: 
       - 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 IDs.
           - 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: 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: 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.
               - name: contactId  | type: string | description: Contact ID. 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: string | description: How the value changed compared to the subscription contract.
       - name: shippingInfoDetails  | type: ShippingInfoDetails | description: Shipping info, with how it changed compared to the subscription contract.
           - name: shippingInfo  | type: ShippingInformation | description: Shipping info for the next billing cycle.
               - 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 ID) 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.
               - name: cost  | type: ShippingPrice | description: Shipping costs.
               - name: region  | type: ShippingRegion | description: Shipping region.
           - name: changeType  | type: string | description: How the value changed compared to the subscription contract.
       - name: billingInfoDetails  | type: BillingInfoDetails | description: Billing address and contact details, with how they changed compared to the subscription contract.
           - name: billingInfo  | type: AddressWithContact | description: Billing address and contact details for the next billing cycle.
               - name: address  | type: Address | description: Address.
               - name: contactDetails  | type: FullAddressContactDetails | description: Contact details.
           - name: changeType  | type: string | description: How the value changed compared to the subscription contract.
       - name: recipientInfoDetails  | type: RecipientInfoDetails | description: Recipient address and contact details, with how they changed compared to the subscription contract.
           - name: recipientInfo  | type: AddressWithContact | description: Recipient address and contact details for the next billing cycle.
           - name: changeType  | type: string | description: How the value changed compared to the subscription contract.
       - name: businessLocationDetails  | type: BusinessLocationDetails | description: Business location for the next billing cycle. Copied from the subscription contract.
           - name: businessLocation  | type: Location | description: Business location for the next billing cycle.
               - name: id  | type: string | description: Location ID. 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: changeType  | type: string | description: How the value changed compared to the subscription contract.
       - 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: ID of the line item the platform fee applies to.
               - name: chargeType  | type: string | description: Platform fee charge type.
               - 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: string | description: How coupons that apply to specific items were calculated for the subscription contract.
               enum: UNDEFINED_COUPON_BEHAVIOR, ITEM_SUBTOTAL_INCLUDES_DISCOUNT, LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT
       - 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: frequency  | type: string | description: Frequency unit of the billing cycle.
               enum: UNDEFINED, DAY, WEEK, MONTH, YEAR
           - name: interval  | type: number | description: Number of frequency units in a billing cycle. For example, frequency `MONTH` with interval `3` means billing every 3 months.
               - name: value  | type: number | description: 
           - name: autoRenewal  | type: boolean | description: Whether the subscription renews automatically at the end of each billing cycle.
           - name: billingCycles  | type: number | 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: string | description: Frequency unit of the free trial period.
               - name: interval  | type: number | description: Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial.

```