import { GetSubscriptionRequest as GetSubscriptionRequest$1, GetSubscriptionResponse as GetSubscriptionResponse$1, CustomerCancelSubscriptionRequest as CustomerCancelSubscriptionRequest$1, CustomerCancelSubscriptionResponse as CustomerCancelSubscriptionResponse$1, CustomerTurnOnAutoRenewalRequest as CustomerTurnOnAutoRenewalRequest$1, CustomerTurnOnAutoRenewalResponse as CustomerTurnOnAutoRenewalResponse$1, CustomerTurnOffAutoRenewalRequest as CustomerTurnOffAutoRenewalRequest$1, CustomerTurnOffAutoRenewalResponse as CustomerTurnOffAutoRenewalResponse$1, CustomerExtendSubscriptionRequest as CustomerExtendSubscriptionRequest$1, CustomerExtendSubscriptionResponse as CustomerExtendSubscriptionResponse$1, QuerySubscriptionsRequest as QuerySubscriptionsRequest$1, QuerySubscriptionsResponse as QuerySubscriptionsResponse$1, CountSubscriptionsRequest as CountSubscriptionsRequest$1, CountSubscriptionsResponse as CountSubscriptionsResponse$1, UpdateSubscriptionPaymentMethodRequest as UpdateSubscriptionPaymentMethodRequest$1, UpdateSubscriptionPaymentMethodResponse as UpdateSubscriptionPaymentMethodResponse$1, CustomerAllowedActionsRequest as CustomerAllowedActionsRequest$1, CustomerAllowedActionsResponse as CustomerAllowedActionsResponse$1, CustomerListUpcomingChargesRequest as CustomerListUpcomingChargesRequest$1, CustomerListUpcomingChargesResponse as CustomerListUpcomingChargesResponse$1, InitiatePaymentMethodSetupRequest as InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupResponse as InitiatePaymentMethodSetupResponse$1, CustomerSkipCycleRequest as CustomerSkipCycleRequest$1, CustomerSkipCycleResponse as CustomerSkipCycleResponse$1, CustomerCancelScheduledSkipRequest as CustomerCancelScheduledSkipRequest$1, CustomerCancelScheduledSkipResponse as CustomerCancelScheduledSkipResponse$1, CustomerPauseSubscriptionRequest as CustomerPauseSubscriptionRequest$1, CustomerPauseSubscriptionResponse as CustomerPauseSubscriptionResponse$1, CustomerResumeSubscriptionRequest as CustomerResumeSubscriptionRequest$1, CustomerResumeSubscriptionResponse as CustomerResumeSubscriptionResponse$1, CustomerCancelScheduledPauseRequest as CustomerCancelScheduledPauseRequest$1, CustomerCancelScheduledPauseResponse as CustomerCancelScheduledPauseResponse$1, CustomerUpdateBillingDateRequest as CustomerUpdateBillingDateRequest$1, CustomerUpdateBillingDateResponse as CustomerUpdateBillingDateResponse$1, CustomerChangeSubscriptionRequest as CustomerChangeSubscriptionRequest$1, CustomerChangeSubscriptionResponse as CustomerChangeSubscriptionResponse$1, CustomerPreviewChangeSubscriptionRequest as CustomerPreviewChangeSubscriptionRequest$1, CustomerPreviewChangeSubscriptionResponse as CustomerPreviewChangeSubscriptionResponse$1, CustomerCancelPendingChangeRequest as CustomerCancelPendingChangeRequest$1, CustomerCancelPendingChangeResponse as CustomerCancelPendingChangeResponse$1, ListSubscriptionHistoryRequest as ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryResponse as ListSubscriptionHistoryResponse$1, UpdateSubscriptionBillingDateRequest as UpdateSubscriptionBillingDateRequest$1, UpdateSubscriptionBillingDateResponse as UpdateSubscriptionBillingDateResponse$1, ReviseSubscriptionRequest as ReviseSubscriptionRequest$1, ReviseSubscriptionResponse as ReviseSubscriptionResponse$1, CancelSubscriptionRequest as CancelSubscriptionRequest$1, CancelSubscriptionResponse as CancelSubscriptionResponse$1, PauseSubscriptionRequest as PauseSubscriptionRequest$1, PauseSubscriptionResponse as PauseSubscriptionResponse$1, ResumeSubscriptionRequest as ResumeSubscriptionRequest$1, ResumeSubscriptionResponse as ResumeSubscriptionResponse$1, SearchSubscriptionsRequest as SearchSubscriptionsRequest$1, SearchSubscriptionsResponse as SearchSubscriptionsResponse$1, TurnOnSubscriptionAutoRenewalRequest as TurnOnSubscriptionAutoRenewalRequest$1, TurnOnSubscriptionAutoRenewalResponse as TurnOnSubscriptionAutoRenewalResponse$1, TurnOffSubscriptionAutoRenewalRequest as TurnOffSubscriptionAutoRenewalRequest$1, TurnOffSubscriptionAutoRenewalResponse as TurnOffSubscriptionAutoRenewalResponse$1, MarkLatestInvoiceAsPaidRequest as MarkLatestInvoiceAsPaidRequest$1, MarkLatestInvoiceAsPaidResponse as MarkLatestInvoiceAsPaidResponse$1, MarkBillingCycleAsPaidRequest as MarkBillingCycleAsPaidRequest$1, MarkBillingCycleAsPaidResponse as MarkBillingCycleAsPaidResponse$1, GetSubscriptionsStatsRequest as GetSubscriptionsStatsRequest$1, GetSubscriptionsStatsResponse as GetSubscriptionsStatsResponse$1, ExtendSubscriptionRequest as ExtendSubscriptionRequest$1, ExtendSubscriptionResponse as ExtendSubscriptionResponse$1, AllowedActionsRequest as AllowedActionsRequest$1, AllowedActionsResponse as AllowedActionsResponse$1, ListUpcomingChargesRequest as ListUpcomingChargesRequest$1, ListUpcomingChargesResponse as ListUpcomingChargesResponse$1, PreviewSubscriptionChargesRequest as PreviewSubscriptionChargesRequest$1, PreviewSubscriptionChargesResponse as PreviewSubscriptionChargesResponse$1, PreviewSubscriptionsChargesRequest as PreviewSubscriptionsChargesRequest$1, PreviewSubscriptionsChargesResponse as PreviewSubscriptionsChargesResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface Subscription { /** * Subscription's unique id. Automatically generated and read-only. * @format GUID * @readonly */ id?: string | null; /** * Date when subscription was created * @readonly */ createdDate?: Date | null; /** * Date when subscription was updated * @readonly */ updatedDate?: Date | null; /** * Revision of subscription. Increments upon changes * @readonly */ revision?: string | null; /** * Subscription name: minLength is 1, maxLength is 150 * @maxLength 150 */ name?: string; /** * Subscription description. Optional. * @maxLength 500 */ description?: string | null; /** * 3. No Start Date: * - If the start_date is not provided, this field will default to "now", * meaning the subscription will start immediately. */ startDate?: Date | null; /** * Represents when the subscription will end, relevant for subscriptions with a termed period. * If not provided, will be calculated based on billing schedule. Should be empty for evergreen subscription. * Note: A 13-hour tolerance is applied when validating the end date to handle for time zone differences and minor discrepancies. */ endDate?: Date | null; /** Business origin subscription is coming from. In site-level subscription it will be vertical app_id and entity_id */ origin?: BusinessOrigin; /** Customer information like id and identity type (member or contact) */ customer?: Customer; /** * Status of subscription * @readonly */ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals; /** Billing details parameters including schedule, currency, etc. */ billingSettings?: BillingSettings; /** * Includes many attributes about billing status of the subscription * @readonly */ billingStatus?: BillingStatus; /** Shipping address associated with subscription. At the moment used only for payments. Optional. */ shippingAddress?: FullAddressDetails; /** Restrictions on possible subscription actions. If not provided, default policies are all restrictions enabled. */ policies?: SubscriptionPolicies; /** * Information related to either paused subscription or scheduled for future pause * @readonly */ pauseInfo?: PauseInfo; /** * Information related to cancellation for already canceled subscription or scheduled for cancel * @readonly */ cancellationInfo?: CancellationInfo; /** * Pending update for the next billing cycle * @readonly */ pendingUpdateData?: SubscriptionUpdateData; /** * Indicator whether subscription is managed by BASS or external system, like SAPI, for example. * @internal * @readonly */ bassManaged?: boolean; /** * Key / Value store to keep up to 10 additional values related to the subscription. * Key max length = 50, Value max length = 200. Value can not be empty. * Should not include any sensitive or PII information. * @maxSize 10 */ metadata?: Record; /** * Pending update for a specific date * @readonly */ specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateData; /** * ChangesCounter of subscription. Increments upon every change to the domain * @readonly */ changesCounter?: string | null; /** * Billing order id. Optional. * @format GUID */ orderId?: string | null; /** Platform origin subscription is coming from. */ platformOrigin?: PlatformOrigin; /** * The Business Location ID represents a business location in an external service, which includes the business address. * @format GUID */ businessLocationId?: string | null; /** * Indicates BASS needs an operator choice for billing start when resuming this subscription. * @internal * @readonly */ requiresResumeBillingStartChoice?: boolean; /** * items, minSize is 1, maxSize is 100 * @maxSize 100 */ items?: Item[]; /** * Indicates that a contract change is scheduled to take effect at the next renewal. * Present only when a ChangeSubscription with effective_time AT_NEXT_RENEWAL was accepted. * @readonly */ scheduledContractChange?: ScheduledContractChange; } interface BusinessOrigin { /** @format GUID */ appId?: string | null; /** @format GUID */ entityId?: string | null; } interface Customer extends CustomerIdOneOf { /** * Visitor ID of the customer. Available when the customer is an anonymous * site visitor. * @format GUID */ visitorId?: string; /** * Contact ID of the customer. Available when the customer is a * [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object). * @format GUID */ contactId?: string; /** * Member ID of the customer. Available when the customer is a * [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object). * @format GUID */ memberId?: string; /** * Wix account ID * @format GUID */ accountId?: string; } /** @oneof */ interface CustomerIdOneOf { /** * Visitor ID of the customer. Available when the customer is an anonymous * site visitor. * @format GUID */ visitorId?: string; /** * Contact ID of the customer. Available when the customer is a * [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object). * @format GUID */ contactId?: string; /** * Member ID of the customer. Available when the customer is a * [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object). * @format GUID */ memberId?: string; /** * Wix account ID * @format GUID */ accountId?: string; } declare enum SubscriptionStatusEnumSubscriptionStatus { UNKNOWN = "UNKNOWN", /** Subscription created in this status, but hasn't been paid for yet. Filtered out from subscriptions querying. */ DRAFT = "DRAFT", /** Subscription that will be active in future. */ PENDING = "PENDING", /** Subscription is active */ ACTIVE = "ACTIVE", /** Subscription is paused */ PAUSED = "PAUSED", /** Subscription was ended */ ENDED = "ENDED", /** Subscription was canceled or auto-renew off. Ended before its time. */ CANCELED = "CANCELED" } /** @enumType */ type SubscriptionStatusEnumSubscriptionStatusWithLiterals = SubscriptionStatusEnumSubscriptionStatus | 'UNKNOWN' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'PAUSED' | 'ENDED' | 'CANCELED'; interface BillingSettings { /** * Currency of all subscription items prices. Three letter ISO currency code. https://en.wikipedia.org/wiki/ISO_4217 * @format CURRENCY */ currency?: string; /** customer payment source to make recurring payments with */ paymentMethod?: PaymentMethod; /** Instructs how payments will be collected. */ collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals; /** * Duration of cycle. For example, 1 MONTH, 2 WEEKS, 7 DAYS, 1 YEAR etc. * Shortest supported cycle duration is 7 days. */ cycleDuration?: Duration; /** * Number of billing cycles. If not set subscription auto-renewed until cycle-auto-renew will be disabled. * @min 1 */ totalCycles?: number | null; /** If set to false, subscription will be canceled at the next billing cycle. */ cycleAutoRenew?: boolean; /** Billing Schedule to be defined in order to override default billing schedule */ customBillingSchedule?: CustomBillingSchedule; /** Definition of trial period */ freeTrialDuration?: Duration; /** * Shipping costs collected each cycle * @format DECIMAL_VALUE * @deprecated * @replacedBy shipping_charges * @targetRemovalDate 2024-10-31 */ shippingFee?: string | null; /** Billing address associated with subscription to be used for payments. */ billingAddress?: FullAddressDetails; taxSettings?: TaxSettings; /** * Fees that are only added to an invoice when a specific condition is met. * For example, a setup fee that only applies to the very first invoice of a * subscription. * * Max: 5 additional fees * @maxSize 5 */ additionalFees?: AdditionalFee[]; /** Shipping fee charges */ shippingCharges?: ShippingCharges; /** * General discount that applied to all items in the subscription * @maxSize 5 */ discounts?: Discount[]; /** * Details about the external collection service. * Only set when the collection_method is EXTERNAL. */ externalCollectionDetails?: ExternalCollectionDetails; /** * Day of month (1-28) on which the first recurring billing date is anchored. * Applies to monthly subscriptions only. Subsequent billing dates may shift * if the subscription is modified (e.g. payment date update, pause/resume). * @internal * @min 1 * @max 28 */ billingAnchorDay?: number | null; } interface PaymentMethod { /** * reference to payment source id stored in payments system * @format GUID */ id?: string; } declare enum CollectionMethodEnumCollectionMethod { UNKNOWN = "UNKNOWN", /** Subscriber automatically charged */ AUTO_CHARGE = "AUTO_CHARGE", /** Payments manually collected and managed by owner */ OFFLINE = "OFFLINE", /** Payment will be collected somehow. Billing only issues invoice per cycle. */ SEND_INVOICE = "SEND_INVOICE", /** Payment will be collected externally */ EXTERNAL = "EXTERNAL", /** Indicates the product has a zero amount, meaning its free with no payment required. */ FREE = "FREE" } /** @enumType */ type CollectionMethodEnumCollectionMethodWithLiterals = CollectionMethodEnumCollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE' | 'EXTERNAL' | 'FREE'; interface Duration { /** Duration unit: DAY, WEEK, MONTH, YEAR */ unit?: DurationUnitWithLiterals; /** * Amount of units. For example, 1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1. * @min 1 */ count?: number | null; } declare enum DurationUnit { UNKNOWN = "UNKNOWN", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } /** @enumType */ type DurationUnitWithLiterals = DurationUnit | 'UNKNOWN' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR'; interface CustomBillingSchedule { /** * Amount of cycles to be paid on Subscription creation, currently only cycles_to_pay_on_creation equals to 1 is supported * When used with Subscription.start_date, Subscription cycles will be paid on creation but Subscription will be activated in the future * @min 1 * @max 1 */ cyclesToPayOnCreation?: number | null; } interface FullAddressDetails { /** Details about the person associated with the address. */ contactDetails?: FullAddressContactDetails; /** Information about the address. */ address?: Address; } interface FullAddressContactDetails { /** First name of the contact. */ firstName?: string | null; /** Last name of the contact. */ lastName?: string | null; /** * Phone number of the contact. * @format PHONE */ phone?: string | null; /** Company associated with the contact. */ company?: string | null; /** * Email address of the contact. * @format EMAIL */ email?: string | null; } interface Address extends AddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress; /** Main address line, usually street and number as free text. */ addressLine?: string | null; /** * 2-letter country code in * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) * format. * @format COUNTRY */ country?: string | null; /** * Subdivision. Usually a state, region, prefecture, or province code, * according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string | null; /** City name. */ city?: string | null; /** Zip/postal code. */ postalCode?: string | null; } /** @oneof */ interface AddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress; /** Main address line, usually street and number as free text. */ addressLine?: string | null; } interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; } interface TaxSettings { /** If true then taxes are included in given prices */ inclusive?: boolean; } interface AdditionalFee { /** * Name of the conditional fee. * * Max: 500 characters * @maxLength 500 */ name?: string; /** * Amount of the conditional fee. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ amount?: string; /** * When the fee is added to the invoice. * * + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice. * + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription. * @deprecated When the fee is added to the invoice. * * + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice. * + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription. * @replacedBy cycles * @targetRemovalDate 2025-12-31 */ trigger?: AdditionalFeeTriggerWithLiterals; /** Information about the tax of the conditional fee. */ tax?: Tax; /** * Specifies the cycles during which the fee will be applied. If this field is provided, * it determines the exact range of cycles the fee applies to. The logic is as follows: * * - `cycle_from`: The first cycle the fee will be added to. Must be greater than 0. * - `number_of_cycles`: The number of consecutive cycles the fee will be applied to, * starting from `cycle_from`. If not specified, the fee applies to all cycles starting * from `cycle_from`. * * Example: * - `cycle_from = 1, number_of_cycles = 3`: Fee applies to cycles 1, 2, and 3. * - `cycle_from = 2, number_of_cycles = None`: Fee applies to cycles 2 and onward indefinitely. * * If `cycles` is not specified (`None`), the fee will be applied on all cycles. */ cycles?: Cycles; /** Indicates the source of the fee, Contains app_id and entity_id */ origin?: Origin; } declare enum AdditionalFeeTrigger { UNKNOWN = "UNKNOWN", /** Charge upon subscription first payment */ FIRST_PAYMENT = "FIRST_PAYMENT" } /** @enumType */ type AdditionalFeeTriggerWithLiterals = AdditionalFeeTrigger | 'UNKNOWN' | 'FIRST_PAYMENT'; interface Tax extends TaxValueOneOf { /** * Tax amount for the invoice's line item. Available when the tax is an * amount and not a precentage. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ amount?: string; /** * Tax amount for the invoice's line item price and application fee. * Can't be combined with `invoiceItems.priceDetails.discount`. * Available when the tax is a precentage and not an amount. * * Min: `0.01` * Max: `100` * @decimalValue options { gt:0.00, lte:100 } */ percentage?: string; /** Dynamic tax calculation */ dynamic?: DynamicTax; } /** @oneof */ interface TaxValueOneOf { /** * Tax amount for the invoice's line item. Available when the tax is an * amount and not a precentage. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ amount?: string; /** * Tax amount for the invoice's line item price and application fee. * Can't be combined with `invoiceItems.priceDetails.discount`. * Available when the tax is a precentage and not an amount. * * Min: `0.01` * Max: `100` * @decimalValue options { gt:0.00, lte:100 } */ percentage?: string; /** Dynamic tax calculation */ dynamic?: DynamicTax; } interface DynamicTax { /** * Tax group ID used to calculate tax, default will be used if not available * @format GUID */ taxGroupId?: string | null; /** Taxable address used to calculate tax */ taxableAddressType?: TaxableAddressTypeWithLiterals; } declare enum TaxableAddressType { UNKNOWN = "UNKNOWN", /** Tax will be calculated using a single address */ BUSINESS = "BUSINESS", /** Tax will be calculated using multiple address (from BUSINESS to BILLING) */ BILLING = "BILLING", /** Tax will be calculated using multiple address (from BUSINESS to SHIPPING) */ SHIPPING = "SHIPPING" } /** @enumType */ type TaxableAddressTypeWithLiterals = TaxableAddressType | 'UNKNOWN' | 'BUSINESS' | 'BILLING' | 'SHIPPING'; interface Cycles { /** * The cycle will start. Minimum cycle number is 1 * @min 1 */ cycleFrom?: number; /** * Number of cycles to be applied on. In order to apply a on all cycles until the end of the subscription, this field should be empty. * @min 1 */ numberOfCycles?: number | null; } interface Origin { /** @format GUID */ appId?: string; /** @format GUID */ entityId?: string; } interface ShippingCharges { /** * Amount of the shipping fee in `0.00` format. * * Min: `0.01` * @decimalValue options { gte:0.00, maxScale:4 } */ amount?: string; /** Tax of the shipping fee */ tax?: Tax; /** @maxSize 5 */ discounts?: Discount[]; } interface Discount extends DiscountValueOneOf { /** * Discount amount. * Available when the discount is an amount. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ amount?: string; /** * Discount percentage. * Available when the discount is a parcentage value. * * Min: `0.01` * Max: `100` * @decimalValue options { gt:0.00, lte:100 } */ percentage?: string; cycles?: DiscountCycles; /** Discount origin is coming from. Contains app_id and entity_id */ origin?: DiscountOrigin; } /** @oneof */ interface DiscountValueOneOf { /** * Discount amount. * Available when the discount is an amount. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ amount?: string; /** * Discount percentage. * Available when the discount is a parcentage value. * * Min: `0.01` * Max: `100` * @decimalValue options { gt:0.00, lte:100 } */ percentage?: string; } interface DiscountCycles { /** * The cycle from which the discount will start. Minimum cycle number is 1 * @min 1 */ cycleFrom?: number; /** * Number of cycles to be applied on them discount. In order to apply a discount on all cycles until the end of the subscription, this field should be empty. * @min 1 */ numberOfCycles?: number | null; } interface DiscountOrigin { /** @format GUID */ appId?: string; /** @format GUID */ entityId?: string; } interface ExternalCollectionDetails { /** The name of the external collector. */ collectorName?: string; } interface BillingStatus { /** * Current cycle of subscription billing schedule. When billing schedule starts cycles start from 1 * and incremented each next billing cycle. * In case billing schedule not started (free trial, pay later start later) then current_cycle will remain 0 */ currentCycle?: number; /** how many cycled are remaining, For auto-renew subscriptions is not set. */ remainingCycles?: number | null; /** Date when charge will be for next billing cycle */ nextBillingDate?: Date | null; /** Previous Date charged for previous billing cycle */ previousBillingDate?: Date | null; /** last payment details */ latestPaymentData?: PaymentData; /** Free trial data */ freeTrialData?: FreeTrialData; /** * Update billing date operation data * @internal */ updateBillingDateData?: UpdateBillingDateData; /** * Grace period information during grace period after payment failure * @readonly */ gracePeriodData?: GracePeriodData; /** * Lifetime cycle number at which the current contract started. Current cycle remains * the lifetime billing cycle number. Absent for subscriptions using legacy cycle semantics. * @readonly * @min 1 */ contractStartCycle?: number | null; /** * Number of new_contract changes activated on this subscription over its lifetime. * Absent until the first contract change completes. * @readonly * @min 1 */ contractChangeCount?: number | null; } interface PaymentData { /** * Latest payment's invoice ID * @format GUID */ invoiceId?: string; /** Latest payment's status: UNPAID/PAID/FAILED */ paymentStatus?: PaymentStatusWithLiterals; /** Latest payment's totals. */ totals?: Totals; initialFailedPaymentDate?: Date | null; /** Tax-related data for the latest payment */ taxData?: PaymentTaxData; /** * Currency used when this payment was made. Three letter ISO currency code. * @format CURRENCY */ currency?: string | null; } declare enum PaymentStatus { /** Payment status unknown */ UNKNOWN = "UNKNOWN", /** Payment has not been paid */ UNPAID = "UNPAID", /** Payment has been paid // TODO: p13n review: we are not sending event when in SEND_INVOICE mode cycle was paid. should we and which event? */ PAID = "PAID", /** Payment failed */ FAILED = "FAILED" } /** @enumType */ type PaymentStatusWithLiterals = PaymentStatus | 'UNKNOWN' | 'UNPAID' | 'PAID' | 'FAILED'; interface Totals { /** * Total price of the subscription that the customer must pay per billing * cycle. Calculated as: `subtotal + tax + shippingFee + applicationFee + extraCharge - discount - credit` * Note: platformFee is NOT included in this calculation as it is absorbed by the merchant and does not affect the customer's total. * @format DECIMAL_VALUE * @readonly */ totalPrice?: string; /** * Subtotal of all line items that belong to the subscription. * Calculated as: `sum_{i=1}^{n} (itemPrice[i] * quantity[i])` * @format DECIMAL_VALUE * @readonly */ subtotal?: string; /** * Total tax. * @format DECIMAL_VALUE * @readonly */ tax?: string | null; /** * Tax-exempt amount. * @format DECIMAL_VALUE * @decimalValue options { gte:0.00, maxScale:4 } * @readonly */ exempt?: string | null; /** * Total discount. * @format DECIMAL_VALUE * @readonly */ discount?: string | null; /** * Total application fee. * @format DECIMAL_VALUE * @readonly */ applicationFee?: string | null; /** * Total shipping fee. * @format DECIMAL_VALUE * @readonly */ shippingFee?: string | null; /** * Total extra charges without tax. * @format DECIMAL_VALUE * @readonly */ extraCharge?: string | null; /** * Total credits without tax. * @format DECIMAL_VALUE * @readonly */ credit?: string | null; /** * The tax amount for the proration, which is also included in the total tax. * @format DECIMAL_VALUE * @readonly */ prorationTax?: string | null; /** * Platform fee calculated based on vertical-specific billing settings configuration. * @format DECIMAL_VALUE * @decimalValue options { gte:0.00, maxScale:4 } * @readonly */ platformFee?: string | null; } interface PaymentTaxData { /** * A detailed breakdown of the tax authorities for all subscription items from the latest payment * @minSize 1 * @maxSize 100 */ taxBreakdowns?: TaxBreakdown[]; /** * Tax amount for all subscription items * @format DECIMAL_VALUE * @decimalValue options { gte:0.00, maxScale:4 } */ taxAmount?: string | null; } interface TaxBreakdown { taxType?: string; /** @decimalValue options { maxScale:4 } */ taxRate?: string; /** @format DECIMAL_VALUE */ taxAmount?: string | null; /** @format DECIMAL_VALUE */ taxableAmount?: string | null; /** @format DECIMAL_VALUE */ nonTaxableAmount?: string | null; /** * Name of the tax that was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. * @maxLength 200 */ taxName?: string | null; /** * Jurisdiction that taxes were calculated for. * @maxLength 200 */ jurisdiction?: string | null; /** Type of jurisdiction that taxes were calculated for. */ jurisdictionType?: string; /** * Provider-specific metadata (e.g., Avalara trans/svc codes for financial reporting) * @maxSize 20 */ metadata?: Record; } interface FreeTrialData { /** * Date when free trial starts * @readonly */ startDate?: Date | null; /** * Date when free trial ends * @readonly */ endDate?: Date | null; } interface UpdateBillingDateData { /** * Date until the subscription is paid for. * Different from `nextBillingDate` only when the next billing date is updated without immediately issuing a new invoice. */ paidUntil?: Date | null; /** Information about how to adjust the item's payment due to the update of the billing date */ proration?: Proration; } interface Proration extends ProrationTypeOneOf { /** * BASS automatically calculates the proration amount based on the number * of days added to or removed from the current billing cycle. BASS uses * this formula to calculate the charge or credit amount: * `(Subscription total for the current billing cycle) * (number of days added to or removed from the current billing cycle) / (total number of days for the current billing cycle before the adjustment)`. * For example, the customer has paid 100 UDS for the current * billing cycle that last 31 days, and you want to extend the cycle by 8 * days. Then, BASS calculates the proration amount like this: * `100 USD * 8 days / 31 days`, which equals `25.81 USD`. */ timeBased?: TimeBasedProration; /** Proration amount that's based on your custom calculation. */ custom?: CustomProration; } /** @oneof */ interface ProrationTypeOneOf { /** * BASS automatically calculates the proration amount based on the number * of days added to or removed from the current billing cycle. BASS uses * this formula to calculate the charge or credit amount: * `(Subscription total for the current billing cycle) * (number of days added to or removed from the current billing cycle) / (total number of days for the current billing cycle before the adjustment)`. * For example, the customer has paid 100 UDS for the current * billing cycle that last 31 days, and you want to extend the cycle by 8 * days. Then, BASS calculates the proration amount like this: * `100 USD * 8 days / 31 days`, which equals `25.81 USD`. */ timeBased?: TimeBasedProration; /** Proration amount that's based on your custom calculation. */ custom?: CustomProration; } interface TimeBasedProration { } interface CustomProration extends CustomProrationAmountOneOf { /** * Proration charge amount that's based on your custom calculation. * Increases the total that the customer must pay with the next invoice. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ charge?: string; /** * Proration credit amount that's based on your custom calculation. * Lowers the total that the customer must pay with the next invoice. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ credit?: string; } /** @oneof */ interface CustomProrationAmountOneOf { /** * Proration charge amount that's based on your custom calculation. * Increases the total that the customer must pay with the next invoice. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ charge?: string; /** * Proration credit amount that's based on your custom calculation. * Lowers the total that the customer must pay with the next invoice. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ credit?: string; } interface GracePeriodData { /** * Grace period start date * @readonly */ startDate?: Date | null; /** * Grace period end date * @readonly */ endDate?: Date | null; /** Automatic retry data during grade period, if have any. Optional. */ automaticRetryData?: AutomaticRetryData; } interface AutomaticRetryData { enabled?: boolean; } interface SubscriptionPolicies { /** Subscription can be canceled by the customer who bought it */ customerCanCancel?: boolean; /** Subscription end date can be updated by business */ businessCanExtend?: boolean; /** Subscription can be canceled not only immediately, but also at end of billing cycle by turning off auto-renew */ allowEndOfCycleCancellation?: boolean; /** * Deprecated. Never in production. BASS does not read or write this field; UoU gates use * `CustomerSettingsResolver` → BBS `customer_settings_by_app_def_id` or Legacy booleans above. * @deprecated */ customerActionSettings?: CustomerActionSettings; /** * Number of self-service actions already used on this subscription. * @readonly */ customerActionCounters?: CustomerActionCounters; } /** * Per-action merchant configuration for customer self-service actions. * All booleans use BoolValue (optional) so verticals can selectively override defaults. */ interface CustomerActionSettings { /** Skip cycle action settings */ skip?: SkipActionSettings; /** Pause/resume action settings */ pauseResume?: PauseResumeActionSettings; /** Cancel action settings */ cancel?: CancelActionSettings; /** Update payment method action settings */ upm?: UpmActionSettings; /** Update billing date action settings */ updateBillingDate?: UpdateBillingDateActionSettings; } /** Controls skip cycle functionality — lets a customer skip one or more billing cycles. */ interface SkipActionSettings { /** Whether the skip action is enabled */ enabled?: boolean | null; /** Skip action configuration */ configuration?: SkipActionConfiguration; } /** Configuration for the skip cycle action. */ interface SkipActionConfiguration { /** Maximum number of billing cycles a customer can skip */ maxSkipCycles?: number | null; /** Minimum days before billing date to allow skip */ daysBeforeSkipAllowed?: number | null; /** Minimum days before billing date to allow resume from skip */ daysBeforeResumeAllowed?: number | null; /** Minimum days before billing date to cancel a scheduled skip */ daysBeforeCancelSkipAllowed?: number | null; /** Maximum number of times a customer can perform skip action */ maxSkipUserActions?: number | null; /** Allow skipping the next billing cycle */ skipNextCycle?: boolean | null; /** Allow skipping future billing cycles */ skipFutureCycles?: boolean | null; /** Allow reversing a pending skip */ unskip?: boolean | null; /** Allow cancelling a scheduled skip-pause */ cancelScheduledPause?: boolean | null; /** Allow immediate resume from skip */ resumeImmediately?: boolean | null; /** Allow resume at the next billing date */ resumeAtNextBillingDate?: boolean | null; /** Allow resume at a specific date */ resumeAtSpecificDate?: boolean | null; /** Allow setting auto-resume after N cycles */ autoResumeCycles?: boolean | null; } /** * Subscription pause/resume settings — full pause of billing, not skip. * Skip action (temporary pause for N cycles) is configured via SkipActionSettings. */ interface PauseResumeActionSettings { /** Whether the pause/resume action is enabled */ enabled?: boolean | null; /** Pause/resume action configuration */ configuration?: PauseResumeActionConfiguration; } /** * Configuration for the subscription pause/resume action. * Skip action (temporary pause for N cycles) is configured via SkipActionConfiguration. */ interface PauseResumeActionConfiguration { /** Minimum days before billing date to allow pause */ daysBeforePauseAllowed?: number | null; /** Maximum cycles for auto-resume after pause */ maxAutoResumeCycles?: number | null; /** Minimum days before billing date to allow resume */ daysBeforeResumeAllowed?: number | null; /** Minimum days before billing to cancel scheduled pause */ daysBeforeCancelScheduledPauseAllowed?: number | null; /** Maximum number of times a customer can perform pause action */ maxPauseUserActions?: number | null; } /** Cancel subscription action settings. */ interface CancelActionSettings { /** Whether the cancel action is enabled */ enabled?: boolean | null; /** Cancel action configuration */ configuration?: CancelActionConfiguration; } /** Configuration for the cancel subscription action. */ interface CancelActionConfiguration { /** Minimum days before period end to allow cancellation */ minDaysBeforePeriodEnd?: number | null; } /** Update Payment Method action settings — toggle only, no additional configuration. */ interface UpmActionSettings { /** Whether the update payment method action is enabled */ enabled?: boolean | null; } /** Update billing date action settings. */ interface UpdateBillingDateActionSettings { /** Whether the update billing date action is enabled */ enabled?: boolean | null; /** Update billing date configuration */ configuration?: UpdateBillingDateActionConfiguration; } /** Configuration for the update billing date action. */ interface UpdateBillingDateActionConfiguration { /** Whether to adjust price when billing date changes */ priceAdjustmentEnabled?: boolean | null; /** Maximum days the billing date can be moved forward */ maxDaysAdvance?: number | null; /** Maximum days the billing date can be postponed */ maxDaysPostpone?: number | null; /** Minimum days from today for the new billing date */ minDaysFromToday?: number | null; /** Whether to allow advancing billing date for weekly subscriptions */ allowAdvanceForWeekly?: boolean | null; } interface CustomerActionCounters { /** * Number of self-service skips already used. Unset means zero. * @readonly */ skipCount?: number | null; /** * Number of self-service pauses already used. Unset means zero. * @readonly */ pauseCount?: number | null; } interface PauseInfo { pausePolicy?: PausePolicyWithLiterals; pauseAt?: PauseAtWithLiterals; startDate?: Date | null; startCycle?: number | null; resumeAt?: ResumeAtWithLiterals; resumeDate?: Date | null; resumeCycle?: number | null; } declare enum PausePolicy { NONE = "NONE", /** Pause the payment and the service. When resuming, the subscription end date is extended by the number of cycles postponed, and if the pause happened in a middle of a cycle, the payment date is postponed by the amount of days that already paid. */ SERVICE_AND_PAYMENTS = "SERVICE_AND_PAYMENTS", /** Pause the service and continue the billing. When resuming, extend the service by the time that was paused */ SERVICE_ONLY = "SERVICE_ONLY" } /** @enumType */ type PausePolicyWithLiterals = PausePolicy | 'NONE' | 'SERVICE_AND_PAYMENTS' | 'SERVICE_ONLY'; declare enum PauseAt { /** Cancel scheduled pause */ NONE = "NONE", /** Pause the subscription now */ IMMEDIATELY = "IMMEDIATELY", /** Pause the subscription at the next billing date */ NEXT_BILLING_DATE = "NEXT_BILLING_DATE", /** A specific date must be defined in Schedule.specific_date */ SPECIFIC_DATE = "SPECIFIC_DATE", /** The number of cycles must be defined in Schedule.number_of_cycles */ NUMBER_OF_CYCLES_FROM_TODAY = "NUMBER_OF_CYCLES_FROM_TODAY", /** Pause subscription after N billing cycles from the next billing date. Used for skip-cycle feature where customers skip future billing cycles. Requires Schedule.number_of_cycles to specify how many cycles to wait before pausing. */ NUMBER_OF_CYCLES_FROM_NEXT_BILLING_DATE = "NUMBER_OF_CYCLES_FROM_NEXT_BILLING_DATE" } /** @enumType */ type PauseAtWithLiterals = PauseAt | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_DATE' | 'SPECIFIC_DATE' | 'NUMBER_OF_CYCLES_FROM_TODAY' | 'NUMBER_OF_CYCLES_FROM_NEXT_BILLING_DATE'; declare enum ResumeAt { /** Cancel scheduled resume */ NONE = "NONE", /** Resume the subscription now */ IMMEDIATELY = "IMMEDIATELY", /** Resume the subscription at the next billing date */ NEXT_BILLING_DATE = "NEXT_BILLING_DATE", /** A specific date must be defined in Schedule.specific_date */ SPECIFIC_DATE = "SPECIFIC_DATE", /** Resume subscription after N billing cycles from when the pause starts. Automatically resumes subscription after skipping the specified number of cycles. Requires Schedule.number_of_cycles to specify how many cycles to skip before resuming. */ NUMBER_OF_CYCLES_FROM_PAUSE_START = "NUMBER_OF_CYCLES_FROM_PAUSE_START" } /** @enumType */ type ResumeAtWithLiterals = ResumeAt | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_DATE' | 'SPECIFIC_DATE' | 'NUMBER_OF_CYCLES_FROM_PAUSE_START'; interface CancellationInfo { /** Subscription cancel date. Can contain a future or past date */ cancellationDate?: Date | null; /** Initiator for cancellation */ initiator?: HistoryActionInitiatorWithLiterals; /** Reason for cancellation. Optional. */ reason?: string | null; } declare enum HistoryActionInitiator { UNDEFINED = "UNDEFINED", BUSINESS = "BUSINESS", CUSTOMER = "CUSTOMER", SYSTEM = "SYSTEM", PAYMENT_FAILURE = "PAYMENT_FAILURE" } /** @enumType */ type HistoryActionInitiatorWithLiterals = HistoryActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM' | 'PAYMENT_FAILURE'; interface SubscriptionUpdateData { /** @maxSize 100 */ itemsToUpdate?: ItemChange[]; /** @maxSize 99 */ itemsToAdd?: Item[]; /** * @format GUID * @maxSize 99 */ itemsToDelete?: string[] | null; /** @readonly */ numberOfRequests?: number; } interface ItemChange { /** * Item ID * @format GUID */ id?: string; pricingModel?: PricingModel; /** @min 1 */ quantity?: number | null; tax?: Tax; } interface PricingModel extends PricingModelModelOneOf { /** Fixed item price. */ fixedPrice?: FixedPrice; /** External/metered pricing (see ExternalPrice comment for details). */ externalPrice?: ExternalPrice; } /** @oneof */ interface PricingModelModelOneOf { /** Fixed item price. */ fixedPrice?: FixedPrice; /** External/metered pricing (see ExternalPrice comment for details). */ externalPrice?: ExternalPrice; } interface FixedPrice { /** * Fixed item price with a period as a decimal separator. For example, `3.99`. * Price doesn't include tax, discounts, or application fee. * * Min: `0.01` * @decimalValue options { gte:0.00, maxScale:4 } */ itemPrice?: string; } /** * External/metered pricing where price comes from an external provider at billing time. * * The external pricing provider is determined by the Subscription's PlatformOrigin.app_id. * BASS maintains a hardcoded mapping from app_id to the service client (e.g., CustomChargesService). * To add support for other platforms (e.g., eCom), add the mapping in BASS code. */ interface ExternalPrice { /** * Optional fixed base amount (added to external charges) * @decimalValue options { gte:0.00, maxScale:4 } */ baseAmount?: string | null; } interface Item { /** * Unique identifier of subscription item. Automatically generated and read-only. * @readonly * @format GUID */ id?: string | null; /** * Name of the item. Typically product name. * @minLength 1 * @maxLength 200 */ name?: string; /** * Description of the item. * @maxLength 500 */ description?: string | null; /** References to external product catalog data known to client. */ catalogReference?: CatalogReference; /** Category of item. Whether it is digital or physical one. */ category?: ItemCategoryWithLiterals; /** * Amount of products * @min 1 */ quantity?: number; /** Pricing model of the item. Whether fixed price or dynamic price models. */ pricingModel?: PricingModel; /** Tax, positive value, optional */ tax?: Tax; /** * Discounts applied on item price * @maxSize 5 */ discounts?: Discount[]; /** Application specific fee, positive value, optional (if application_fee == 0, don't include it to request). Only positive values. */ applicationFee?: ApplicationFee; /** * External reference identifier for mapping item in consumer's system. * This allows the consumer to correlate the item in their system with the item in this API. * @format GUID */ externalId?: string | null; /** * Unit base-price overrides for specific lifetime subscription cycles. Each entry replaces * pricing_model.fixed_price for the cycles it covers; unlisted cycles bill the fixed price. * Quantity, discounts, tax and application fee apply on top as usual. Fixed-price items only. * At most 5 entries, ranges must not overlap. Accepted only where the route supports it. * @maxSize 5 */ cyclePriceOverrides?: CyclePriceOverride[]; /** * Key / Value store to keep up to 10 additional values related to the subscription item. * Key max length = 50, Value max length = 200. Value can not be empty. * Should not include any sensitive or PII information. * @maxSize 10 */ metadata?: Record; } interface CatalogReference { /** * Product ID from the external catalog. * @minLength 1 * @maxLength 50 */ catalogItemId?: string; /** * ID of the app that the product catalog belongs to. * When omitted, BASS assumes that the product belongs to the subscription's * `origin.appId`. * * Min: 1 character * Max: 50 characters * @minLength 1 * @maxLength 50 */ appId?: string | null; } declare enum ItemCategory { UNKNOWN = "UNKNOWN", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL" } /** @enumType */ type ItemCategoryWithLiterals = ItemCategory | 'UNKNOWN' | 'PHYSICAL' | 'DIGITAL'; interface ApplicationFee extends ApplicationFeeValueOneOf { /** * Amount of the application fee in `0.00` format. * @format DECIMAL_VALUE */ amount?: string; /** * Discounts for the application fee. * * Max: 5 discounts * @maxSize 5 */ discounts?: Discount[]; } /** @oneof */ interface ApplicationFeeValueOneOf { /** * Amount of the application fee in `0.00` format. * @format DECIMAL_VALUE */ amount?: string; } interface CyclePriceOverride { /** * Lifetime subscription cycles the price applies to. Required. * Same shape and meaning as item discount cycles; empty number_of_cycles means until the end. */ cycles?: DiscountCycles; /** * Unit base price for these cycles, with a period as a decimal separator. For example, `35.00`. * Can be higher, lower or equal to the fixed price. `0` is valid; an empty value is rejected. * Price doesn't include tax, discounts, or application fee. * @decimalValue options { gte:0.00, maxScale:4 } */ itemPrice?: string; } interface SpecificDateSubscriptionUpdateData { updateData?: SubscriptionUpdateData; executionDate?: Date | null; } interface PlatformOrigin { /** @format GUID */ appId?: string | null; /** @format GUID */ entityId?: string | null; } /** A contract change that has been accepted and will take effect at the next renewal date. */ interface ScheduledContractChange { /** * The idempotency key from the original ChangeSubscription request. * @format GUID * @readonly */ idempotencyKey?: string; /** * The new billing settings that will apply after the renewal. * @readonly */ newBillingSettings?: BillingSettings; /** * The new items that will apply after the renewal. * @readonly * @maxSize 100 */ newItems?: Item[]; } interface SubscriptionBillingCyclePaid { /** The subscription for which one of the invoices has been marked as paid */ subscription?: Subscription; /** The cycle that has been marked as paid */ paidCycle?: number; /** * The invoice ID that has been marked as paid * @format GUID */ invoiceId?: string; /** * The transaction ID of the payment order that has been marked as paid * @format GUID */ paymentTransactionId?: string | null; } interface GetSubscriptionRequest { /** @format GUID */ id: string; } interface GetSubscriptionResponse { subscription?: Subscription; } interface CustomerCancelSubscriptionRequest { /** @format GUID */ id: string; /** Optional action reason message */ reason?: string | null; } interface CustomerCancelSubscriptionResponse { subscription?: Subscription; } /** * Sent each time a subscription status has been set to Canceled * Canceled shows that a subscription was canceled and ended its life cycle as a result of some intervention * For example: * * A user decided to cancel a subscription before the original end date * * A subscription is canceled due to bad payment */ interface SubscriptionCanceled { subscription?: Subscription; actionDetails?: ActionDetails; } interface ActionDetails { initiator?: HistoryActionInitiatorWithLiterals; reason?: string | null; } interface CustomerTurnOnAutoRenewalRequest { /** @format GUID */ id: string; /** Optional action reason message */ reason?: string | null; } interface CustomerTurnOnAutoRenewalResponse { subscription?: Subscription; } interface CustomerTurnOffAutoRenewalRequest { /** @format GUID */ id: string; /** Optional action reason message */ reason?: string | null; } interface CustomerTurnOffAutoRenewalResponse { subscription?: Subscription; } interface CustomerExtendSubscriptionRequest { /** * The ID of the subscription to be extended * @format GUID */ id: string; /** Optional action reason message */ reason?: string | null; /** * For termed - Subscription end date will be updated with the extension period and number of cycles will be added * @min 1 */ billingCyclesToAdd: number | null; } interface CustomerExtendSubscriptionResponse { /** The now extended subscription */ subscription?: Subscription; } interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf { extensionPeriod?: Duration; extensionBillingCycles?: number; subscription?: Subscription; actionDetails?: ActionDetails; } /** @oneof */ interface SubscriptionExtendedExtendPolicyOneOf { extensionPeriod?: Duration; extensionBillingCycles?: number; } interface QuerySubscriptionsRequest { query?: QueryV2; } interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and offset the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). */ sort?: Sorting[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ interface QueryV2PagingMethodOneOf { /** Paging options to limit and offset the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal * @maxSize 10 */ selectItemsBy?: Record[] | null; /** * Origin point for geo-distance sorting on a GEO field * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). */ origin?: AddressLocation; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QuerySubscriptionsResponse { subscriptions?: Subscription[]; metadata?: PagingMetadataV2; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. * @internal */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface CountSubscriptionsRequest { /** Filters to specify which subscriptions are counted. */ filter?: CountSubscriptionFilter; } interface CountSubscriptionFilter extends CountSubscriptionFilterStatusOneOf { /** List of statuses to filter the counted subscriptions by. */ statuses?: SubscriptionStatus; /** * Predefined status combination to filter the counted subscriptions by. * + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`. * + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`. */ statusGroup?: SubscriptionStatusGroupWithLiterals; /** * Customer ID to filter the counted subscriptions by. You can pass a * [member ID](https://bo.wix.com/wix-docs/rest/members/members/member-object), * [contact ID](https://bo.wix.com/wix-docs/rest/crm/contacts/contacts-v4/contact-object), * or the ID of an anonymous site visitor as `customerId`. When providing a * `customerId` you must also specify a `paymentMethodId`. * @format GUID */ customerId?: string | null; /** * ID of the payment method to filter the counted subscriptions by. * You must provide a `paymentMethodId` when passing a `customerId`. * @format GUID */ paymentMethodId?: string | null; } /** @oneof */ interface CountSubscriptionFilterStatusOneOf { /** List of statuses to filter the counted subscriptions by. */ statuses?: SubscriptionStatus; /** * Predefined status combination to filter the counted subscriptions by. * + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`. * + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`. */ statusGroup?: SubscriptionStatusGroupWithLiterals; } interface SubscriptionStatus { /** * Statuses to filter the counted subscriptions by. * * Max: 6 statuses * @maxSize 6 */ statuses?: SubscriptionStatusEnumSubscriptionStatusWithLiterals[]; } declare enum SubscriptionStatusGroup { /** @internal */ UNKNOWN_STATUS_GROUP = "UNKNOWN_STATUS_GROUP", ALL = "ALL", /** Union of ACTIVE, PAUSED and PENDING */ LIVE = "LIVE" } /** @enumType */ type SubscriptionStatusGroupWithLiterals = SubscriptionStatusGroup | 'ALL' | 'LIVE'; interface CountSubscriptionsResponse { /** * List of statuses and the corresponding number of subscriptions that match * the filters. */ countByStatus?: CountByStatus[]; /** Total number of subscriptions that match the filters. */ total?: number; } interface CountByStatus { /** Subscription status. */ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals; /** Number of subscriptions with the status that match the filters. */ count?: number; } interface UpdateSubscriptionPaymentMethodRequest { /** * Subscription ID * @format GUID */ id: string; /** @format GUID */ paymentMethodId: string; } interface UpdateSubscriptionPaymentMethodResponse { subscription?: Subscription; } interface CustomerAllowedActionsRequest { /** @format GUID */ id: string; } interface CustomerAllowedActionsResponse { actions?: Action[]; /** Enriched actions with per-action capability configuration for customer UI. */ customerActions?: CustomerAction[]; } interface Action { actionType?: ActionTypeWithLiterals; pausePolicies?: PausePolicyWithLiterals[]; pauseAt?: PauseAtWithLiterals[]; resumeAt?: ResumeAtWithLiterals[]; extendPolicies?: ExtendPolicyTypeWithLiterals[]; } declare enum ActionType { NONE = "NONE", CREATION = "CREATION", CANCEL = "CANCEL", CYCLE_AUTO_RENEW_ON = "CYCLE_AUTO_RENEW_ON", CYCLE_AUTO_RENEW_OFF = "CYCLE_AUTO_RENEW_OFF", PAUSE = "PAUSE", RESUME = "RESUME", MARK_AS_PAID = "MARK_AS_PAID", EXTEND = "EXTEND", UPDATE = "UPDATE", UPDATE_START_DATE = "UPDATE_START_DATE", UPM = "UPM", UPDATE_BILLING_DATE = "UPDATE_BILLING_DATE", UPDATE_COLLECTION_METHOD = "UPDATE_COLLECTION_METHOD", SKIP_CYCLE = "SKIP_CYCLE", CUSTOMER_UPDATE_BILLING_DATE = "CUSTOMER_UPDATE_BILLING_DATE", CHANGE_SUBSCRIPTION = "CHANGE_SUBSCRIPTION", /** UpdateSubscriptionItems with update_action NEXT_BILLING_CYCLE */ UPDATE_SUBSCRIPTION_ITEMS = "UPDATE_SUBSCRIPTION_ITEMS" } /** @enumType */ type ActionTypeWithLiterals = ActionType | 'NONE' | 'CREATION' | 'CANCEL' | 'CYCLE_AUTO_RENEW_ON' | 'CYCLE_AUTO_RENEW_OFF' | 'PAUSE' | 'RESUME' | 'MARK_AS_PAID' | 'EXTEND' | 'UPDATE' | 'UPDATE_START_DATE' | 'UPM' | 'UPDATE_BILLING_DATE' | 'UPDATE_COLLECTION_METHOD' | 'SKIP_CYCLE' | 'CUSTOMER_UPDATE_BILLING_DATE' | 'CHANGE_SUBSCRIPTION' | 'UPDATE_SUBSCRIPTION_ITEMS'; declare enum ExtendPolicyType { PERIOD = "PERIOD", BILLING_CYCLE = "BILLING_CYCLE" } /** @enumType */ type ExtendPolicyTypeWithLiterals = ExtendPolicyType | 'PERIOD' | 'BILLING_CYCLE'; /** * Enriched action returned by the customer AllowedActions API. * Each action includes its type and, when applicable, capability configuration * that clients can use to build informed UIs (e.g., max skip cycles, max days to advance). * Actions without a matching configuration variant (e.g., CREATION, EXTEND) carry type only. */ interface CustomerAction extends CustomerActionConfigurationOneOf { skip?: CustomerSkipConfiguration; pauseResume?: CustomerPauseResumeConfiguration; cancel?: CustomerCancelConfiguration; updateBillingDate?: CustomerUpdateBillingDateConfiguration; /** The type of customer action (e.g., CANCEL, SKIP_CYCLE, PAUSE). */ actionType?: ActionTypeWithLiterals; } /** @oneof */ interface CustomerActionConfigurationOneOf { skip?: CustomerSkipConfiguration; pauseResume?: CustomerPauseResumeConfiguration; cancel?: CustomerCancelConfiguration; updateBillingDate?: CustomerUpdateBillingDateConfiguration; } /** Capability configuration for skip cycle action. */ interface CustomerSkipConfiguration { /** Maximum number of billing cycles a customer can skip. Null if unlimited. */ maxSkipCycles?: number | null; /** Whether the customer can skip the next upcoming cycle. */ skipNextCycle?: boolean | null; /** Whether the customer can skip future (non-next) cycles. */ skipFutureCycles?: boolean | null; /** Whether the customer can cancel a previously scheduled skip. */ unskip?: boolean | null; /** Whether auto-resume after skipped cycles is enabled. */ autoResumeEnabled?: boolean | null; } /** Capability configuration for pause/resume actions. */ interface CustomerPauseResumeConfiguration { /** Maximum number of cycles after which a paused subscription auto-resumes. Null if unlimited. */ maxAutoResumeCycles?: number | null; } /** Capability configuration for cancel action (reserved for future use). */ interface CustomerCancelConfiguration { } /** Capability configuration for update billing date action. */ interface CustomerUpdateBillingDateConfiguration { /** Whether price adjustment (proration) is enabled when changing the billing date. */ priceAdjustmentEnabled?: boolean | null; /** Maximum number of days the billing date can be moved earlier. */ maxDaysAdvance?: number | null; /** Maximum number of days the billing date can be postponed. */ maxDaysPostpone?: number | null; } interface CustomerListUpcomingChargesRequest { /** * Subscription id upcoming charge to be previewed for * @format GUID */ id: string; } interface CustomerListUpcomingChargesResponse { /** Subscription upcoming charge. Will be empty if no more billing scheduled. */ upcomingCharge?: SubscriptionCharge; } interface SubscriptionCharge { /** cycle of future charge */ cycle?: number; /** date of the charge */ billingDate?: Date | null; /** breakdown of charge */ totals?: Totals; /** List of items in the invoice */ invoiceItems?: InvoiceItem[]; /** Discount details for the invoice */ discount?: InvoiceDiscount; } interface InvoiceItem extends InvoiceItemPaymentTypeOneOf, InvoiceItemPricingModelOneOf { /** Information about a line item that's purchased on a recurring basis. */ recurring?: Recurring; /** * Empty object that's available when the line item is purchased a single * time, not on a recurring basis. */ oneTime?: OneTime; /** Configuration for fixed price items. */ fixedPriceConfig?: FixedPriceConfig; /** Configuration for externally priced items (e.g., metered billing). */ externalPriceConfig?: ExternalPriceConfig; /** * ID of the invoice line item. * @format GUID */ id?: string; /** * ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object) * that belongs to the invoice line item. * @format GUID */ subscriptionId?: string | null; /** * Name of the invoice line item. * Typically the product name. * * Max: 200 characters * @minLength 1 * @maxLength 200 */ name?: string; /** * Description of the invoice line item. * * Max: 500 characters * @maxLength 500 */ description?: string | null; /** Information about the product from the external product catalog. */ catalogReference?: CatalogReference; /** * Product category. * * + `"UNKNOWN"`: There is no information about the product category. * + `"PHYSICAL"`: A physical product that's shipped to the shipping address. * + `"DIGITAL"`: A digital product that doesn't require shipping. */ category?: ItemCategoryWithLiterals; /** Quantity of the invoice line item. */ quantity?: number; /** Information about the invoice line item's price. */ priceDetails?: PriceDetails; /** Information about the invoice line item's totals */ totals?: Totals; /** * Information about the invoice line item's tax data * @readonly */ taxData?: ItemTaxData; /** * ID of the [one time] that belongs to the invoice line item. * @format GUID */ oneTimeItemId?: string | null; /** * Key / Value store to keep up to 10 additional values related to the invoice item. * Key max length = 50, Value max length = 200. Value can not be empty. * Should not include any sensitive or PII information. * @maxSize 10 */ metadata?: Record; } /** @oneof */ interface InvoiceItemPaymentTypeOneOf { /** Information about a line item that's purchased on a recurring basis. */ recurring?: Recurring; /** * Empty object that's available when the line item is purchased a single * time, not on a recurring basis. */ oneTime?: OneTime; } /** @oneof */ interface InvoiceItemPricingModelOneOf { /** Configuration for fixed price items. */ fixedPriceConfig?: FixedPriceConfig; /** Configuration for externally priced items (e.g., metered billing). */ externalPriceConfig?: ExternalPriceConfig; } interface Recurring { /** * Number of cycles. Describes how many times a customer purchases the line item * on a recurring basis. */ cycleNumber?: number; } interface OneTime { } interface PriceDetails { /** * Price of the invoice line item in `0.00` format. * A minus sign (-) indicates that the amount is negative. * @format DECIMAL_VALUE */ price?: string; /** Information about the invoice line item's tax. */ tax?: Tax; /** Discount that's applied to a specicific invoice line item. */ discount?: InvoiceDiscount; /** * Application fee. Set by the origin app, and not by BASS. Wix receives the * full `applicationFee`, while the merchant doesn't receive any portion of it. */ applicationFeeDetails?: InvoiceApplicationFee; /** * Platform fee configuration for this invoice line item. Defines how the platform * fee is applied (absorbed by merchant or passed on to customer) and the fee amount * (percentage or fixed amount). * @readonly */ platformFeeDetails?: InvoicePlatformFee; } interface InvoiceDiscount extends InvoiceDiscountValueOneOf { /** * Discount amount. * Available when the discount is an amount. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ amount?: string; /** * Discount percentage. * Available when the discount is a percentage value. * * Min: `0.01` * Max: `100` * @decimalValue options { gt:0.00, lte:100 } */ percentage?: string; /** Indicates the source of the discount. . Contains app_id and entity_id */ origin?: DiscountOrigin; } /** @oneof */ interface InvoiceDiscountValueOneOf { /** * Discount amount. * Available when the discount is an amount. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ amount?: string; /** * Discount percentage. * Available when the discount is a percentage value. * * Min: `0.01` * Max: `100` * @decimalValue options { gt:0.00, lte:100 } */ percentage?: string; } interface InvoiceApplicationFee extends InvoiceApplicationFeeValueOneOf { /** * Application fee amount. Set by the origin app, and not by BASS. Wix * receives the full `applicationFee`, while the merchant doesn't receive * any portion of it. * @format DECIMAL_VALUE */ amount?: string; /** Information about the discount for the invoice line item's application fee. */ discount?: InvoiceDiscount; } /** @oneof */ interface InvoiceApplicationFeeValueOneOf { /** * Application fee amount. Set by the origin app, and not by BASS. Wix * receives the full `applicationFee`, while the merchant doesn't receive * any portion of it. * @format DECIMAL_VALUE */ amount?: string; } interface InvoicePlatformFee extends InvoicePlatformFeeFeeModelOneOf { absorb?: AbsorbFeeConfig; passOn?: PassOnFeeConfig; } /** @oneof */ interface InvoicePlatformFeeFeeModelOneOf { absorb?: AbsorbFeeConfig; passOn?: PassOnFeeConfig; } interface AbsorbFeeConfig extends AbsorbFeeConfigValueOneOf { percentage?: PercentageFee; fixedAmount?: FixedAmountFee; } /** @oneof */ interface AbsorbFeeConfigValueOneOf { percentage?: PercentageFee; fixedAmount?: FixedAmountFee; } interface PercentageFee { /** @decimalValue options { gte:0.00, lte:100, maxScale:2 } */ percentage?: string; } interface FixedAmountFee { /** @decimalValue options { gte:0.00, maxScale:4 } */ amount?: string; } interface PassOnFeeConfig extends PassOnFeeConfigValueOneOf { percentage?: PercentageFee; fixedAmount?: FixedAmountFee; } /** @oneof */ interface PassOnFeeConfigValueOneOf { percentage?: PercentageFee; fixedAmount?: FixedAmountFee; } interface ItemTaxData { /** Aggregated tax from tax_breakdowns */ lineItemTaxSummary?: LineItemTaxSummary; /** * A detailed description of all the tax authorities applied on this item. * @minSize 1 * @maxSize 100 */ taxBreakdowns?: TaxBreakdown[]; } interface LineItemTaxSummary { /** * Calculated from external tax summary * @format DECIMAL_VALUE */ aggregatedTaxAmount?: string; /** * Aggregated from tax_breakdowns * @decimalValue options { gte:0, maxScale:6 } */ aggregatedTaxRate?: string; /** * Total taxable amount for this line item. * @format DECIMAL_VALUE * @decimalValue options { maxScale:4 } */ taxableAmount?: string; /** * Aggregated from tax_breakdowns after applying exemptions * @format DECIMAL_VALUE * @decimalValue options { maxScale:4 } */ finalTaxAmount?: string | null; /** * Tax amount the merchant is NOT collecting because the customer is responsible for paying the authority directly (reverse charge / exempt). Optional; absence is treated as zero. * @format DECIMAL_VALUE * @decimalValue options { maxScale:4 } */ exemptAmount?: string | null; } interface FixedPriceConfig { } interface ExternalPriceConfig { } interface InitiatePaymentMethodSetupRequest { id: string; paymentMode?: PaymentModeWithLiterals; paymentSettings?: PaymentSettings; } declare enum PaymentMode { NONE = "NONE", /** The latest invoice of the subscription will be charged. */ CHARGE = "CHARGE", /** An authorization invoice with zero amount will be created. */ AUTHORIZATION = "AUTHORIZATION" } /** @enumType */ type PaymentModeWithLiterals = PaymentMode | 'NONE' | 'CHARGE' | 'AUTHORIZATION'; interface PaymentSettings { /** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with "Wix Payments" provider. */ allowedProviderIds?: string[]; /** payment order method, define how the order was applied */ orderMethod?: OrderMethodWithLiterals; /** Wix Pay callback url(s) to return buyer to a third party system */ redirectUrls?: RedirectUrls; /** @format GUID */ paymentMethodId?: string | null; /** * Specifies an alternative origin for processing the payment. * When set, the payment order will be created with the specified origin * instead of the default origin. */ paymentOrigin?: PaymentOrigin; } declare enum OrderMethod { UNKNOWN = "UNKNOWN", MOTO = "MOTO", NOT_MOTO = "NOT_MOTO" } /** @enumType */ type OrderMethodWithLiterals = OrderMethod | 'UNKNOWN' | 'MOTO' | 'NOT_MOTO'; interface RedirectUrls { /** URL to redirect buyer in case of approved (successful) transaction (required) */ successUrl?: string; /** URL to redirect buyer in case of failed/rejected transaction (required) */ errorUrl?: string; /** URL to redirect buyer in case of buyer canceled the transaction (optional, default: `{error_url}`) */ cancelUrl?: string; /** * URL to redirect buyer in case of pending transaction (that might take some time to process) (optional, default: * `{success_url}`) */ pendingUrl?: string; } interface PaymentOrigin { /** * ID of the app for which the Payment will create the order on. For example, Paypal. * @format GUID */ appId?: string; /** * Id of the entity that order will be created on * @format GUID */ instanceId?: string; } interface InitiatePaymentMethodSetupResponse { /** @format GUID */ paymentOrderId?: string; } interface CustomerSkipCycleRequest { /** * ID of the subscription to skip cycles for. * @format GUID */ id: string; /** Number of billing cycles to skip. */ cyclesToSkip: number | null; /** When to start the skip. Contains number of cycles from next billing date. */ pauseAtSchedule?: ScheduleAdditionalInfo; /** Auto-resume scheduling information. Contains number of cycles from pause start. */ autoResumeAtSchedule?: ScheduleAdditionalInfo; /** Optional reason for the skip. */ reason?: string | null; } interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf { /** * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ` * format. The use of this field may be restricted in various BASS endpoints. * For example, in _Bulk Update Subscription Items_ it's only available in * combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_ * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`. */ specificDate?: Date | null; /** * When the update becomes effective, as number of billing cycles from now. * The use of this field may be restricted in various BASS endpoints. * For example, in _Pause Subscription_ it's only available in * combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`. * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_. * @min 1 * @max 120 */ numberOfCycles?: number; } /** @oneof */ interface ScheduleAdditionalInfoParamOneOf { /** * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ` * format. The use of this field may be restricted in various BASS endpoints. * For example, in _Bulk Update Subscription Items_ it's only available in * combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_ * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`. */ specificDate?: Date | null; /** * When the update becomes effective, as number of billing cycles from now. * The use of this field may be restricted in various BASS endpoints. * For example, in _Pause Subscription_ it's only available in * combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`. * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_. * @min 1 * @max 120 */ numberOfCycles?: number; } interface CustomerSkipCycleResponse { subscription?: Subscription; } interface CustomerCancelScheduledSkipRequest { /** * ID of the subscription to cancel the scheduled skip for. * @format GUID */ id: string; /** Optional reason for canceling the scheduled skip. */ reason?: string | null; } interface CustomerCancelScheduledSkipResponse { subscription?: Subscription; } interface CustomerPauseSubscriptionRequest { /** * ID of the subscription to pause. * @format GUID */ id: string; /** Pause policy to apply. */ pausePolicy?: PausePolicyWithLiterals; /** Optional reason for the pause. */ reason?: string | null; /** When to pause. For example, IMMEDIATELY or NEXT_BILLING_DATE. */ pauseAt?: PauseAtWithLiterals; /** Additional scheduling information for certain pause_at options. */ pauseAtSchedule?: ScheduleAdditionalInfo; /** Auto-resume scheduling information. */ autoResumeAtSchedule?: ScheduleAdditionalInfo; } interface CustomerPauseSubscriptionResponse { subscription?: Subscription; } interface CustomerResumeSubscriptionRequest { /** * ID of the subscription to resume. * @format GUID */ id: string; /** Optional reason for the resume. */ reason?: string | null; /** * When to resume. For example, IMMEDIATELY or NEXT_BILLING_DATE. * While a skip is running, only IMMEDIATELY is accepted: it ends the skip at the next billing * cycle boundary (the current skipped cycle stays skipped), never mid-cycle. */ resumeAt?: ResumeAtWithLiterals; /** Additional scheduling information for certain resume_at options. */ resumeAtSchedule?: ScheduleAdditionalInfo; } interface CustomerResumeSubscriptionResponse { subscription?: Subscription; } interface CustomerCancelScheduledPauseRequest { /** * ID of the subscription to cancel the scheduled pause for. * @format GUID */ id: string; /** Optional reason for canceling the scheduled pause. */ reason?: string | null; } interface CustomerCancelScheduledPauseResponse { subscription?: Subscription; } interface CustomerUpdateBillingDateRequest { /** * ID of the subscription to update the billing date for. * @format GUID */ id: string; /** New billing date. */ billingDate: Date | null; /** Optional proration settings. */ proration?: Proration; /** Optional reason for the update. */ reason?: string | null; } interface CustomerUpdateBillingDateResponse { subscription?: Subscription; } interface CustomerChangeSubscriptionRequest { /** @format GUID */ subscriptionId: string; /** @maxSize 100 */ itemChanges?: SubscriptionItemChange[]; newCycle?: Duration; effectiveTime?: ChangeEffectiveTimeWithLiterals; } /** * Describes a change to a single subscription item. * The caller (BG/CVS) resolves pricing from their catalog and passes concrete values. */ interface SubscriptionItemChange { /** * Which item to change. Must match an existing item ID in the subscription. * @format GUID */ itemId?: string; /** * New price per unit. Caller resolves this from their product catalog. * Required when changing product/plan. Optional for quantity-only changes (uses current price). * @decimalValue options { gte:0.00, maxScale:4 } */ newPrice?: string | null; /** * New quantity (seats/licenses). Optional — unchanged if not set. * @min 1 */ newQuantity?: number | null; /** * New catalog reference. Optional — set when changing to a different product. * This is metadata for the caller's tracking; BASS does not use it for pricing. */ newCatalogReference?: CatalogReference; /** * New item name. Optional — set when changing to a different product. * @maxLength 200 */ newName?: string | null; } declare enum ChangeEffectiveTime { UNKNOWN = "UNKNOWN", /** Apply change immediately with proration */ IMMEDIATELY = "IMMEDIATELY", /** Schedule change for the next billing cycle */ AT_NEXT_RENEWAL = "AT_NEXT_RENEWAL" } /** @enumType */ type ChangeEffectiveTimeWithLiterals = ChangeEffectiveTime | 'UNKNOWN' | 'IMMEDIATELY' | 'AT_NEXT_RENEWAL'; interface CustomerChangeSubscriptionResponse { subscription?: Subscription; } interface CustomerPreviewChangeSubscriptionRequest { /** @format GUID */ subscriptionId: string; /** @maxSize 100 */ itemChanges?: SubscriptionItemChange[]; newCycle?: Duration; effectiveTime?: ChangeEffectiveTimeWithLiterals; } interface CustomerPreviewChangeSubscriptionResponse { preview?: PreviewChangeSubscriptionResponse; } interface PreviewChangeSubscriptionResponse { /** Summary of the current subscription state */ current?: SubscriptionChangeSummary; /** Summary of the proposed subscription state after the change */ proposed?: SubscriptionChangeSummary; /** Proration preview details. Present only for immediate changes. */ proration?: ProrationPreview; /** Renewal preview. Present only for changes at next renewal. */ renewalPreview?: RenewalPreview; /** * Calculated first invoice for new_contract only. No invoice is stored. * Signed totals can be previewed; negative totals do not imply support for refund execution. */ invoicePreview?: Invoice; } /** Summary of a subscription's state, used in change previews. */ interface SubscriptionChangeSummary { /** Product ID */ productId?: string; /** Product name */ productName?: string; /** Billing cycle duration */ cycle?: Duration; /** Number of units */ quantity?: number; /** * Price per unit * @format DECIMAL_VALUE */ pricePerUnit?: string; /** * Total price (price_per_unit * quantity) * @format DECIMAL_VALUE */ totalPrice?: string; /** * Currency code (ISO 4217) * @format CURRENCY */ currency?: string; /** Current billing period start */ periodStart?: Date | null; /** Current billing period end */ periodEnd?: Date | null; } /** Preview of proration amounts for a proposed subscription change. */ interface ProrationPreview { /** * Credit amount for unused time on the current plan * @format DECIMAL_VALUE */ creditAmount?: string; /** * Charge amount for the new plan's prorated price. For new_contract, includes additional setup charges. * @format DECIMAL_VALUE */ chargeAmount?: string; /** * Net amount (charge minus credit). For new_contract, before exclusive tax or gross for inclusive pricing. * @format DECIMAL_VALUE */ netAmount?: string; /** * Tax amount on the net proration. Informational for inclusive pricing; do not add it again. * @format DECIMAL_VALUE */ taxAmount?: string; /** * Total amount including tax * @format DECIMAL_VALUE */ totalAmount?: string; /** Remaining seconds in the current billing period */ remainingSeconds?: string; /** Total seconds in the current billing cycle */ totalCycleSeconds?: string; /** New period end date. Present for new_contract previews and PRORATE_AND_EXTEND. */ newPeriodEnd?: Date | null; /** Number of days added to the billing period. Present when proration_behavior is PRORATE_AND_EXTEND. */ daysAdded?: number; /** * The proration action that would be taken. For new_contract, negative totals use UNKNOWN * because customer-credit execution is unsupported; zero totals use NO_CHANGE. */ action?: ProrationActionWithLiterals; } declare enum ProrationAction { UNKNOWN = "UNKNOWN", /** Net charge to customer */ CHARGE = "CHARGE", /** Net refund to customer */ REFUND = "REFUND", /** Extend billing period instead of refund */ EXTEND_PERIOD = "EXTEND_PERIOD", /** No financial change needed */ NO_CHANGE = "NO_CHANGE" } /** @enumType */ type ProrationActionWithLiterals = ProrationAction | 'UNKNOWN' | 'CHARGE' | 'REFUND' | 'EXTEND_PERIOD' | 'NO_CHANGE'; /** Preview of what the next renewal will look like after a change. */ interface RenewalPreview { /** * New price per unit at next renewal * @format DECIMAL_VALUE */ newPrice?: string; /** * New total at next renewal (price * quantity) * @format DECIMAL_VALUE */ newTotal?: string; /** Date of the next renewal */ nextRenewalDate?: Date | null; } /** An invoice includes information about the subscription and the customer. */ interface Invoice { /** * Invoice ID. * @format GUID * @readonly */ id?: string | null; /** * Date and time the invoice was created. * @readonly */ createdDate?: Date | null; /** * Date and time the invoice was last updated. * @readonly */ updatedDate?: Date | null; /** * Revision number, which increments by 1 each time the invoice is updated. * To prevent conflicting changes, * the current revision must be passed when updating the invoice. * * Ignored when creating a invoice. * @readonly */ revision?: string | null; /** * Source of the invoice. * @internal */ source?: string | null; /** Information about the invoice origin. */ origin?: BusinessOriginData; /** * Invoice status. * * + `"UNKNOWN"`: There is no information about the invoice status. * + `"OPEN"`: BASS has created the invoice but hasn't initiated the payment process. * + `"PAID"`: The customer has successfully paid for the invoice. * + `"ATTEMPT_FAILED"`: The payment process has started and there has been at least one unsuccessful payment attempt. * + `"FAILED"`: The payment process has failed and there are no more retries. * + `"CANCELED"`: The payment process has been stopped because the related subscription has been canceled. * @readonly */ status?: InvoiceStatusWithLiterals; /** * 3-letter currency code of the invoice in * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. * @format CURRENCY */ currency?: string; /** Information about the customer. */ customer?: Customer; /** * Whether the payment is processed through Wix and whether the customer must provide some input. * * + `"UNKNOWN"`: There is no information about the collection method. * + `"AUTO_CHARGE"`: The customer pays automatically through Wix. * + `"SEND_INVOICE"`: The customer pays through Wix, but some manual input is required. * + `"OFFLINE"`: The customer pays outside of Wix. */ collectionMethod?: CollectionMethodWithLiterals; /** * ID of the * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object). * Not available for the first payment of a subscription and all offline * payments. * @format GUID */ paymentMethodId?: string | null; /** * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object) * for the corresponding payment. * @format GUID * @readonly */ paymentOrderId?: string | null; /** Information about a discount. Available only for invoices that include a discount. */ discount?: InvoiceDiscount; /** Billing address. */ billingAddress?: FullAddressDetails; /** Shipping address. Available only for `"PHYSICAL"` line items. */ shippingAddress?: FullAddressDetails; /** * Shipping fee in `0.00` format. * @format DECIMAL_VALUE */ shippingFee?: string | null; /** * Information about the invoice's totals. * @readonly */ totals?: Totals; /** Line items belonging to the invoice. */ invoiceItems?: InvoiceItem[]; /** * Whether the invoice is used to validate payment details. * * + `true`: BASS uses the invoice to test payment details. Relevant for free trials. Ensures that Wix can collect the payment of the first billing cycle. * + `false`: Standard invoice. */ isAuthorization?: boolean | null; /** Whether the invoice's `totals.totalPrice` includes tax. */ isTaxInclusive?: boolean | null; /** * Information about the invoice creation process. * * + `"UNKNOWN"`: There is no information about how BASS created the invoice. * + `"SYSTEM"`: BASS automatically created the invoice. * + `"MANUAL"`: A BASS system admin manually created the invoice. * @internal */ creationMode?: CreationModeWithLiterals; /** Details of the latest payment attempt. */ latestPaymentAttempt?: LatestPaymentAttempt; /** List of charges and credits that adjust the invoice's `totals.totalPrice`. */ adjustments?: PriceAdjustment[]; /** * Invoice Number. * @maxLength 10 * @readonly */ invoiceNumber?: string | null; /** * Shipping charges for the invoice. * Supports only one discount without cycles. * Discounts with cycles (repeated discounts across different billing cycles) are not supported for shipping */ shippingCharges?: InvoiceShippingCharges; /** Information about the invoice tax */ taxData?: TaxData; /** Business address. */ businessAddress?: Address; /** * ID of the billing order that created this invoice. * @format GUID */ orderId?: string | null; /** * Platform origin the invoice is originated from. * @format GUID */ platformOriginAppId?: string | null; /** * Refund information, provided that there are refunds for this invoice. * @readonly */ refundInfo?: RefundInfo; /** * Payment already collected outside of BASS, copied from the order. * The invoice is issued for its full total. BASS charges the payment gateway only for the rest. * @internal * @readonly */ externallyCollectedPayment?: ExternallyCollectedPayment; } interface BusinessOriginData { /** * ID of the app for which BASS has created the invoice. For example, * `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app. * @format GUID */ appId?: string; /** * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance) * of the app for which BASS has created the invoice. * @format GUID */ instanceId?: string; /** * ID of the entity that triggered the invoice creation. For example, the ID of a * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object). * @format GUID */ entityId?: string; } declare enum InvoiceStatus { UNKNOWN = "UNKNOWN", OPEN = "OPEN", PAID = "PAID", FAILED = "FAILED", ATTEMPT_FAILED = "ATTEMPT_FAILED", CANCELED = "CANCELED", REFUNDED = "REFUNDED", CHARGEBACKED = "CHARGEBACKED" } /** @enumType */ type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN' | 'OPEN' | 'PAID' | 'FAILED' | 'ATTEMPT_FAILED' | 'CANCELED' | 'REFUNDED' | 'CHARGEBACKED'; declare enum CollectionMethod { UNKNOWN = "UNKNOWN", AUTO_CHARGE = "AUTO_CHARGE", OFFLINE = "OFFLINE", SEND_INVOICE = "SEND_INVOICE" } /** @enumType */ type CollectionMethodWithLiterals = CollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE'; declare enum CreationMode { UNKNOWN = "UNKNOWN", SYSTEM = "SYSTEM", MANUAL = "MANUAL" } /** @enumType */ type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL'; interface LatestPaymentAttempt { /** * ID of the latest payment attempt. * @format GUID * @readonly */ paymentAttemptId?: string; /** * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format. * @readonly */ dateAttempt?: Date | null; /** Number of the latest payment attempt. */ attemptNumber?: number; /** * Status of the latest payment attempt. * * + `"UNKNOWN"`: There is no information about the status of the latest payment attempt. * + `"SCHEDULED"`: The latest payment attempt is scheduled but hasn't started yet. * + `"IN_PROGRESS"`: The latest payment attempt is in progress. * + `"PAID"`: The latest payment attempt resulted in a successful payment. * + `"DECLINED"`: The latest payment attempt has been declined. * + `"TECHNICAL_FAILURE"`: The latest payment attempt couldn't be process due to a technical failure. * + `"CANCELED"`: The latest payment attempt has been canceled by BASS. * @readonly */ status?: PaymentAttemptStatusWithLiterals; /** * Whether BASS tries to collect the payment another time. Available only when * `latestPaymentAttempt.status` is set to `"DECLINED"`. */ retryable?: boolean; /** * Platform fee that was collected on this transaction. * @format DECIMAL_VALUE * @decimalValue options { gte:0.00, maxScale:4 } * @readonly */ appliedPlatformFee?: string | null; } declare enum PaymentAttemptStatus { UNKNOWN = "UNKNOWN", SCHEDULED = "SCHEDULED", IN_PROGRESS = "IN_PROGRESS", PAID = "PAID", DECLINED = "DECLINED", TECHNICAL_FAILURE = "TECHNICAL_FAILURE", CANCELED = "CANCELED", PENDING = "PENDING", REFUNDED = "REFUNDED", CHARGEBACKED = "CHARGEBACKED" } /** @enumType */ type PaymentAttemptStatusWithLiterals = PaymentAttemptStatus | 'UNKNOWN' | 'SCHEDULED' | 'IN_PROGRESS' | 'PAID' | 'DECLINED' | 'TECHNICAL_FAILURE' | 'CANCELED' | 'PENDING' | 'REFUNDED' | 'CHARGEBACKED'; interface PriceAdjustment extends PriceAdjustmentAdjustmentTypeOneOf { /** Adjustment that increases the price. */ charge?: PriceAdjustmentValue; /** Adjustment that lowers the price. */ credit?: PriceAdjustmentValue; /** Reason for this price adjustment. Used to categorize proration adjustments. */ reason?: PriceAdjustmentReasonWithLiterals; } /** @oneof */ interface PriceAdjustmentAdjustmentTypeOneOf { /** Adjustment that increases the price. */ charge?: PriceAdjustmentValue; /** Adjustment that lowers the price. */ credit?: PriceAdjustmentValue; } interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValueTypeOneOf { /** * Absolute amount that adjusts the price. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ amount?: string; /** * Relative factor that adjusts the price. For example, setting * `multiplier` to: * - `0.50` results in a price adjustment of 50% of the original value. * - `0.75` results in a price adjustment of 75% of the original value. * - `1.00` results in a price adjustment of 100% of the original value. * * Min: `0.01` * Max: `1.00` * @decimalValue options { gt:0.00, lte:1 } */ multiplier?: string; } /** @oneof */ interface PriceAdjustmentValueAdjustmentValueTypeOneOf { /** * Absolute amount that adjusts the price. * * Min: `0.01` * @decimalValue options { gt:0.00 } */ amount?: string; /** * Relative factor that adjusts the price. For example, setting * `multiplier` to: * - `0.50` results in a price adjustment of 50% of the original value. * - `0.75` results in a price adjustment of 75% of the original value. * - `1.00` results in a price adjustment of 100% of the original value. * * Min: `0.01` * Max: `1.00` * @decimalValue options { gt:0.00, lte:1 } */ multiplier?: string; } /** Reason for a price adjustment. Categorizes different types of proration adjustments. */ declare enum PriceAdjustmentReason { /** Default value. Used for adjustments without a specific categorization. */ PRICE_ADJUSTMENT_REASON_UNSPECIFIED = "PRICE_ADJUSTMENT_REASON_UNSPECIFIED", /** Adjustment due to a billing date change. */ BILLING_DATE_CHANGE = "BILLING_DATE_CHANGE", /** Proration adjustment from changing the subscription plan. */ PLAN_CHANGE_PRORATION = "PLAN_CHANGE_PRORATION", /** Proration adjustment from changing the billing cycle (e.g., monthly to yearly). */ CYCLE_CHANGE_PRORATION = "CYCLE_CHANGE_PRORATION", /** Proration adjustment from changing the subscription quantity. */ QUANTITY_CHANGE_PRORATION = "QUANTITY_CHANGE_PRORATION", /** Custom adjustment provided by the caller. */ CUSTOM_PRICE_ADJUSTMENT = "CUSTOM_PRICE_ADJUSTMENT" } /** @enumType */ type PriceAdjustmentReasonWithLiterals = PriceAdjustmentReason | 'PRICE_ADJUSTMENT_REASON_UNSPECIFIED' | 'BILLING_DATE_CHANGE' | 'PLAN_CHANGE_PRORATION' | 'CYCLE_CHANGE_PRORATION' | 'QUANTITY_CHANGE_PRORATION' | 'CUSTOM_PRICE_ADJUSTMENT'; interface InvoiceShippingCharges { /** * Amount of the shipping fee in `0.00` format. * * Min: `0.01` * @decimalValue options { gte:0.00, maxScale:4 } */ amount?: string; /** Tax of the shipping fee */ tax?: Tax; /** Information about the shipping charges tax data */ taxData?: ItemTaxData; discount?: Discount; } /** Tax data from all items */ interface TaxData { /** Aggregated tax data from all items */ taxSummary?: TaxSummary; } interface TaxSummary { /** * Aggregated from tax_breakdowns with exemptions excluded from amount * @format DECIMAL_VALUE */ aggregatedTaxAmount?: string; /** * Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`. * @maxSize 50 */ aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[]; /** * Tax amount the merchant is NOT collecting because the customer is responsible for paying the authority directly (reverse charge / exempt). Optional; absence is treated as zero. * @format DECIMAL_VALUE * @decimalValue options { maxScale:4 } */ exemptAmount?: string | null; } interface AggregatedTaxBreakdown { /** * Name of the tax that was calculated. * @maxLength 200 */ taxName?: string; /** * Type of tax that was calculated. * @maxLength 200 */ taxType?: string; /** * Jurisdiction that taxes were calculated for. * @maxLength 200 */ jurisdiction?: string; /** Type of jurisdiction that taxes were calculated for. */ jurisdictionType?: string; /** * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`. * @decimalValue options { gte:0, maxScale:6 } */ rate?: string; /** * Total amount of this tax for this jurisdiction. * @format DECIMAL_VALUE * @decimalValue options { maxScale:4 } */ aggregatedTaxAmount?: string; /** * Total taxable amount of this tax * @internal * @format DECIMAL_VALUE * @decimalValue options { maxScale:4 } */ aggregatedTaxableAmount?: string; } interface RefundInfo { /** * If refunds are present, this will include the total amount refunded. * @format DECIMAL_VALUE * @decimalValue options { gte:0.00, maxScale:4 } */ totalRefundAmount?: string | null; /** * The refunds that have been applied to this invoice * @maxSize 20 */ refunds?: Refund[]; } interface Refund { /** * refund amount * @format DECIMAL_VALUE * @decimalValue options { gt:0.00, maxScale:4 } */ amount?: string; /** the date of the refund transaction */ transactionDate?: Date | null; /** * the transaction id associated with this refund * @format GUID */ transactionId?: string; /** a reason for the refund */ reason?: RefundReasonWithLiterals; /** * a description of the refund - this is a free text field for the initiator * @maxLength 255 */ description?: string | null; } declare enum RefundReason { DUPLICATE_CHARGE = "DUPLICATE_CHARGE", FRAUDULENT = "FRAUDULENT", CUSTOMER_REQUEST = "CUSTOMER_REQUEST", PROVISION_FAILED = "PROVISION_FAILED", OTHER = "OTHER" } /** @enumType */ type RefundReasonWithLiterals = RefundReason | 'DUPLICATE_CHARGE' | 'FRAUDULENT' | 'CUSTOMER_REQUEST' | 'PROVISION_FAILED' | 'OTHER'; interface ExternallyCollectedPayment { /** * Amount collected outside of BASS. * @decimalValue options { gte:0.00, maxScale:4 } */ amount?: string; /** * Source of the externally collected payment. * * + `"GIFT_CARD"`: A gift card redeemed by the calling app. */ source?: PaymentSourceWithLiterals; } declare enum PaymentSource { GIFT_CARD = "GIFT_CARD" } /** @enumType */ type PaymentSourceWithLiterals = PaymentSource | 'GIFT_CARD'; interface CustomerCancelPendingChangeRequest { /** @format GUID */ subscriptionId: string; } interface CustomerCancelPendingChangeResponse { subscription?: Subscription; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; /** * Optional domain-specific metadata defined by the API owner, encoded as JSON. * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * Map of fully qualified field paths to their previous values for fields that changed. * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format) * @internal */ modifiedFields?: Record; /** * Optional domain-specific metadata defined by the API owner, encoded as JSON. * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted. */ deletedEntityAsJson?: string | null; /** * Optional domain-specific metadata defined by the API owner, encoded as JSON. * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } interface ListSubscriptionHistoryRequest { /** @format GUID */ subscriptionId: string; /** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */ mode?: HistoryViewModeWithLiterals; /** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */ cursor?: CursorPaging; } declare enum HistoryViewMode { UNKNOWN = "UNKNOWN", /** Comprehensive view including all history events. */ BACKOFFICE = "BACKOFFICE", /** User-centric view of the history. */ USER = "USER" } /** @enumType */ type HistoryViewModeWithLiterals = HistoryViewMode | 'UNKNOWN' | 'BACKOFFICE' | 'USER'; interface ListSubscriptionHistoryResponse { /** List of history entries for the subscription. */ historyEntries?: SubscriptionHistoryEntry[]; /** Paging metadata. A `next` cursor is returned if there are more results. */ pagingMetadata?: PagingMetadataV2; } interface SubscriptionHistoryEntry { /** @format GUID */ entryId?: string; /** TODO: add max length? it is not defined in domainevents, so should we? */ slug?: string; entryTime?: Date | null; event?: SubscriptionEvent; } interface SubscriptionEvent extends SubscriptionEventPayloadOneOf { created?: SubscriptionCreated; updated?: SubscriptionUpdated; deleted?: SubscriptionDeleted; activated?: SubscriptionActivated; ended?: SubscriptionEnded; canceled?: SubscriptionCanceled; paused?: SubscriptionPaused; resumed?: SubscriptionResumed; pauseRequested?: PauseSubscriptionRequested; resumeRequested?: ResumeSubscriptionRequested; scheduledPauseCanceled?: ScheduledPauseCanceled; scheduledResumeCanceled?: ScheduledResumeCanceled; billingCycleStarted?: SubscriptionBillingCycleStarted; autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn; autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff; cycleReadyToPay?: SubscriptionCycleReadyToPay; extended?: SubscriptionExtended; initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted; latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid; revived?: SubscriptionRevived; billingDateUpdated?: SubscriptionBillingDateUpdated; futureUpdatesRequested?: FutureUpdatesRequested; updatesApplied?: UpdatesApplied; resetPendingUpdates?: ResetPendingUpdates; gracePeriodStarted?: GracePeriodStarted; gracePeriodEnded?: GracePeriodEnded; paymentMethodUpdated?: PaymentMethodUpdated; collectionMethodUpdated?: SubscriptionCollectionMethodUpdated; freeTrailStarted?: FreeTrailStarted; freeTrailEnded?: FreeTrailEnded; billingCyclePaid?: SubscriptionBillingCyclePaid; initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup; futurePriceUpdatesRequested?: FuturePriceUpdatesRequested; /** Fired once when an offline subscription purchase is completed (BILL-534). */ offlinePurchaseCompleted?: SubscriptionOfflinePurchaseCompleted; /** Fired when eCom reports changes on a billing cycle (BILL-943). */ cycleContentChangesApplied?: CycleContentChangesApplied; subscriptionBoAction?: SubscriptionBackOfficeAction; unknown?: UnknownSubscriptionEvent; } /** @oneof */ interface SubscriptionEventPayloadOneOf { created?: SubscriptionCreated; updated?: SubscriptionUpdated; deleted?: SubscriptionDeleted; activated?: SubscriptionActivated; ended?: SubscriptionEnded; canceled?: SubscriptionCanceled; paused?: SubscriptionPaused; resumed?: SubscriptionResumed; pauseRequested?: PauseSubscriptionRequested; resumeRequested?: ResumeSubscriptionRequested; scheduledPauseCanceled?: ScheduledPauseCanceled; scheduledResumeCanceled?: ScheduledResumeCanceled; billingCycleStarted?: SubscriptionBillingCycleStarted; autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn; autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff; cycleReadyToPay?: SubscriptionCycleReadyToPay; extended?: SubscriptionExtended; initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted; latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid; revived?: SubscriptionRevived; billingDateUpdated?: SubscriptionBillingDateUpdated; futureUpdatesRequested?: FutureUpdatesRequested; updatesApplied?: UpdatesApplied; resetPendingUpdates?: ResetPendingUpdates; gracePeriodStarted?: GracePeriodStarted; gracePeriodEnded?: GracePeriodEnded; paymentMethodUpdated?: PaymentMethodUpdated; collectionMethodUpdated?: SubscriptionCollectionMethodUpdated; freeTrailStarted?: FreeTrailStarted; freeTrailEnded?: FreeTrailEnded; billingCyclePaid?: SubscriptionBillingCyclePaid; initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup; futurePriceUpdatesRequested?: FuturePriceUpdatesRequested; /** Fired once when an offline subscription purchase is completed (BILL-534). */ offlinePurchaseCompleted?: SubscriptionOfflinePurchaseCompleted; /** Fired when eCom reports changes on a billing cycle (BILL-943). */ cycleContentChangesApplied?: CycleContentChangesApplied; subscriptionBoAction?: SubscriptionBackOfficeAction; unknown?: UnknownSubscriptionEvent; } interface SubscriptionCreated { subscription?: Subscription; } interface SubscriptionUpdated { current?: Subscription; previous?: Subscription; diff?: SubscriptionDiff; } interface SubscriptionDiff { added?: string | null; changed?: string | null; deleted?: string | null; } interface SubscriptionDeleted { subscriptionId?: string; } /** * Sent each time a subscription status has been set to Active * Active shows that a subscription is live and operational. * For example: * * For subscription with free trial, free trial start date is also the activation date. * * For a subscription with future start date, the start date is also the activation date. * * When a subscription is resumed from a pause status, the resume date is also the activation date. */ interface SubscriptionActivated { subscription?: Subscription; } /** * Sent each time a subscription status has been set to Ended * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement. * This is different from a Canceled subscription which ends the subscription before a designated end date. * Therefore, Ended and Canceled are mutually exclusive. */ interface SubscriptionEnded { subscription?: Subscription; } interface SubscriptionPaused { subscription?: Subscription; pausePolicy?: PausePolicyWithLiterals; actionDetails?: ActionDetails; } interface SubscriptionResumed { subscription?: Subscription; actionDetails?: ActionDetails; pauseInfo?: PauseInfo; } interface PauseSubscriptionRequested { subscription?: Subscription; pauseAt?: PauseAtWithLiterals; pausePolicy?: PausePolicyWithLiterals; actionDetails?: ActionDetails; } interface ResumeSubscriptionRequested { subscription?: Subscription; resumeAt?: ResumeAtWithLiterals; actionDetails?: ActionDetails; } interface ScheduledPauseCanceled { subscription?: Subscription; actionDetails?: ActionDetails; } interface ScheduledResumeCanceled { subscription?: Subscription; actionDetails?: ActionDetails; } interface SubscriptionBillingCycleStarted { subscription?: Subscription; /** * Wix Pay transaction id, optional. Exists if event was triggered by a payment. * @format GUID */ paymentTransactionId?: string | null; } interface SubscriptionAutoRenewalTurnedOn { subscription?: Subscription; actionDetails?: ActionDetails; } interface SubscriptionAutoRenewalTurnedOff { subscription?: Subscription; actionDetails?: ActionDetails; } interface SubscriptionCycleReadyToPay { subscription?: Subscription; } interface SubscriptionInitialPurchaseCompleted { subscription?: Subscription; actionDetails?: ActionDetails; /** @format GUID */ paymentTransactionId?: string | null; } interface LatestInvoiceMarkedAsPaid { subscription?: Subscription; } interface SubscriptionRevived { subscription?: Subscription; } interface SubscriptionBillingDateUpdated { subscription?: Subscription; billingDate?: Date | null; proration?: Proration; } interface FutureUpdatesRequested { subscription?: Subscription; requestedUpdateData?: SubscriptionUpdateData; /** * idempotency_key of the UpdateSubscriptionItems request that requested these updates, when the caller set one. * @format GUID */ idempotencyKey?: string | null; } interface UpdatesApplied { subscription?: Subscription; updateAction?: UpdateActionWithLiterals; appliedUpdateData?: SubscriptionUpdateData; /** Initiator and reason supplied with the change request. Present for new_contract activations. */ actionDetails?: ActionDetails; /** * idempotency_key of the ChangeSubscription request that this activation applied. new_contract activations only. * @format GUID */ idempotencyKey?: string | null; } declare enum UpdateAction { NONE = "NONE", /** Update subscription immediately, please note proration for updates changing price are not yet supported */ IMMEDIATELY = "IMMEDIATELY", /** Request updates that will take affect only at the start of the next billing cycle. */ NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE", /** Reset all pending updates */ RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES", /** Request updates that will take affect only at a specific date. */ SPECIFIC_DATE = "SPECIFIC_DATE" } /** @enumType */ type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE'; interface ResetPendingUpdates { subscription?: Subscription; } interface GracePeriodStarted { subscription?: Subscription; } interface GracePeriodEnded { subscription?: Subscription; /** Indication for the payment settlement method. */ paymentSettlementMethod?: PaymentSettlementMethodWithLiterals; } declare enum PaymentSettlementMethod { UNKNOWN = "UNKNOWN", /** System-defined payment settlement. */ SYSTEM = "SYSTEM", /** Manually mark the payment as paid. */ MARK_AS_PAID = "MARK_AS_PAID", /** Require the customer to pay immediately, by insert a new payment method. */ CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW" } /** @enumType */ type PaymentSettlementMethodWithLiterals = PaymentSettlementMethod | 'UNKNOWN' | 'SYSTEM' | 'MARK_AS_PAID' | 'CUSTOMER_PAY_NOW'; interface PaymentMethodUpdated { subscription?: Subscription; initiator?: HistoryActionInitiatorWithLiterals; paymentMode?: PaymentModeWithLiterals; } interface SubscriptionCollectionMethodUpdated { subscription?: Subscription; newCollectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals; previousCollectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals; } interface FreeTrailStarted { subscription?: Subscription; } interface FreeTrailEnded { subscription?: Subscription; } interface InitiatedPaymentMethodSetup { subscription?: Subscription; } interface FuturePriceUpdatesRequested { subscription?: Subscription; requestedUpdateData?: SubscriptionUpdateData; } interface SubscriptionOfflinePurchaseCompleted { subscription?: Subscription; actionDetails?: ActionDetails; } /** * Fired at renewal when eCom reports changes since the last charged cycle (D-71, BILL-943). * Published after the cycle's invoice is created and the charged content is saved to the subscription. * Not published when there are no changes. */ interface CycleContentChangesApplied { /** The subscription after writing eCom's content over it. */ subscription?: Subscription; /** Cycle number of the invoice being created (currentCycle + 1 at invoice build time). */ cycleNumber?: number; /** * The implementer's summary of edits since the last charged cycle, as eCom returned them. * Each entry's summary carries the item/discount/fee name, which is what the UI needs. * @maxSize 100 */ changes?: CycleContentChange[]; } /** * One edit since the last charged cycle, as eCom reported it, for history. * Mirrors com.wix.billing.subscriptions.spi.CycleChange. */ interface CycleContentChange extends CycleContentChangeValueOneOf { /** An item's quantity, price, name or description changed. */ itemChanged?: CycleItemChange; /** An item was added. */ itemAdded?: CycleItemSummary; /** An item was removed. */ itemRemoved?: CycleItemSummary; /** A discount was added. */ discountAdded?: CycleDiscountSummary; /** A discount was removed. */ discountRemoved?: CycleDiscountSummary; /** An additional fee was added. */ feeAdded?: CycleFeeSummary; /** An additional fee was removed. */ feeRemoved?: CycleFeeSummary; /** Shipping was added or removed, or its amount changed. */ shippingChanged?: CycleShippingChange; /** The cycle total changed. */ totalChanged?: CycleTotalChange; /** The billing address changed. */ billingAddressChanged?: CycleAddressChange; /** The delivery address changed. */ shippingAddressChanged?: CycleAddressChange; /** * Number of cycles the edit affects, this cycle included: 1 is this cycle only. * Unset means from this cycle on, with no end. * @min 1 */ cycles?: number | null; } /** @oneof */ interface CycleContentChangeValueOneOf { /** An item's quantity, price, name or description changed. */ itemChanged?: CycleItemChange; /** An item was added. */ itemAdded?: CycleItemSummary; /** An item was removed. */ itemRemoved?: CycleItemSummary; /** A discount was added. */ discountAdded?: CycleDiscountSummary; /** A discount was removed. */ discountRemoved?: CycleDiscountSummary; /** An additional fee was added. */ feeAdded?: CycleFeeSummary; /** An additional fee was removed. */ feeRemoved?: CycleFeeSummary; /** Shipping was added or removed, or its amount changed. */ shippingChanged?: CycleShippingChange; /** The cycle total changed. */ totalChanged?: CycleTotalChange; /** The billing address changed. */ billingAddressChanged?: CycleAddressChange; /** The delivery address changed. */ shippingAddressChanged?: CycleAddressChange; } /** * An item edit. * Mirrors com.wix.billing.subscriptions.spi.ItemChange. */ interface CycleItemChange { /** * externalId of the item. * @format GUID */ externalId?: string; /** * Item name after the change, for display. * @maxLength 200 */ name?: string; /** Quantity change. Unset when the quantity didn't change. */ quantityChange?: CycleQuantityChange; /** Unit price change. Unset when the price didn't change. */ priceChange?: CycleAmountChange; /** Name change. Unset when the name didn't change. */ nameChange?: CycleTextChange; /** Description lines added or removed. Unset when the description didn't change. */ descriptionChange?: CycleDescriptionLinesChange; } /** * A quantity change of an item. * Mirrors com.wix.billing.subscriptions.spi.QuantityChange. */ interface CycleQuantityChange { /** Quantity before the change. */ originalQuantity?: number; /** Quantity after the change. */ newQuantity?: number; /** * Absolute difference between the original and the new quantity. * @min 1 */ diff?: number; /** Whether the quantity increased or decreased. */ deltaType?: CycleQuantityChangeTypeWithLiterals; } declare enum CycleQuantityChangeType { UNKNOWN_CYCLE_QUANTITY_CHANGE_TYPE = "UNKNOWN_CYCLE_QUANTITY_CHANGE_TYPE", /** The quantity increased. */ QUANTITY_INCREASED = "QUANTITY_INCREASED", /** The quantity decreased. */ QUANTITY_DECREASED = "QUANTITY_DECREASED" } /** @enumType */ type CycleQuantityChangeTypeWithLiterals = CycleQuantityChangeType | 'UNKNOWN_CYCLE_QUANTITY_CHANGE_TYPE' | 'QUANTITY_INCREASED' | 'QUANTITY_DECREASED'; /** * An amount change. * Mirrors com.wix.billing.subscriptions.spi.AmountChange. */ interface CycleAmountChange { /** * Amount before the change. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:3 } */ originalAmount?: string; /** * Amount after the change. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:3 } */ newAmount?: string; } /** * A text change. * Mirrors com.wix.billing.subscriptions.spi.TextChange. */ interface CycleTextChange { /** * Text before the change. * @maxLength 200 */ originalText?: string; /** * Text after the change. * @maxLength 200 */ newText?: string; } /** * A description edit, as lines. * Mirrors com.wix.billing.subscriptions.spi.DescriptionLinesChange. */ interface CycleDescriptionLinesChange { /** * Description lines added to the item. * @maxSize 20 */ addedLines?: CycleDescriptionLine[]; /** * Description lines removed from the item. * @maxSize 20 */ removedLines?: CycleDescriptionLine[]; } /** * One line of an item's description. * Mirrors com.wix.billing.subscriptions.spi.DescriptionLine. */ interface CycleDescriptionLine { /** * Text of the line. * @minLength 1 * @maxLength 500 */ text?: string; } /** * An item that was added or removed. * Mirrors com.wix.billing.subscriptions.spi.ItemSummary. */ interface CycleItemSummary { /** * externalId of the item. * @format GUID */ externalId?: string; /** * Item name. * @maxLength 200 */ name?: string; /** * Quantity added or removed. * @min 1 */ quantity?: number; } /** * A discount that was added or removed. * Mirrors com.wix.billing.subscriptions.spi.DiscountSummary, minus external_id (not stored in the domain model). */ interface CycleDiscountSummary { /** * Name shown to the customer. * @maxLength 500 */ name?: string | null; /** * Total amount of the discount. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:3 } */ amount?: string; /** * Items the discount applies to, with its amount on each. Empty for the shipping discount. * @maxSize 100 */ affectedItems?: CycleItemAmount[]; } /** * A discount's amount on one item. * Mirrors com.wix.billing.subscriptions.spi.ItemAmount. */ interface CycleItemAmount { /** * externalId of the item. * @format GUID */ itemExternalId?: string; /** * Item name. * @maxLength 200 */ name?: string; /** * Discount amount on this item. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:3 } */ amount?: string; } /** * An additional fee that was added or removed. * Mirrors com.wix.billing.subscriptions.spi.FeeSummary, minus external_id (not stored in the domain model). */ interface CycleFeeSummary { /** * Name shown to the customer. * @maxLength 500 */ name?: string | null; /** * Amount of the fee. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:3 } */ amount?: string; } /** * A shipping charge change. * Mirrors com.wix.billing.subscriptions.spi.ShippingChange. */ interface CycleShippingChange { /** Shipping before the change. Unset when shipping was added. */ originalShipping?: CycleShippingInfo; /** Shipping after the change. Unset when shipping was removed. */ newShipping?: CycleShippingInfo; } /** * Shipping amount in a change. * Mirrors com.wix.billing.subscriptions.spi.ShippingInfo. */ interface CycleShippingInfo { /** * Shipping amount. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:3 } */ amount?: string; } /** * A change in the cycle total. * Mirrors com.wix.billing.subscriptions.spi.TotalChange. */ interface CycleTotalChange { /** * Total of the last charged cycle. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:3 } */ originalTotal?: string; /** * Total of this cycle. * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:3 } */ newTotal?: string; } /** * A billing or delivery address change. * Mirrors com.wix.billing.subscriptions.spi.AddressChange. */ interface CycleAddressChange { /** Address before the change. Unset when there was none. */ originalAddress?: FullAddressDetails; /** Address after the change. */ newAddress?: FullAddressDetails; } interface SubscriptionBackOfficeAction { subscription?: Subscription; /** The backoffice method name */ name?: string; /** json as string format, to store the flatted request object */ params?: string; } /** Defines unknown events restored from the logs */ interface UnknownSubscriptionEvent { subscriptionAsString?: string | null; } interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf { activeSubscription?: CreateSubscriptionRequest; } /** @oneof */ interface CreateSubscriptionInStateRequestModeOneOf { activeSubscription?: CreateSubscriptionRequest; } interface CreateSubscriptionRequest { subscription?: Subscription; /** Optional settings for the payments. Should be empty for free subscriptions. */ paymentSettings?: PaymentSettings; /** * Optional unique identifier for this request in order to prevent subscription duplications * @format GUID */ idempotencyKey?: string | null; /** Optional origin override for setting identity of subscription creator instead of extracting from context */ originOverride?: OriginOverride; } interface OriginOverride { /** @format GUID */ appId?: string; /** @format GUID */ instanceId?: string; } interface CreateSubscriptionInStateResponse { /** @format GUID */ subscriptionId?: string; } interface PayCycleRequest { /** @format GUID */ subscriptionId?: string; paymentTestMode?: PaymentTestModeWithLiterals; /** @format GUID */ tenantId?: string; } declare enum PaymentTestMode { REGULAR = "REGULAR", FAIL_TECHNICAL = "FAIL_TECHNICAL", FAIL_DECLINE = "FAIL_DECLINE", FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE" } /** @enumType */ type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE'; interface PayCycleResponse { /** @format GUID */ invoiceId?: string; /** @format GUID */ paymentOrderId?: string | null; subscription?: Subscription; } interface GetFullSubscriptionDataRequest { /** @format GUID */ id?: string; } interface GetFullSubscriptionDataResponse { subscription?: Subscription; internalSubscriptionData?: InternalSubscriptionData; } interface InternalSubscriptionData { /** @format GUID */ originInstanceId?: string; source?: string | null; billingType?: string; isOneTime?: boolean; migrationDetails?: MigrationDetails; pausePaidDuration?: string | null; authorizationPaymentData?: PaymentData; currentCyclePausePeriods?: PausePeriod[]; } interface MigrationDetails { /** system (application) where the Subscription has been created */ originSystem?: string; /** date when the Subscription started to be managed in BASS */ shiftManagementDate?: Date | null; } interface PausePeriod { startDate?: Date | null; endDate?: Date | null; } interface GetSubscriptionAndInternalDataRequest { /** @format GUID */ subscriptionId?: string; /** @format GUID */ tenantId?: string; } interface GetSubscriptionAndInternalDataResponse { subscription?: Subscription; internalSubscriptionData?: InternalSubscriptionData; } interface SearchSubscriptionRequest { /** @format GUID */ id?: string; /** @format GUID */ tenantId?: string; } interface SearchSubscriptionResponse { subscription?: Subscription; } interface UpdatePausePaidDurationRequest { /** @format GUID */ subscriptionId?: string; /** * @min 1 * @max 10000000 */ pausePaidDurationSeconds?: string; /** @format GUID */ tenantId?: string; } interface UpdatePausePaidDurationResponse { } interface UpdateStatusRequest { /** @format GUID */ subscriptionId?: string; /** @format GUID */ tenantId?: string; status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals; } interface UpdateStatusResponse { subscription?: Subscription; } interface UpdatePaymentStatusRequest { /** @format GUID */ subscriptionId?: string; /** @format GUID */ tenantId?: string; paymentStatus?: PaymentStatusWithLiterals; } interface UpdatePaymentStatusResponse { subscription?: Subscription; } interface RemoveCancellationInfoRequest { /** @format GUID */ subscriptionId?: string; /** @format GUID */ tenantId?: string; } interface RemoveCancellationInfoResponse { subscription?: Subscription; } interface RemovePauseInfoRequest { /** @format GUID */ subscriptionId?: string; /** @format GUID */ tenantId?: string; } interface RemovePauseInfoResponse { subscription?: Subscription; } interface ReviveSubscriptionRequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; revivePolicy?: RevivePolicyWithLiterals; isTestRun?: boolean; } declare enum RevivePolicy { SIMPLE = "SIMPLE", RESUME = "RESUME" } /** @enumType */ type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME'; interface ReviveSubscriptionResponse { subscription?: Subscription; } interface ConvertSapiRequest { /** @format GUID */ subscriptionId?: string; } interface ConvertSapiResponse { subscription?: Subscription; } interface GetSubscriptionInvoicesRequest { /** @format GUID */ id?: string; } interface GetSubscriptionInvoicesResponse { invoices?: SubscriptionInvoice[]; } interface SubscriptionInvoice { /** @format GUID */ id?: string; subscriptionCycle?: number; createdDate?: Date | null; } interface FinishFreeTrialNowRequest { /** @format GUID */ subscriptionId?: string; /** @format GUID */ tenantId?: string; } interface FinishFreeTrialNowResponse { subscription?: Subscription; } interface FixSubscriptionTimeCapsuleTasksRequest { /** @format GUID */ subscriptionId?: string; /** @format GUID */ tenantId?: string; } interface FixSubscriptionTimeCapsuleTasksResponse { } interface SendTimeCapsuleTaskCanceledBIRequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; /** @minLength 1 */ taskType?: string; } interface Empty { } interface ScheduleTimeCapsuleTaskRequest { /** @format GUID */ subscriptionId?: string; /** @minLength 1 */ taskType?: string; executionTime?: Date | null; /** @format GUID */ tenantId?: string; } interface CancelTimeCapsuleTaskRequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; /** @minLength 1 */ taskType?: string; } interface UpdateFullSubscriptionRequest { /** @format GUID */ tenantId?: string; subscription?: Subscription; } interface UpdateFullSubscriptionResponse { subscription?: Subscription; } interface PatchSubscriptionRequest { /** * Tenant ID (instance ID) of the subscription * @format GUID */ tenantId?: string; /** * Subscription ID to patch * @format GUID */ subscriptionId?: string; /** Partial subscription with updated values */ subscription?: Subscription; /** Fields to update (e.g., "name", "billing_settings.collection_method") */ fieldMask?: string[]; } interface PatchSubscriptionResponse { /** The updated subscription */ subscription?: Subscription; } interface UpdateSubscriptionInvoiceCycleRequest { /** @format GUID */ subscriptionId?: string; /** @format GUID */ tenantId?: string; /** @format GUID */ invoiceId?: string; subscriptionCycle?: number; } interface UpdateSubscriptionInvoiceCycleResponse { subscriptionInvoice?: SubscriptionInvoice; } interface AddPausePeriodRequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; pauseStartDate?: Date | null; pauseEndDate?: Date | null; } interface AddPausePeriodResponse { subscription?: Subscription; } interface RunTimeCapsuleTaskNowRequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; /** @minLength 1 */ taskType?: string; } interface CreateRecurringInvoiceBORequest { /** @format GUID */ subscriptionId?: string; /** @format GUID */ tenantId?: string; /** @min 2 */ cycleNumber?: number; } interface CreateRecurringInvoiceBOResponse { invoiceId?: string; } interface SetShiftingDataRequest { /** @format GUID */ subscriptionId?: string; /** @format GUID */ tenantId?: string; isBassManaged?: boolean; shiftManagementDate?: Date | null; } interface SetShiftingDataResponse { subscription?: Subscription; } interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf { attachInvoice?: AttachInvoice; detachInvoice?: DetachInvoice; /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; } /** @oneof */ interface FixSubscriptionInvoicesRequestModeOneOf { attachInvoice?: AttachInvoice; detachInvoice?: DetachInvoice; } interface AttachInvoice { /** @format GUID */ invoiceId?: string; } interface DetachInvoice { /** @format GUID */ invoiceId?: string; } interface FixSubscriptionInvoicesResponse { invoices?: SubscriptionInvoice[]; } interface RestoreDraftSubscriptionRequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; } interface RestoreDraftSubscriptionResponse { subscription?: Subscription; } interface DeleteDraftSubscriptionRequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; } interface DeleteDraftSubscriptionResponse { subscription?: Subscription; } interface DeleteSubscriptionBORequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; } interface DeleteSubscriptionBOResponse { subscription?: Subscription; } interface CancelSubscriptionBORequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; initiator?: ActionInitiatorWithLiterals; reason?: string | null; } declare enum ActionInitiator { UNDEFINED = "UNDEFINED", BUSINESS = "BUSINESS", CUSTOMER = "CUSTOMER", SYSTEM = "SYSTEM" } /** @enumType */ type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM'; interface CancelSubscriptionBOResponse { subscription?: Subscription; } interface UpdatePaymentMethodBORequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; /** @format GUID */ paymentMethodId?: string; } interface UpdatePaymentMethodBOResponse { subscription?: Subscription; } interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf { billingCycleStarted?: SubscriptionBillingCycleStarted; /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; } /** @oneof */ interface SendSubscriptionActionEventBORequestEventOneOf { billingCycleStarted?: SubscriptionBillingCycleStarted; } interface SendSubscriptionActionEventResponse { } interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; transactionId?: string; } interface PauseSubscriptionBORequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; pausePolicy?: PausePolicyWithLiterals; pauseAt?: PauseAtWithLiterals; initiator?: ActionInitiatorWithLiterals; /** @maxLength 500 */ reason?: string | null; } interface PauseSubscriptionBOResponse { subscription?: Subscription; } interface FixSubscriptionInvoicesConsistencyRequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; } interface FixSubscriptionInvoicesConsistencyResponse { } interface FixSubscriptionPaymentStatusRequest { /** @format GUID */ tenantId?: string; /** @format GUID */ subscriptionId?: string; /** When true, verify and report the would-be fix without mutating anything. */ dryRun?: boolean; } interface FixSubscriptionPaymentStatusResponse { /** The invoice is PAID but the (DRAFT) subscription never processed the paid event. */ mismatchDetected?: boolean; /** A real mismatch was found and the invoice-paid activation was re-driven (always false in dry-run). */ fixed?: boolean; /** * Subscription status after the re-drive (ACTIVE / PENDING); in dry-run, the predicted status; "" when no fix ran. * @maxLength 50 */ resultingStatus?: string; /** * Human-readable summary of the decision and action. * @maxLength 500 */ detail?: string; } interface UpdateSubscriptionCurrencyRequest { /** * Tenant ID (instance ID) of the subscription * @format GUID */ tenantId?: string; /** * Subscription ID to update currency for * @format GUID */ subscriptionId?: string; /** * New currency code (e.g., "USD", "EUR") - ISO 4217 format * @format CURRENCY */ newCurrency?: string; /** * Exchange rate from current currency to new currency (newAmount = oldAmount * exchangeRate) * @decimalValue options { gt:0.00, maxScale:6 } */ exchangeRate?: string; } interface UpdateSubscriptionCurrencyResponse { /** The updated subscription with new currency and converted amounts */ subscription?: Subscription; } interface UpdateSubscriptionPlatformOriginRequest { /** * Subscription ID to update platform origin for * @format GUID */ subscriptionId?: string; /** * Tenant ID (instance ID) of the subscription * @format GUID */ tenantId?: string; /** New platform origin (appId and entityId) */ platformOrigin?: PlatformOrigin; } interface UpdateSubscriptionPlatformOriginResponse { /** The updated subscription with new platform origin */ subscription?: Subscription; } interface SetIsMigratedEvent { /** @format GUID */ subscriptionId?: string; } interface SubscriptionDelayedSyncEvent { /** @format GUID */ subscriptionId?: string; } interface InvoiceAction extends InvoiceActionActionTypeOneOf { payRecurring?: PayRecurringInvoice; } /** @oneof */ interface InvoiceActionActionTypeOneOf { payRecurring?: PayRecurringInvoice; } interface PayRecurringInvoice { /** @format GUID */ invoiceId?: string; } interface CreateSubscriptionResponse { subscription?: Subscription; /** * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions. * @format GUID */ paymentOrderId?: string | null; } interface UpdateSubscriptionRequest { /** Revision is validated if Subscription.revision is set */ subscription?: Subscription; /** Supported fields: customer, metadata */ fieldMask?: string[]; } interface UpdateSubscriptionResponse { subscription?: Subscription; } interface UpdateSubscriptionStartDateRequest { /** * Subscription ID * @format GUID */ id?: string; /** * Can be updated only if Subscription is in Draft state * By setting start_date in the future, end_date will be recalculated for termed Subscriptions * cycles_to_pay_on_creation will be set to 1 if no free trial is set */ startDate?: Date | null; } interface UpdateSubscriptionStartDateResponse { subscription?: Subscription; } interface BassToSapiPaypalMigrationRequest { /** * Subscription ID * @format GUID */ id?: string; collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals; } interface BassToSapiPaypalMigrationResponse { subscription?: Subscription; } interface UpdateSubscriptionPoliciesRequest { /** * Subscription ID * @format GUID */ id?: string; cancellableByCustomer?: boolean | null; } interface UpdateSubscriptionPoliciesResponse { /** Updated policies of the subscription */ policies?: SubscriptionPolicies; } interface UpdateSubscriptionBillingDateRequest { /** * ID of the subscription to update the billing date for. * @format GUID */ id: string; /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */ billingDate: Date | null; /** * Information about how BASS adjusts the total of the next invoice. Extending * the current billing cycle results in a higher payment, while shortening it * leads to a lower payment. BASS offers automatic calculation of the proration * amount based on the number of days added to or removed from the current billing * cycle. Alternatively, you can use your own custom method to calculate the * proration amount. The custom proration amount can't exceed the total of the * current billing cycle. */ proration?: Proration; } interface UpdateSubscriptionBillingDateResponse { /** Updated subscription. */ subscription?: Subscription; } interface UpdateSubscriptionOriginRequest { /** * ID of the subscription to update origin. * @format GUID */ id?: string; /** * Origin entity ID of the subscription to update. * @format GUID */ entityId?: string; } interface UpdateSubscriptionOriginResponse { /** Updated subscription. */ subscription?: Subscription; } interface ReviseSubscriptionRequest { /** * Subscription ID * @format GUID */ id: string; /** * 0 for no revision, maxSize is 100 * @maxSize 100 */ items?: Item[]; } interface ReviseSubscriptionResponse { subscription?: Subscription; } interface UpdateSubscriptionItemsRequest { /** * Subscription ID * @format GUID */ id?: string; /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */ updateAction?: UpdateActionWithLiterals; /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */ scheduleAdditionalInfo?: ScheduleAdditionalInfo; /** * Existing items to update * @maxSize 100 */ itemsToUpdate?: ItemChange[]; /** * Items to add. With UPSERT, an item with an ID replaces the existing or pending-added item with that ID * @maxSize 99 */ itemsToAdd?: Item[]; /** * Existing items to delete. With UPSERT, may also reference pending-added items * @format GUID * @maxSize 99 */ itemsToDelete?: string[] | null; /** How items_to_add is applied. Defaults to APPEND */ itemsToAddMode?: ItemsToAddModeWithLiterals; /** * Optional caller key, passed as-is to the FutureUpdatesRequested event * @format GUID */ idempotencyKey?: string | null; /** Optional. When set, the request is rejected unless it matches the subscription's current revision */ revision?: string | null; } declare enum ItemsToAddMode { /** Default. Every item in items_to_add is a new item; its ID is ignored. */ APPEND = "APPEND", /** An item with an ID replaces the existing or pending-added item with that ID; an item without an ID is a new item. Send every field: discounts are taken as sent, an empty list removes them. NEXT_BILLING_CYCLE only. */ UPSERT = "UPSERT" } /** @enumType */ type ItemsToAddModeWithLiterals = ItemsToAddMode | 'APPEND' | 'UPSERT'; interface UpdateSubscriptionItemsResponse { subscription?: Subscription; } interface BulkUpdateSubscriptionItemsByFilterRequest { /** * Filter to identify the subscriptions for which items are updated. For * supported fields see * [Search and Query: Bulk Update Subscription Items By Filter](https://bo.wix.com/wix-docs/rest/drafts/subscriptions-by-billing-by-wix/search-and-query#drafts_subscriptions-by-billing-by-wix_search-and-query_bulk-update-subscription-items-by-filter). * Sending an empty subscription filter results in a validation error. * In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the * `subscriptionId` field inside this filter. Passing any other filter results * in a failed validation error. */ subscriptionFilter?: Record | null; /** * Filter to specify which subscription items are updated. Make sure to use * the catalog item ID and not the item's unique ID. All subscription items * with matching `items.catalogReference.catalogItemId` are updated. * * Max: `100` reference catalog item IDs * @format GUID * @maxSize 100 */ catalogReferenceIds?: string[] | null; /** * Information about the update timing and update type. * * + `"IMMEDIATELY"`: The updates become effective immediately. * + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle. * + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`. * + `"RESET_PENDING_UPDATES"`: All currently scheduled updates for the specified supcriptions are canceled. Use only the `subscriptionId` field inside `subscriptionFilter`, all other filters result in failed validation errors. */ updateAction?: UpdateActionWithLiterals; /** * Additional information for updates. Currently, only supported for * `{"updateAction": "SPECIFIC_DATE"}`. */ scheduleAdditionalInfo?: ScheduleAdditionalInfo; /** * Update details for the susbcription items that match the filtering. * Currently, you can update only the item price, quantity, and tax. Note * that all item properties are updated to the same values. In case you want set * different values for individual items, you must call * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update. */ bulkItemUpdateData?: BulkItemChange; /** * __Not implemented yet__. Items to add to the subscriptions matching the filtering. * @maxSize 99 */ itemsToAdd?: Item[]; } interface BulkItemChange { /** Information about the new item price. */ pricingModel?: PricingModel; /** * New item quantity. * * Min: `1` * @min 1 */ quantity?: number | null; /** Information about the new item tax. */ tax?: Tax; } interface BulkUpdateSubscriptionItemsByFilterResponse { /** * ID of your bulk job. You can use * [this Async Infra call](https://pbo.wix.com/fire-console/?artifact=com.wixpress.asyncinfra.async-job-service&service=wix.infra.asyncjobs.v1.AsyncJobService&method=ListAsyncJobItems&body=eyJqb2JfaWQiOiIifQ%3D%3D) * to retrieve information about the job status. */ jobId?: string; } interface DeleteSubscriptionRequest { /** @format GUID */ id?: string; revision?: string; } interface DeleteSubscriptionResponse { } interface CancelSubscriptionRequest { /** @format GUID */ id: string; actionContext: ActionContext; } interface ActionContext { initiator?: ActionInitiatorWithLiterals; /** Optional action reason message */ reason?: string | null; } interface CancelSubscriptionResponse { subscription?: Subscription; } interface PauseSubscriptionRequest { /** @format GUID */ id: string; pausePolicy?: PausePolicyWithLiterals; pauseAt?: PauseAtWithLiterals; /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */ pauseAtSchedule?: ScheduleAdditionalInfo; /** contains additional scheduling information for certain auto_resume_at either specific date */ autoResumeAtSchedule?: ScheduleAdditionalInfo; actionContext: ActionContext; } interface PauseSubscriptionResponse { subscription?: Subscription; } interface ResumeSubscriptionRequest { /** @format GUID */ id: string; resumeAt?: ResumeAtWithLiterals; /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */ resumeAtSchedule?: ScheduleAdditionalInfo; actionContext: ActionContext; /** Strategy for resuming a migrated paused subscription when the previous billing date is missing. */ missingPreviousBillingDateResumeStrategy?: MissingPreviousBillingDateResumeStrategyWithLiterals; } declare enum MissingPreviousBillingDateResumeStrategy { UNKNOWN = "UNKNOWN", /** Use a fallback that makes the next billing date resolve to now. */ START_BILLING_IMMEDIATELY = "START_BILLING_IMMEDIATELY", /** Use a fallback that makes the next billing date resolve to one full cycle from now. */ START_BILLING_AFTER_ONE_FULL_CYCLE = "START_BILLING_AFTER_ONE_FULL_CYCLE" } /** @enumType */ type MissingPreviousBillingDateResumeStrategyWithLiterals = MissingPreviousBillingDateResumeStrategy | 'UNKNOWN' | 'START_BILLING_IMMEDIATELY' | 'START_BILLING_AFTER_ONE_FULL_CYCLE'; interface ResumeSubscriptionResponse { subscription?: Subscription; } interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf { /** Limit number of results and enable to skip rows. The default limit is 25. */ paging?: Paging; /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */ cursor?: CursorPaging; /** A filter object */ filter?: any; /** A Sorting option by field name and order. */ sorting?: SortingClauses; } /** @oneof */ interface SearchSubscriptionsRequestPagingMethodOneOf { /** Limit number of results and enable to skip rows. The default limit is 25. */ paging?: Paging; /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */ cursor?: CursorPaging; } interface SortingClauses { sorting?: Sorting[]; } interface SearchSubscriptionsResponse { subscriptions?: Subscription[]; cursor?: CursorPaging; pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Total number of items matching the filter. Available only on the first page of *Search* */ total?: number | null; } interface TurnOnSubscriptionAutoRenewalRequest { /** @format GUID */ id: string; actionContext: ActionContext; } interface TurnOnSubscriptionAutoRenewalResponse { subscription?: Subscription; } interface TurnOffSubscriptionAutoRenewalRequest { /** @format GUID */ id: string; actionContext: ActionContext; } interface TurnOffSubscriptionAutoRenewalResponse { subscription?: Subscription; } interface MarkLatestInvoiceAsPaidRequest { /** * The ID of the offline subscription to mark as paid its latest invoice * @format GUID */ subscriptionId: string; } interface MarkLatestInvoiceAsPaidResponse { subscription?: Subscription; } interface MultipleSubscriptionsOnOrdersInvoice { /** * the invoice id of the affected subscription * @format GUID */ invoiceId?: string; /** * the order id of the affected subscription * @format GUID */ orderId?: string; } interface MarkBillingCycleAsPaidRequest { /** * The ID of the subscription to mark as paid its invoice. * @format GUID */ subscriptionId: string; /** * The subscription cycle for which the invoice is to be marked as paid. * If left empty, the most recent cycle will be selected. * @min 1 */ paidCycle?: number | null; } interface MarkBillingCycleAsPaidResponse { subscription?: Subscription; } interface GetSubscriptionsStatsRequest { } interface GetSubscriptionsStatsResponse { amountByStatuses?: AmountByStatus[]; total?: number; } interface AmountByStatus { status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals; amount?: number; } interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf { /** User won't be charged for additional period added on top of subscription end date. */ extensionPeriod?: Duration; /** * user will be charged for billing cycles added * @min 1 */ extensionBillingCycles?: number; /** * The ID of the subscription to be extended * @format GUID */ id: string; actionContext: ActionContext; } /** @oneof */ interface ExtendSubscriptionRequestExtendPolicyOneOf { /** User won't be charged for additional period added on top of subscription end date. */ extensionPeriod?: Duration; /** * user will be charged for billing cycles added * @min 1 */ extensionBillingCycles?: number; } interface ExtendSubscriptionResponse { /** The now extended subscription */ subscription?: Subscription; } interface AllowedActionsRequest { /** @format GUID */ id: string; /** * List of additional fields to be included in the response. * @maxSize 1 */ fields?: RequestedFieldsWithLiterals[]; } declare enum RequestedFields { /** Include unsupported action list, including the reasons for the lack of support */ UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION" } /** @enumType */ type RequestedFieldsWithLiterals = RequestedFields | 'UNSUPPORTED_ACTION'; interface AllowedActionsResponse { /** List of actions that are allowed. */ actions?: Action[]; /** * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action. * @maxSize 20 */ unsupportedActions?: UnsupportedAction[]; } interface UnsupportedAction { actionType?: ActionTypeWithLiterals; /** * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed. * @maxSize 20 */ reasons?: UnsupportedReason[]; } interface UnsupportedReason { code?: string; description?: string | null; } interface ListUpcomingChargesRequest { /** * Subscription id charges to be previewed for * @format GUID */ subscriptionId: string; /** Period of time to provide charged for. If not provided,then only next charge will be returned. */ customDuration?: Duration; /** * Date of the next billing cycle so that the upcoming charges will be calculated accordingly. * If not provided, the upcoming charges will be calculated according to the existing next billing date. */ nextBillingDate?: Date | null; } interface ListUpcomingChargesResponse { upcomingCharges?: SubscriptionCharge[]; } interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf { /** Information about a non-existing subscription. */ subscriptionInfo?: SubscriptionInfo; } /** @oneof */ interface PreviewSubscriptionChargesRequestSubscriptionOneOf { /** Information about a non-existing subscription. */ subscriptionInfo?: SubscriptionInfo; } /** Subscription information to use for calculating the preview of charges for a subscription. */ interface SubscriptionInfo { billingSettings?: BillingSettings; items?: Item[]; startDate?: Date | null; /** * Customer the subscription belongs to. When provided, used for accurate tax calculation. * Optional for backward compatibility; if omitted, a synthetic id is used (legacy behavior) * and customer-specific tax rules (VAT exemptions, tax IDs) will not apply. */ customer?: Customer; } interface PreviewSubscriptionChargesResponse { /** Charges for subscription. */ charges?: Charge[]; } /** Represents a charge applicable to a subscription. */ interface Charge { /** The cycle number from which the charge starts. */ cycleFrom?: number; /** The number of cycles for which the charge is applicable. */ cycleCount?: number | null; /** The breakdown of the charge */ totals?: Totals; /** The billing date from which the charge starts */ cycleBillingDate?: Date | null; } interface PreviewSubscriptionsChargesRequest { /** * Information required to calculate the preview charges for the subscriptions, including an identifier. * @minSize 1 * @maxSize 10 */ subscriptionsBillingDetails?: SubscriptionBillingDetails[]; /** * Specifies the number of upcoming billing charges to preview for all subscriptions in the order. * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7, * $15 for cycles 8 through 10, and $20 for cycle 11 onwards: * - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future. * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10. * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards. * If no value is provided, the response will include charges for all upcoming cycles, including the existing one, * in this case, charges for cycle 1 through 3. * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles, * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned. * @min 1 * @max 10 */ numberOfNextRecurringCharges?: number | null; /** Configuration for preview behavior */ config?: PreviewSubscriptionsChargesConfig; } interface SubscriptionBillingDetails { /** * External identifier of the subscription * @format GUID */ externalId?: string | null; /** Billing details parameters including schedule, currency, etc. */ billingSettings?: BillingSettings; /** * Items, minSize is 1, maxSize is 100 * @minSize 1 * @maxSize 100 */ items?: Item[]; /** Subscription start date, now if not set */ startDate?: Date | null; /** Shipping address associated with subscription. At the moment used only for payments. Optional. */ shippingAddress?: FullAddressDetails; /** * Customer the subscription belongs to. When provided, used for accurate tax calculation. * Optional for backward compatibility; if omitted, a synthetic id is used (legacy behavior). */ customer?: Customer; } /** Configuration for subscriptions charges preview */ interface PreviewSubscriptionsChargesConfig { /** When true, returns zero tax instead of error when address is incomplete for tax calculation */ allowIncompleteAddress?: boolean; } interface PreviewSubscriptionsChargesResponse { /** Charges for the subscriptions, including an identifier. */ subscriptionsCharges?: SubscriptionCharges[]; } interface SubscriptionCharges { /** * External identifier of the subscription * @format GUID */ externalId?: string | null; /** Charges for subscription. */ charges?: Charge[]; } interface CreateSubscriptionForOrderRequest { /** Subscription needs to be created */ subscription?: Subscription; /** * Optional unique identifier for this request in order to prevent subscription duplications * @format GUID */ idempotencyKey?: string | null; } interface CreateSubscriptionForOrderResponse { /** Created subscription */ subscription?: Subscription; /** Non-persistent invoice */ invoice?: Invoice; } interface ChangeSubscriptionRequest { /** * ID of the subscription to change * @format GUID */ subscriptionId?: string; /** * Item-level changes. Each entry targets one existing item by ID. * Caller passes CONCRETE new values (price, quantity, name) — BASS does not resolve pricing. * BASS uses these for proration: old values (from subscription) vs new values (from here). */ itemChanges?: SubscriptionItemChange[]; /** * Subscription-level: new billing cycle (e.g., monthly to yearly). * Affects the billing period for ALL items. * When changing cycle, caller MUST also pass new prices in item_changes. */ newCycle?: Duration; /** When the change takes effect. */ effectiveTime?: ChangeEffectiveTimeWithLiterals; /** * How to handle proration for immediate changes. Ignored for AT_NEXT_RENEWAL by the legacy path. * With new_contract: IMMEDIATELY takes PRORATE_AND_START_BILLING_CYCLE (a full new cycle starts now) * or PRORATE_AND_CHARGE (the renewal date is kept); AT_NEXT_RENEWAL must leave it unset. */ prorationBehavior?: ProrationBehaviorEnumProrationBehaviorWithLiterals; /** Payment context for immediate changes without checkout flow. */ paymentContext?: ChangePaymentContext; /** * Opts into fresh-contract cycle semantics. Not available until the new processing path is released. * When provided, legacy new_cycle and item_changes must be omitted. */ newContract?: ContractChangeTerms; /** * Caller-stable key for accepting and replaying new_contract execution. * Required with new_contract; ignored by the legacy change path. * @format GUID */ idempotencyKey?: string | null; /** * Who initiated the contract change and why. Frozen with the accepted operation and published * on the resulting updates_applied event so subscription history and tracking can attribute * the change. Optional; new_contract only, ignored by the legacy change path. */ actionContext?: ActionContext; } declare enum ProrationBehaviorEnumProrationBehavior { UNKNOWN = "UNKNOWN", /** Credit unused time + charge new prorated price (default for upgrades) */ PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE", /** Credit unused time + refund to payment method (downgrades) */ PRORATE_AND_REFUND = "PRORATE_AND_REFUND", /** Convert unused value to extra days, no financial transaction */ PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND", /** Immediate switch with no financial adjustment */ NO_PRORATION = "NO_PRORATION", /** * new_contract only: credit unused paid time against the new contract and start a full new * billing cycle now. With new_contract, PRORATE_AND_CHARGE keeps the renewal date instead. */ PRORATE_AND_START_BILLING_CYCLE = "PRORATE_AND_START_BILLING_CYCLE" } /** @enumType */ type ProrationBehaviorEnumProrationBehaviorWithLiterals = ProrationBehaviorEnumProrationBehavior | 'UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION' | 'PRORATE_AND_START_BILLING_CYCLE'; /** Payment context for immediate subscription changes without the checkout flow. */ interface ChangePaymentContext { /** Payment settings override for this change */ paymentSettings?: PaymentSettings; } /** * The parts of a subscription a contract change can alter. Every other subscription setting * (currency, payment and collection method, trial, auto-renewal, billing address, tax settings) * is kept from the subscription. Unset optional fields keep the source value; lists replace it, * so an empty list means none. */ interface ContractChangeTerms { /** * Existing BASS item IDs identify the items being replaced; IDs must uniquely match the source * subscription items. external_id belongs to the caller's new order line item. Unset tax, * description, catalog reference, external ID and metadata keep the source item's values. * application_fee is computed by BASS and must be unset. * @maxSize 100 */ items?: Item[]; /** Target delivery address. Unset keeps the current shipping address. */ shippingAddress?: FullAddressDetails; /** Regular cycle duration of the new contract. */ cycleDuration?: Duration; /** * Number of cycles in the new contract, including a partial first cycle. Unset means unlimited. * @min 1 */ totalCycles?: number | null; /** * Subscription-level discounts. Cycle ranges are relative to the new contract (first cycle = 1). * @maxSize 5 */ discounts?: Discount[]; /** * Conditional fees such as a setup fee. Cycle ranges are relative to the new contract. * @maxSize 5 */ additionalFees?: AdditionalFee[]; /** Recurring shipping charges of the new contract. Unset means none. */ shippingCharges?: ShippingCharges; } interface ChangeSubscriptionResponse { /** Updated subscription */ subscription?: Subscription; /** Proration calculation result. Present for immediate changes with proration. */ prorationResult?: V1ProrationResult; /** * ID of the adjustment invoice created for the proration charge or refund. * @format GUID */ adjustmentInvoiceId?: string | null; /** * Idempotency key of the accepted new_contract execution. Absent for legacy changes. * @format GUID */ idempotencyKey?: string | null; /** * ID of the regular invoice accepted for new_contract execution. * @format GUID */ invoiceId?: string | null; /** * Payment order associated with the accepted regular invoice, when collection requires one. * @format GUID */ paymentOrderId?: string | null; } /** Result of a proration calculation applied during a subscription change. */ interface V1ProrationResult { /** * Credit amount for unused time on the current plan * @format DECIMAL_VALUE */ creditAmount?: string; /** * Charge amount for the new plan's prorated price * @format DECIMAL_VALUE */ chargeAmount?: string; /** * Net amount (charge minus credit). Positive means customer pays, negative means refund. * @format DECIMAL_VALUE */ netAmount?: string; /** Date when the proration was calculated */ prorationDate?: Date | null; /** Remaining seconds in the current billing period at time of change */ remainingSeconds?: string; /** Total seconds in the current billing cycle */ totalCycleSeconds?: string; } interface PreviewChangeSubscriptionRequest { /** * ID of the subscription to preview the change for * @format GUID */ subscriptionId?: string; /** Item-level changes to preview. Same structure as ChangeSubscriptionRequest. */ itemChanges?: SubscriptionItemChange[]; /** Subscription-level: preview a cycle change. */ newCycle?: Duration; /** When the change would take effect. */ effectiveTime?: ChangeEffectiveTimeWithLiterals; /** How proration would be handled for immediate changes. */ prorationBehavior?: ProrationBehaviorEnumProrationBehaviorWithLiterals; /** * Complete new-contract terms for read-only first-invoice preview. Cannot be mixed with item_changes/new_cycle. * Supports active paid cycles with one fixed-price item and setup fees; unsupported profiles are rejected. * This preview does not enable new-contract execution. */ newContract?: ContractChangeTerms; } interface CancelPendingChangeRequest { /** * ID of the subscription to cancel the pending change for * @format GUID */ subscriptionId?: string; } interface CancelPendingChangeResponse { /** Updated subscription with cleared pending data */ subscription?: Subscription; } interface ChangeSubscriptionForOrderRequest { /** The new subscription definition from the order (items, billing settings). */ subscription?: Subscription; /** Context of the change: source subscription, change type, proration behavior. */ changeContext?: ChangeContext; /** * Calculate the change invoice without storing pending change data. Defaults to false. * Preview does not require an order ID because no payment correlation is persisted. */ previewOnly?: boolean; /** * Opts into fresh-contract processing. subscription supplies the complete commercial target; * this selector contains only timing options, avoiding a second set of conflicting terms. * Not available until the new processing path is released. */ newContract?: ContractChangeOptions; } /** * Context for subscription changes within the order/checkout flow. * Carries the source subscription reference and change parameters. * Present on an OrderSubscription when it represents a modification of an * existing subscription rather than a new purchase. */ interface ChangeContext { /** * ID of the existing subscription being changed. * @format GUID */ sourceSubscriptionId?: string; /** Type of change being performed. */ changeType?: ChangeTypeWithLiterals; /** How proration should be handled. */ prorationBehavior?: ProrationBehaviorWithLiterals; /** * System-populated: proration result after calculation. * Populated by billing-subscriptions during order processing. */ prorationResult?: ProrationResult; } declare enum ChangeType { CHANGE_TYPE_UNKNOWN = "CHANGE_TYPE_UNKNOWN", UPGRADE = "UPGRADE", DOWNGRADE = "DOWNGRADE", CYCLE_CHANGE = "CYCLE_CHANGE", QUANTITY_CHANGE = "QUANTITY_CHANGE" } /** @enumType */ type ChangeTypeWithLiterals = ChangeType | 'CHANGE_TYPE_UNKNOWN' | 'UPGRADE' | 'DOWNGRADE' | 'CYCLE_CHANGE' | 'QUANTITY_CHANGE'; declare enum ProrationBehavior { PRORATION_BEHAVIOR_UNKNOWN = "PRORATION_BEHAVIOR_UNKNOWN", /** Credit unused time + charge new prorated price (default for upgrades) */ PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE", /** Credit unused time + refund to payment method (downgrades) */ PRORATE_AND_REFUND = "PRORATE_AND_REFUND", /** Convert unused value to extra days, no financial transaction */ PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND", /** Immediate switch with no financial adjustment */ NO_PRORATION = "NO_PRORATION", /** new_contract only: credit unused paid time against the new contract and start a full new billing cycle now. */ PRORATE_AND_START_BILLING_CYCLE = "PRORATE_AND_START_BILLING_CYCLE" } /** @enumType */ type ProrationBehaviorWithLiterals = ProrationBehavior | 'PRORATION_BEHAVIOR_UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION' | 'PRORATE_AND_START_BILLING_CYCLE'; /** * Result of a proration calculation. Contains the credit, charge, and net amounts * computed during a subscription change. */ interface ProrationResult { /** * Credit amount for unused time on the current plan * @format DECIMAL_VALUE */ creditAmount?: string; /** * Charge amount for the new plan's prorated price * @format DECIMAL_VALUE */ chargeAmount?: string; /** * Net amount (charge minus credit). Positive means customer pays, negative means refund. * @format DECIMAL_VALUE */ netAmount?: string; /** Date when the proration was calculated */ prorationDate?: Date | null; /** Remaining seconds in the current billing period at time of change */ remainingSeconds?: string; /** Total seconds in the current billing cycle */ totalCycleSeconds?: string; } interface ContractChangeOptions { } interface ChangeSubscriptionForOrderResponse { /** The source subscription (unchanged, for reference). */ subscription?: Subscription; /** Non-persistent invoice with proration adjustments. */ invoice?: Invoice; /** Calculated proration result. */ prorationResult?: ProrationResult; } interface Task { key?: TaskKey; executeAt?: Date | null; payload?: string | null; } interface TaskKey { appId?: string; instanceId?: string; subjectId?: string | null; } interface TaskAction extends TaskActionActionOneOf { complete?: Complete; cancel?: Cancel; reschedule?: Reschedule; } /** @oneof */ interface TaskActionActionOneOf { complete?: Complete; cancel?: Cancel; reschedule?: Reschedule; } interface Complete { } interface Cancel { } interface Reschedule { executeAt?: Date | null; payload?: string | null; } interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf { /** A subscriptions was created */ created?: V1SubscriptionCreated; /** Subscription is considered active and will be visible to site owners and members */ activated?: V1SubscriptionActivated; /** * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider. * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for. */ canceled?: V1SubscriptionCanceled; /** Subscription was updated. Currently the only possible change is valid_until date */ updated?: V1SubscriptionUpdated; /** Subscription cycle has started. Currently the cycle starts when a payment is received. */ cycleTriggered?: SubscriptionCycleTriggered; /** Offline subscription was marked as paid */ markedAsPaid?: SubscriptionMarkedAsPaid; /** * Subscription cancellation for the future date was requested. * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date. */ cancellationRequested?: SubscriptionCancellationRequested; /** Subscription and it's payment schedule (for recurring) was suspended */ suspended?: SubscriptionSuspended; /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */ resumed?: V1SubscriptionResumed; /** Subscription expired according to valid_until expiration date. */ expired?: SubscriptionExpired; /** Subscription initial purchase completed */ initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted; } /** @oneof */ interface V1SubscriptionEventEventOneOf { /** A subscriptions was created */ created?: V1SubscriptionCreated; /** Subscription is considered active and will be visible to site owners and members */ activated?: V1SubscriptionActivated; /** * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider. * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for. */ canceled?: V1SubscriptionCanceled; /** Subscription was updated. Currently the only possible change is valid_until date */ updated?: V1SubscriptionUpdated; /** Subscription cycle has started. Currently the cycle starts when a payment is received. */ cycleTriggered?: SubscriptionCycleTriggered; /** Offline subscription was marked as paid */ markedAsPaid?: SubscriptionMarkedAsPaid; /** * Subscription cancellation for the future date was requested. * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date. */ cancellationRequested?: SubscriptionCancellationRequested; /** Subscription and it's payment schedule (for recurring) was suspended */ suspended?: SubscriptionSuspended; /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */ resumed?: V1SubscriptionResumed; /** Subscription expired according to valid_until expiration date. */ expired?: SubscriptionExpired; /** Subscription initial purchase completed */ initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted; } interface V1SubscriptionCreated { subscription?: V1Subscription; } interface V1Subscription { /** * ID of the subscription * @format GUID * @readonly */ id?: string; /** * ID of the app which created the subscription * @format GUID */ wixAppId?: string; /** * Instance ID of the Subscriptions app * @format GUID */ tenantId?: string; /** * ID of entity in app (e.g. a cart in stores/order in paid plans) * @format GUID */ originEntityId?: string; /** Site member or a contact who bought the subscription */ subscriber?: Subscriber; /** * Wix Pay order ID, is empty for free subscriptions * @format GUID */ wixPayOrderId?: string | null; /** * Subscription name (e.g. a product or subscription package name) * @maxLength 150 */ name?: string; /** * Optional additional subscription description * @maxLength 500 */ description?: string; /** Amount to be paid for a single scheduled payment */ price?: Money; /** True if the subscription is recurring, false for a single payment subscription */ recurring?: boolean; /** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */ subscriptionType?: SubscriptionTypeWithLiterals; /** Active, expired, canceled, etc. */ subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals; /** Subscription start date (may differ from creation date) */ validFrom?: Date | null; /** Subscription expiration date */ validUntil?: Date | null; /** Status of last payment associated with this subscription */ lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals; /** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */ billingProfile?: V2Subscription; /** Owner, member, etc. - present if subscription is canceled */ cancellationInitiator?: CancellationInitiatorWithLiterals; /** Optional, present if subscription is canceled */ cancellationReason?: string | null; /** Can be used for arbitrary app-specific map data */ externalData?: Record; /** Date when subscription was created (not related to payment dates) */ dateCreated?: Date | null; /** Restrictions on possible subscription actions. Default policy has all restrictions enabled. */ policy?: SubscriptionPolicy; /** List of subscription suspension periods */ suspensions?: Suspension[]; /** Initial subscription expiration date that was calculated on the subscription purchase plus duration of suspensions */ validUntilDateWithSuspensions?: Date | null; /** Duration of single payment subscription (instead of billing_profile) */ singlePaymentDuration?: V1Duration; /** @format GUID */ originInstanceId?: string | null; } interface Subscriber { /** * Member or contact ID * @format GUID */ id?: string; /** Member or contact */ identityType?: IdentityTypeWithLiterals; } declare enum IdentityType { /** Identity type undefined */ UNDEFINED = "UNDEFINED", /** Subscription is associated with a member ID */ MEMBER = "MEMBER", /** Subscriptions is associated with a contact ID */ CONTACT = "CONTACT" } /** @enumType */ type IdentityTypeWithLiterals = IdentityType | 'UNDEFINED' | 'MEMBER' | 'CONTACT'; /** Price of a payment. Includes amount and currency. */ interface Money { /** * Monetary amount i.e. 3.99. * @format DECIMAL_VALUE */ amount?: string; /** * Currency in ISO 4217 format i.e. USD. * @minLength 3 * @maxLength 3 */ currency?: string; } declare enum SubscriptionType { UNDEFINED = "UNDEFINED", /** Payments made by the subscriber */ ONLINE = "ONLINE", /** Payments managed manually by the site owner */ OFFLINE = "OFFLINE" } /** @enumType */ type SubscriptionTypeWithLiterals = SubscriptionType | 'UNDEFINED' | 'ONLINE' | 'OFFLINE'; declare enum V1SubscriptionStatusEnumSubscriptionStatus { /** Subscription status undefined */ UNDEFINED = "UNDEFINED", /** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */ DRAFT = "DRAFT", /** Subscription has been paid for, but the start date is in the future */ PENDING = "PENDING", /** Subscription is active */ ACTIVE = "ACTIVE", /** Subscription has expired */ EXPIRED = "EXPIRED", /** Subscription has been canceled */ CANCELED = "CANCELED", /** Subscription has been set to be canceled at a future date */ PENDING_CANCELLATION = "PENDING_CANCELLATION", /** Subscription is suspended */ SUSPENDED = "SUSPENDED" } /** @enumType */ type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED'; declare enum PaymentStatusEnumPaymentStatus { /** Payment status undefined */ UNDEFINED = "UNDEFINED", /** Payment has been paid */ PAID = "PAID", /** Payment has been refunded */ REFUNDED = "REFUNDED", /** Recurring payment has failed */ FAILED = "FAILED", /** Payment has not been paid */ UNPAID = "UNPAID", /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */ PENDING = "PENDING" } /** @enumType */ type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING'; /** * Recurring payment is described by `frequency` (day, week, month) and `interval`. * * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`. * * In some cases there should be a trial period for the order, after which payments start to occur. * Trial period is also defined as `frequency` and `interval` pair. * * So one can define a monthly 'subscription' with a 14 days trial period. */ interface V2Subscription { /** frequency of recurring payment (required) */ frequency?: SubscriptionFrequencyWithLiterals; /** interval of recurring payment (required) */ interval?: number; /** trial period for recurring payment (optional) */ trial?: SubscriptionTrialPeriod; /** * how many billing cycles should be done before subscription finishes * (optional, 0 by default means endless subscription) */ billingCycles?: number; /** * date in the future or in the past when the first billing cycle begins * (the first off-session payment is performed when it ends) */ firstCycleStartDate?: Date | null; } /** Frequency unit of recurring payment */ declare enum SubscriptionFrequency { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } /** @enumType */ type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR'; /** Trial period of subscription */ interface SubscriptionTrialPeriod { /** trial period in units (required) */ period?: number; /** units in which trial period is described (optional, default DAY) */ unit?: SubscriptionFrequencyWithLiterals; } declare enum CancellationInitiator { /** Cancellation initiator undefined */ UNDEFINED = "UNDEFINED", /** Subscription was canceled by site owner (default if canceled by user or service identity) */ OWNER = "OWNER", /** Subscription was canceled by member (default if canceled by member identity) */ MEMBER = "MEMBER", /** Subscription was canceled because of payment failure */ PAYMENT_FAILURE = "PAYMENT_FAILURE", /** Subscription was canceled because of payment setup failure */ SETUP_FAILURE = "SETUP_FAILURE" } /** @enumType */ type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE'; interface SubscriptionPolicy { /** Subscription expiration date can be updated */ expiryDateChangeable?: boolean; /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */ cancellableByMember?: boolean; /** Subscription expiration date on cancellation can be set to next payment date */ cancellableAtNextPaymentCycle?: boolean; } interface Suspension { status?: StatusWithLiterals; /** Beginning of the suspended period */ startsAt?: Date | null; /** End of the suspended period */ endsAt?: Date | null; } declare enum Status { UNDEFINED = "UNDEFINED", ACTIVE = "ACTIVE", ENDED = "ENDED" } /** @enumType */ type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED'; /** A duration expressed in amount of time units. */ interface V1Duration { /** Amount of the unit */ amount?: number; /** Day, Week, Month, Year. */ unit?: SubscriptionFrequencyWithLiterals; } interface V1SubscriptionActivated { subscription?: V1Subscription; } interface V1SubscriptionCanceled { subscription?: V1Subscription; } interface V1SubscriptionUpdated { subscription?: V1Subscription; } interface SubscriptionCycleTriggered { subscription?: V1Subscription; billingCycle?: number; /** * Wix Pay transaction id, optional. Exists if event was triggered by a payment. * @format GUID */ transactionId?: string | null; } interface SubscriptionMarkedAsPaid { subscription?: V1Subscription; /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */ billingCycle?: number | null; } interface SubscriptionCancellationRequested { subscription?: V1Subscription; } interface SubscriptionSuspended { subscription?: V1Subscription; } interface V1SubscriptionResumed { subscription?: V1Subscription; } interface SubscriptionExpired { subscription?: V1Subscription; } interface V1SubscriptionInitialPurchaseCompleted { subscription?: V1Subscription; } /** @docsIgnore */ type CustomerCancelSubscriptionApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; /** @docsIgnore */ type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; /** @docsIgnore */ type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; /** @docsIgnore */ type CustomerExtendSubscriptionApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; /** @docsIgnore */ type CustomerSkipCycleApplicationErrors = { code?: 'CUSTOMER_ACTION_NOT_ENABLED'; description?: string; data?: Record; } | { code?: 'CUSTOMER_TIMING_RESTRICTION'; description?: string; data?: Record; } | { code?: 'CUSTOMER_CONFIGURATION_ERROR'; description?: string; data?: Record; }; /** @docsIgnore */ type CustomerCancelScheduledSkipApplicationErrors = { code?: 'CUSTOMER_ACTION_NOT_ENABLED'; description?: string; data?: Record; } | { code?: 'CUSTOMER_TIMING_RESTRICTION'; description?: string; data?: Record; } | { code?: 'CUSTOMER_CONFIGURATION_ERROR'; description?: string; data?: Record; }; /** @docsIgnore */ type CustomerPauseSubscriptionApplicationErrors = { code?: 'CUSTOMER_ACTION_NOT_ENABLED'; description?: string; data?: Record; } | { code?: 'CUSTOMER_TIMING_RESTRICTION'; description?: string; data?: Record; } | { code?: 'CUSTOMER_CONFIGURATION_ERROR'; description?: string; data?: Record; }; /** @docsIgnore */ type CustomerResumeSubscriptionApplicationErrors = { code?: 'CUSTOMER_ACTION_NOT_ENABLED'; description?: string; data?: Record; } | { code?: 'CUSTOMER_TIMING_RESTRICTION'; description?: string; data?: Record; } | { code?: 'CUSTOMER_CONFIGURATION_ERROR'; description?: string; data?: Record; }; /** @docsIgnore */ type CustomerCancelScheduledPauseApplicationErrors = { code?: 'CUSTOMER_ACTION_NOT_ENABLED'; description?: string; data?: Record; } | { code?: 'CUSTOMER_TIMING_RESTRICTION'; description?: string; data?: Record; } | { code?: 'CUSTOMER_CONFIGURATION_ERROR'; description?: string; data?: Record; }; /** @docsIgnore */ type CustomerUpdateBillingDateApplicationErrors = { code?: 'CUSTOMER_ACTION_NOT_ENABLED'; description?: string; data?: Record; } | { code?: 'CUSTOMER_TIMING_RESTRICTION'; description?: string; data?: Record; } | { code?: 'CUSTOMER_CONFIGURATION_ERROR'; description?: string; data?: Record; }; /** @docsIgnore */ type CustomerChangeSubscriptionApplicationErrors = { code?: 'CUSTOMER_ACTION_NOT_ENABLED'; description?: string; data?: Record; } | { code?: 'CUSTOMER_TIMING_RESTRICTION'; description?: string; data?: Record; }; /** @docsIgnore */ type UpdateSubscriptionBillingDateApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; /** @docsIgnore */ type CancelSubscriptionApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; /** @docsIgnore */ type PauseSubscriptionApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; /** @docsIgnore */ type ResumeSubscriptionApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; /** @docsIgnore */ type TurnOnSubscriptionAutoRenewalApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; /** @docsIgnore */ type TurnOffSubscriptionAutoRenewalApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; /** @docsIgnore */ type MarkLatestInvoiceAsPaidApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; } | { code?: 'SUBSCRIPTION_PART_OF_ORDER'; description?: string; data?: MultipleSubscriptionsOnOrdersInvoice; }; /** @docsIgnore */ type MarkBillingCycleAsPaidApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; } | { code?: 'SUBSCRIPTION_PART_OF_ORDER'; description?: string; data?: MultipleSubscriptionsOnOrdersInvoice; } | { code?: 'INVOICE_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'OPERATION_NOT_SUPPORTED_FOR_COLLECTION_METHOD'; description?: string; data?: Record; }; /** @docsIgnore */ type ExtendSubscriptionApplicationErrors = { code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS'; description?: string; data?: Record; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function customerGetSubscription(): __PublicMethodMetaInfo<'GET', { id: string; }, GetSubscriptionRequest$1, GetSubscriptionRequest, GetSubscriptionResponse$1, GetSubscriptionResponse>; declare function customerCancelSubscription(): __PublicMethodMetaInfo<'POST', { id: string; }, CustomerCancelSubscriptionRequest$1, CustomerCancelSubscriptionRequest, CustomerCancelSubscriptionResponse$1, CustomerCancelSubscriptionResponse>; declare function customerTurnOnSubscriptionAutoRenewal(): __PublicMethodMetaInfo<'POST', { id: string; }, CustomerTurnOnAutoRenewalRequest$1, CustomerTurnOnAutoRenewalRequest, CustomerTurnOnAutoRenewalResponse$1, CustomerTurnOnAutoRenewalResponse>; declare function customerTurnOffSubscriptionAutoRenewal(): __PublicMethodMetaInfo<'POST', { id: string; }, CustomerTurnOffAutoRenewalRequest$1, CustomerTurnOffAutoRenewalRequest, CustomerTurnOffAutoRenewalResponse$1, CustomerTurnOffAutoRenewalResponse>; declare function customerExtendSubscription(): __PublicMethodMetaInfo<'PATCH', { id: string; }, CustomerExtendSubscriptionRequest$1, CustomerExtendSubscriptionRequest, CustomerExtendSubscriptionResponse$1, CustomerExtendSubscriptionResponse>; declare function customerQuerySubscriptions(): __PublicMethodMetaInfo<'POST', {}, QuerySubscriptionsRequest$1, QuerySubscriptionsRequest, QuerySubscriptionsResponse$1, QuerySubscriptionsResponse>; declare function customerCountSubscriptions(): __PublicMethodMetaInfo<'POST', {}, CountSubscriptionsRequest$1, CountSubscriptionsRequest, CountSubscriptionsResponse$1, CountSubscriptionsResponse>; declare function customerUpdateSubscriptionPaymentMethod(): __PublicMethodMetaInfo<'PATCH', { id: string; }, UpdateSubscriptionPaymentMethodRequest$1, UpdateSubscriptionPaymentMethodRequest, UpdateSubscriptionPaymentMethodResponse$1, UpdateSubscriptionPaymentMethodResponse>; declare function customerAllowedActions(): __PublicMethodMetaInfo<'GET', { id: string; }, CustomerAllowedActionsRequest$1, CustomerAllowedActionsRequest, CustomerAllowedActionsResponse$1, CustomerAllowedActionsResponse>; declare function customerListUpcomingCharges(): __PublicMethodMetaInfo<'GET', { id: string; }, CustomerListUpcomingChargesRequest$1, CustomerListUpcomingChargesRequest, CustomerListUpcomingChargesResponse$1, CustomerListUpcomingChargesResponse>; declare function customerInitiatePaymentMethodSetup(): __PublicMethodMetaInfo<'POST', { id: string; }, InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupRequest, InitiatePaymentMethodSetupResponse$1, InitiatePaymentMethodSetupResponse>; declare function customerSkipCycle(): __PublicMethodMetaInfo<'POST', { id: string; }, CustomerSkipCycleRequest$1, CustomerSkipCycleRequest, CustomerSkipCycleResponse$1, CustomerSkipCycleResponse>; declare function customerCancelScheduledSkip(): __PublicMethodMetaInfo<'POST', { id: string; }, CustomerCancelScheduledSkipRequest$1, CustomerCancelScheduledSkipRequest, CustomerCancelScheduledSkipResponse$1, CustomerCancelScheduledSkipResponse>; declare function customerPauseSubscription(): __PublicMethodMetaInfo<'POST', { id: string; }, CustomerPauseSubscriptionRequest$1, CustomerPauseSubscriptionRequest, CustomerPauseSubscriptionResponse$1, CustomerPauseSubscriptionResponse>; declare function customerResumeSubscription(): __PublicMethodMetaInfo<'POST', { id: string; }, CustomerResumeSubscriptionRequest$1, CustomerResumeSubscriptionRequest, CustomerResumeSubscriptionResponse$1, CustomerResumeSubscriptionResponse>; declare function customerCancelScheduledPause(): __PublicMethodMetaInfo<'POST', { id: string; }, CustomerCancelScheduledPauseRequest$1, CustomerCancelScheduledPauseRequest, CustomerCancelScheduledPauseResponse$1, CustomerCancelScheduledPauseResponse>; declare function customerUpdateBillingDate(): __PublicMethodMetaInfo<'POST', { id: string; }, CustomerUpdateBillingDateRequest$1, CustomerUpdateBillingDateRequest, CustomerUpdateBillingDateResponse$1, CustomerUpdateBillingDateResponse>; declare function customerChangeSubscription(): __PublicMethodMetaInfo<'POST', { subscriptionId: string; }, CustomerChangeSubscriptionRequest$1, CustomerChangeSubscriptionRequest, CustomerChangeSubscriptionResponse$1, CustomerChangeSubscriptionResponse>; declare function customerPreviewChangeSubscription(): __PublicMethodMetaInfo<'POST', { subscriptionId: string; }, CustomerPreviewChangeSubscriptionRequest$1, CustomerPreviewChangeSubscriptionRequest, CustomerPreviewChangeSubscriptionResponse$1, CustomerPreviewChangeSubscriptionResponse>; declare function customerCancelPendingChange(): __PublicMethodMetaInfo<'POST', { subscriptionId: string; }, CustomerCancelPendingChangeRequest$1, CustomerCancelPendingChangeRequest, CustomerCancelPendingChangeResponse$1, CustomerCancelPendingChangeResponse>; declare function listSubscriptionHistory(): __PublicMethodMetaInfo<'GET', { subscriptionId: string; }, ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryRequest, ListSubscriptionHistoryResponse$1, ListSubscriptionHistoryResponse>; declare function getSubscription(): __PublicMethodMetaInfo<'GET', { id: string; }, GetSubscriptionRequest$1, GetSubscriptionRequest, GetSubscriptionResponse$1, GetSubscriptionResponse>; declare function updateSubscriptionPaymentMethod(): __PublicMethodMetaInfo<'PATCH', { id: string; }, UpdateSubscriptionPaymentMethodRequest$1, UpdateSubscriptionPaymentMethodRequest, UpdateSubscriptionPaymentMethodResponse$1, UpdateSubscriptionPaymentMethodResponse>; declare function updateSubscriptionBillingDate(): __PublicMethodMetaInfo<'PATCH', { id: string; }, UpdateSubscriptionBillingDateRequest$1, UpdateSubscriptionBillingDateRequest, UpdateSubscriptionBillingDateResponse$1, UpdateSubscriptionBillingDateResponse>; declare function reviseSubscription(): __PublicMethodMetaInfo<'POST', { id: string; }, ReviseSubscriptionRequest$1, ReviseSubscriptionRequest, ReviseSubscriptionResponse$1, ReviseSubscriptionResponse>; declare function cancelSubscription(): __PublicMethodMetaInfo<'POST', { id: string; }, CancelSubscriptionRequest$1, CancelSubscriptionRequest, CancelSubscriptionResponse$1, CancelSubscriptionResponse>; declare function pauseSubscription(): __PublicMethodMetaInfo<'POST', { id: string; }, PauseSubscriptionRequest$1, PauseSubscriptionRequest, PauseSubscriptionResponse$1, PauseSubscriptionResponse>; declare function resumeSubscription(): __PublicMethodMetaInfo<'POST', { id: string; }, ResumeSubscriptionRequest$1, ResumeSubscriptionRequest, ResumeSubscriptionResponse$1, ResumeSubscriptionResponse>; declare function querySubscriptions(): __PublicMethodMetaInfo<'POST', {}, QuerySubscriptionsRequest$1, QuerySubscriptionsRequest, QuerySubscriptionsResponse$1, QuerySubscriptionsResponse>; declare function searchSubscriptions(): __PublicMethodMetaInfo<'POST', {}, SearchSubscriptionsRequest$1, SearchSubscriptionsRequest, SearchSubscriptionsResponse$1, SearchSubscriptionsResponse>; declare function countSubscriptions(): __PublicMethodMetaInfo<'POST', {}, CountSubscriptionsRequest$1, CountSubscriptionsRequest, CountSubscriptionsResponse$1, CountSubscriptionsResponse>; declare function turnOnSubscriptionAutoRenewal(): __PublicMethodMetaInfo<'PATCH', { id: string; }, TurnOnSubscriptionAutoRenewalRequest$1, TurnOnSubscriptionAutoRenewalRequest, TurnOnSubscriptionAutoRenewalResponse$1, TurnOnSubscriptionAutoRenewalResponse>; declare function turnOffSubscriptionAutoRenewal(): __PublicMethodMetaInfo<'PATCH', { id: string; }, TurnOffSubscriptionAutoRenewalRequest$1, TurnOffSubscriptionAutoRenewalRequest, TurnOffSubscriptionAutoRenewalResponse$1, TurnOffSubscriptionAutoRenewalResponse>; declare function markLatestInvoiceAsPaid(): __PublicMethodMetaInfo<'POST', { subscriptionId: string; }, MarkLatestInvoiceAsPaidRequest$1, MarkLatestInvoiceAsPaidRequest, MarkLatestInvoiceAsPaidResponse$1, MarkLatestInvoiceAsPaidResponse>; declare function markBillingCycleAsPaid(): __PublicMethodMetaInfo<'POST', { subscriptionId: string; }, MarkBillingCycleAsPaidRequest$1, MarkBillingCycleAsPaidRequest, MarkBillingCycleAsPaidResponse$1, MarkBillingCycleAsPaidResponse>; declare function getSubscriptionsStats(): __PublicMethodMetaInfo<'GET', {}, GetSubscriptionsStatsRequest$1, GetSubscriptionsStatsRequest, GetSubscriptionsStatsResponse$1, GetSubscriptionsStatsResponse>; declare function extendSubscription(): __PublicMethodMetaInfo<'PATCH', { id: string; }, ExtendSubscriptionRequest$1, ExtendSubscriptionRequest, ExtendSubscriptionResponse$1, ExtendSubscriptionResponse>; declare function allowedActions(): __PublicMethodMetaInfo<'GET', { id: string; }, AllowedActionsRequest$1, AllowedActionsRequest, AllowedActionsResponse$1, AllowedActionsResponse>; declare function listUpcomingCharges(): __PublicMethodMetaInfo<'GET', { subscriptionId: string; }, ListUpcomingChargesRequest$1, ListUpcomingChargesRequest, ListUpcomingChargesResponse$1, ListUpcomingChargesResponse>; declare function previewSubscriptionCharges(): __PublicMethodMetaInfo<'GET', {}, PreviewSubscriptionChargesRequest$1, PreviewSubscriptionChargesRequest, PreviewSubscriptionChargesResponse$1, PreviewSubscriptionChargesResponse>; declare function previewSubscriptionsCharges(): __PublicMethodMetaInfo<'GET', {}, PreviewSubscriptionsChargesRequest$1, PreviewSubscriptionsChargesRequest, PreviewSubscriptionsChargesResponse$1, PreviewSubscriptionsChargesResponse>; declare function initiatePaymentMethodSetup(): __PublicMethodMetaInfo<'POST', { id: string; }, InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupRequest, InitiatePaymentMethodSetupResponse$1, InitiatePaymentMethodSetupResponse>; export { type AbsorbFeeConfig as AbsorbFeeConfigOriginal, type AbsorbFeeConfigValueOneOf as AbsorbFeeConfigValueOneOfOriginal, type AccountInfo as AccountInfoOriginal, type ActionContext as ActionContextOriginal, type ActionDetails as ActionDetailsOriginal, type ActionEvent as ActionEventOriginal, ActionInitiator as ActionInitiatorOriginal, type ActionInitiatorWithLiterals as ActionInitiatorWithLiteralsOriginal, type Action as ActionOriginal, ActionType as ActionTypeOriginal, type ActionTypeWithLiterals as ActionTypeWithLiteralsOriginal, type AddPausePeriodRequest as AddPausePeriodRequestOriginal, type AddPausePeriodResponse as AddPausePeriodResponseOriginal, type AdditionalFee as AdditionalFeeOriginal, AdditionalFeeTrigger as AdditionalFeeTriggerOriginal, type AdditionalFeeTriggerWithLiterals as AdditionalFeeTriggerWithLiteralsOriginal, type AddressLocation as AddressLocationOriginal, type Address as AddressOriginal, type AddressStreetOneOf as AddressStreetOneOfOriginal, type AggregatedTaxBreakdown as AggregatedTaxBreakdownOriginal, type AllowedActionsRequest as AllowedActionsRequestOriginal, type AllowedActionsResponse as AllowedActionsResponseOriginal, type AmountByStatus as AmountByStatusOriginal, type ApplicationFee as ApplicationFeeOriginal, type ApplicationFeeValueOneOf as ApplicationFeeValueOneOfOriginal, type AttachInvoice as AttachInvoiceOriginal, type AutomaticRetryData as AutomaticRetryDataOriginal, type BassToSapiPaypalMigrationRequest as BassToSapiPaypalMigrationRequestOriginal, type BassToSapiPaypalMigrationResponse as BassToSapiPaypalMigrationResponseOriginal, type BillingSettings as BillingSettingsOriginal, type BillingStatus as BillingStatusOriginal, type BulkItemChange as BulkItemChangeOriginal, type BulkUpdateSubscriptionItemsByFilterRequest as BulkUpdateSubscriptionItemsByFilterRequestOriginal, type BulkUpdateSubscriptionItemsByFilterResponse as BulkUpdateSubscriptionItemsByFilterResponseOriginal, type BusinessOriginData as BusinessOriginDataOriginal, type BusinessOrigin as BusinessOriginOriginal, type CancelActionConfiguration as CancelActionConfigurationOriginal, type CancelActionSettings as CancelActionSettingsOriginal, type Cancel as CancelOriginal, type CancelPendingChangeRequest as CancelPendingChangeRequestOriginal, type CancelPendingChangeResponse as CancelPendingChangeResponseOriginal, type CancelSubscriptionApplicationErrors as CancelSubscriptionApplicationErrorsOriginal, type CancelSubscriptionBORequest as CancelSubscriptionBORequestOriginal, type CancelSubscriptionBOResponse as CancelSubscriptionBOResponseOriginal, type CancelSubscriptionRequest as CancelSubscriptionRequestOriginal, type CancelSubscriptionResponse as CancelSubscriptionResponseOriginal, type CancelTimeCapsuleTaskRequest as CancelTimeCapsuleTaskRequestOriginal, type CancellationInfo as CancellationInfoOriginal, CancellationInitiator as CancellationInitiatorOriginal, type CancellationInitiatorWithLiterals as CancellationInitiatorWithLiteralsOriginal, type CatalogReference as CatalogReferenceOriginal, type ChangeContext as ChangeContextOriginal, ChangeEffectiveTime as ChangeEffectiveTimeOriginal, type ChangeEffectiveTimeWithLiterals as ChangeEffectiveTimeWithLiteralsOriginal, type ChangePaymentContext as ChangePaymentContextOriginal, type ChangeSubscriptionForOrderRequest as ChangeSubscriptionForOrderRequestOriginal, type ChangeSubscriptionForOrderResponse as ChangeSubscriptionForOrderResponseOriginal, type ChangeSubscriptionRequest as ChangeSubscriptionRequestOriginal, type ChangeSubscriptionResponse as ChangeSubscriptionResponseOriginal, ChangeType as ChangeTypeOriginal, type ChangeTypeWithLiterals as ChangeTypeWithLiteralsOriginal, type Charge as ChargeOriginal, CollectionMethodEnumCollectionMethod as CollectionMethodEnumCollectionMethodOriginal, type CollectionMethodEnumCollectionMethodWithLiterals as CollectionMethodEnumCollectionMethodWithLiteralsOriginal, CollectionMethod as CollectionMethodOriginal, type CollectionMethodWithLiterals as CollectionMethodWithLiteralsOriginal, type Complete as CompleteOriginal, type ContractChangeOptions as ContractChangeOptionsOriginal, type ContractChangeTerms as ContractChangeTermsOriginal, type ConvertSapiRequest as ConvertSapiRequestOriginal, type ConvertSapiResponse as ConvertSapiResponseOriginal, type CountByStatus as CountByStatusOriginal, type CountSubscriptionFilter as CountSubscriptionFilterOriginal, type CountSubscriptionFilterStatusOneOf as CountSubscriptionFilterStatusOneOfOriginal, type CountSubscriptionsRequest as CountSubscriptionsRequestOriginal, type CountSubscriptionsResponse as CountSubscriptionsResponseOriginal, type CreateRecurringInvoiceBORequest as CreateRecurringInvoiceBORequestOriginal, type CreateRecurringInvoiceBOResponse as CreateRecurringInvoiceBOResponseOriginal, type CreateSubscriptionForOrderRequest as CreateSubscriptionForOrderRequestOriginal, type CreateSubscriptionForOrderResponse as CreateSubscriptionForOrderResponseOriginal, type CreateSubscriptionInStateRequestModeOneOf as CreateSubscriptionInStateRequestModeOneOfOriginal, type CreateSubscriptionInStateRequest as CreateSubscriptionInStateRequestOriginal, type CreateSubscriptionInStateResponse as CreateSubscriptionInStateResponseOriginal, type CreateSubscriptionRequest as CreateSubscriptionRequestOriginal, type CreateSubscriptionResponse as CreateSubscriptionResponseOriginal, CreationMode as CreationModeOriginal, type CreationModeWithLiterals as CreationModeWithLiteralsOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type CustomBillingSchedule as CustomBillingScheduleOriginal, type CustomProrationAmountOneOf as CustomProrationAmountOneOfOriginal, type CustomProration as CustomProrationOriginal, type CustomerActionConfigurationOneOf as CustomerActionConfigurationOneOfOriginal, type CustomerActionCounters as CustomerActionCountersOriginal, type CustomerAction as CustomerActionOriginal, type CustomerActionSettings as CustomerActionSettingsOriginal, type CustomerAllowedActionsRequest as CustomerAllowedActionsRequestOriginal, type CustomerAllowedActionsResponse as CustomerAllowedActionsResponseOriginal, type CustomerCancelConfiguration as CustomerCancelConfigurationOriginal, type CustomerCancelPendingChangeRequest as CustomerCancelPendingChangeRequestOriginal, type CustomerCancelPendingChangeResponse as CustomerCancelPendingChangeResponseOriginal, type CustomerCancelScheduledPauseApplicationErrors as CustomerCancelScheduledPauseApplicationErrorsOriginal, type CustomerCancelScheduledPauseRequest as CustomerCancelScheduledPauseRequestOriginal, type CustomerCancelScheduledPauseResponse as CustomerCancelScheduledPauseResponseOriginal, type CustomerCancelScheduledSkipApplicationErrors as CustomerCancelScheduledSkipApplicationErrorsOriginal, type CustomerCancelScheduledSkipRequest as CustomerCancelScheduledSkipRequestOriginal, type CustomerCancelScheduledSkipResponse as CustomerCancelScheduledSkipResponseOriginal, type CustomerCancelSubscriptionApplicationErrors as CustomerCancelSubscriptionApplicationErrorsOriginal, type CustomerCancelSubscriptionRequest as CustomerCancelSubscriptionRequestOriginal, type CustomerCancelSubscriptionResponse as CustomerCancelSubscriptionResponseOriginal, type CustomerChangeSubscriptionApplicationErrors as CustomerChangeSubscriptionApplicationErrorsOriginal, type CustomerChangeSubscriptionRequest as CustomerChangeSubscriptionRequestOriginal, type CustomerChangeSubscriptionResponse as CustomerChangeSubscriptionResponseOriginal, type CustomerExtendSubscriptionApplicationErrors as CustomerExtendSubscriptionApplicationErrorsOriginal, type CustomerExtendSubscriptionRequest as CustomerExtendSubscriptionRequestOriginal, type CustomerExtendSubscriptionResponse as CustomerExtendSubscriptionResponseOriginal, type CustomerIdOneOf as CustomerIdOneOfOriginal, type CustomerListUpcomingChargesRequest as CustomerListUpcomingChargesRequestOriginal, type CustomerListUpcomingChargesResponse as CustomerListUpcomingChargesResponseOriginal, type Customer as CustomerOriginal, type CustomerPauseResumeConfiguration as CustomerPauseResumeConfigurationOriginal, type CustomerPauseSubscriptionApplicationErrors as CustomerPauseSubscriptionApplicationErrorsOriginal, type CustomerPauseSubscriptionRequest as CustomerPauseSubscriptionRequestOriginal, type CustomerPauseSubscriptionResponse as CustomerPauseSubscriptionResponseOriginal, type CustomerPreviewChangeSubscriptionRequest as CustomerPreviewChangeSubscriptionRequestOriginal, type CustomerPreviewChangeSubscriptionResponse as CustomerPreviewChangeSubscriptionResponseOriginal, type CustomerResumeSubscriptionApplicationErrors as CustomerResumeSubscriptionApplicationErrorsOriginal, type CustomerResumeSubscriptionRequest as CustomerResumeSubscriptionRequestOriginal, type CustomerResumeSubscriptionResponse as CustomerResumeSubscriptionResponseOriginal, type CustomerSkipConfiguration as CustomerSkipConfigurationOriginal, type CustomerSkipCycleApplicationErrors as CustomerSkipCycleApplicationErrorsOriginal, type CustomerSkipCycleRequest as CustomerSkipCycleRequestOriginal, type CustomerSkipCycleResponse as CustomerSkipCycleResponseOriginal, type CustomerTurnOffAutoRenewalRequest as CustomerTurnOffAutoRenewalRequestOriginal, type CustomerTurnOffAutoRenewalResponse as CustomerTurnOffAutoRenewalResponseOriginal, type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors as CustomerTurnOffSubscriptionAutoRenewalApplicationErrorsOriginal, type CustomerTurnOnAutoRenewalRequest as CustomerTurnOnAutoRenewalRequestOriginal, type CustomerTurnOnAutoRenewalResponse as CustomerTurnOnAutoRenewalResponseOriginal, type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors as CustomerTurnOnSubscriptionAutoRenewalApplicationErrorsOriginal, type CustomerUpdateBillingDateApplicationErrors as CustomerUpdateBillingDateApplicationErrorsOriginal, type CustomerUpdateBillingDateConfiguration as CustomerUpdateBillingDateConfigurationOriginal, type CustomerUpdateBillingDateRequest as CustomerUpdateBillingDateRequestOriginal, type CustomerUpdateBillingDateResponse as CustomerUpdateBillingDateResponseOriginal, type CycleAddressChange as CycleAddressChangeOriginal, type CycleAmountChange as CycleAmountChangeOriginal, type CycleContentChange as CycleContentChangeOriginal, type CycleContentChangeValueOneOf as CycleContentChangeValueOneOfOriginal, type CycleContentChangesApplied as CycleContentChangesAppliedOriginal, type CycleDescriptionLine as CycleDescriptionLineOriginal, type CycleDescriptionLinesChange as CycleDescriptionLinesChangeOriginal, type CycleDiscountSummary as CycleDiscountSummaryOriginal, type CycleFeeSummary as CycleFeeSummaryOriginal, type CycleItemAmount as CycleItemAmountOriginal, type CycleItemChange as CycleItemChangeOriginal, type CycleItemSummary as CycleItemSummaryOriginal, type CyclePriceOverride as CyclePriceOverrideOriginal, type CycleQuantityChange as CycleQuantityChangeOriginal, CycleQuantityChangeType as CycleQuantityChangeTypeOriginal, type CycleQuantityChangeTypeWithLiterals as CycleQuantityChangeTypeWithLiteralsOriginal, type CycleShippingChange as CycleShippingChangeOriginal, type CycleShippingInfo as CycleShippingInfoOriginal, type CycleTextChange as CycleTextChangeOriginal, type CycleTotalChange as CycleTotalChangeOriginal, type Cycles as CyclesOriginal, type DeleteDraftSubscriptionRequest as DeleteDraftSubscriptionRequestOriginal, type DeleteDraftSubscriptionResponse as DeleteDraftSubscriptionResponseOriginal, type DeleteSubscriptionBORequest as DeleteSubscriptionBORequestOriginal, type DeleteSubscriptionBOResponse as DeleteSubscriptionBOResponseOriginal, type DeleteSubscriptionRequest as DeleteSubscriptionRequestOriginal, type DeleteSubscriptionResponse as DeleteSubscriptionResponseOriginal, type DetachInvoice as DetachInvoiceOriginal, type DiscountCycles as DiscountCyclesOriginal, type DiscountOrigin as DiscountOriginOriginal, type Discount as DiscountOriginal, type DiscountValueOneOf as DiscountValueOneOfOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Duration as DurationOriginal, DurationUnit as DurationUnitOriginal, type DurationUnitWithLiterals as DurationUnitWithLiteralsOriginal, type DynamicTax as DynamicTaxOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, ExtendPolicyType as ExtendPolicyTypeOriginal, type ExtendPolicyTypeWithLiterals as ExtendPolicyTypeWithLiteralsOriginal, type ExtendSubscriptionApplicationErrors as ExtendSubscriptionApplicationErrorsOriginal, type ExtendSubscriptionRequestExtendPolicyOneOf as ExtendSubscriptionRequestExtendPolicyOneOfOriginal, type ExtendSubscriptionRequest as ExtendSubscriptionRequestOriginal, type ExtendSubscriptionResponse as ExtendSubscriptionResponseOriginal, type ExternalCollectionDetails as ExternalCollectionDetailsOriginal, type ExternalPriceConfig as ExternalPriceConfigOriginal, type ExternalPrice as ExternalPriceOriginal, type ExternallyCollectedPayment as ExternallyCollectedPaymentOriginal, type FinishFreeTrialNowRequest as FinishFreeTrialNowRequestOriginal, type FinishFreeTrialNowResponse as FinishFreeTrialNowResponseOriginal, type FixSubscriptionInvoicesConsistencyRequest as FixSubscriptionInvoicesConsistencyRequestOriginal, type FixSubscriptionInvoicesConsistencyResponse as FixSubscriptionInvoicesConsistencyResponseOriginal, type FixSubscriptionInvoicesRequestModeOneOf as FixSubscriptionInvoicesRequestModeOneOfOriginal, type FixSubscriptionInvoicesRequest as FixSubscriptionInvoicesRequestOriginal, type FixSubscriptionInvoicesResponse as FixSubscriptionInvoicesResponseOriginal, type FixSubscriptionPaymentStatusRequest as FixSubscriptionPaymentStatusRequestOriginal, type FixSubscriptionPaymentStatusResponse as FixSubscriptionPaymentStatusResponseOriginal, type FixSubscriptionTimeCapsuleTasksRequest as FixSubscriptionTimeCapsuleTasksRequestOriginal, type FixSubscriptionTimeCapsuleTasksResponse as FixSubscriptionTimeCapsuleTasksResponseOriginal, type FixedAmountFee as FixedAmountFeeOriginal, type FixedPriceConfig as FixedPriceConfigOriginal, type FixedPrice as FixedPriceOriginal, type FreeTrailEnded as FreeTrailEndedOriginal, type FreeTrailStarted as FreeTrailStartedOriginal, type FreeTrialData as FreeTrialDataOriginal, type FullAddressContactDetails as FullAddressContactDetailsOriginal, type FullAddressDetails as FullAddressDetailsOriginal, type FuturePriceUpdatesRequested as FuturePriceUpdatesRequestedOriginal, type FutureUpdatesRequested as FutureUpdatesRequestedOriginal, type GetFullSubscriptionDataRequest as GetFullSubscriptionDataRequestOriginal, type GetFullSubscriptionDataResponse as GetFullSubscriptionDataResponseOriginal, type GetSubscriptionAndInternalDataRequest as GetSubscriptionAndInternalDataRequestOriginal, type GetSubscriptionAndInternalDataResponse as GetSubscriptionAndInternalDataResponseOriginal, type GetSubscriptionInvoicesRequest as GetSubscriptionInvoicesRequestOriginal, type GetSubscriptionInvoicesResponse as GetSubscriptionInvoicesResponseOriginal, type GetSubscriptionRequest as GetSubscriptionRequestOriginal, type GetSubscriptionResponse as GetSubscriptionResponseOriginal, type GetSubscriptionsStatsRequest as GetSubscriptionsStatsRequestOriginal, type GetSubscriptionsStatsResponse as GetSubscriptionsStatsResponseOriginal, type GracePeriodData as GracePeriodDataOriginal, type GracePeriodEnded as GracePeriodEndedOriginal, type GracePeriodStarted as GracePeriodStartedOriginal, type HandleSubscriptionAfterInvoiceMarkedAsPaidRequest as HandleSubscriptionAfterInvoiceMarkedAsPaidRequestOriginal, HistoryActionInitiator as HistoryActionInitiatorOriginal, type HistoryActionInitiatorWithLiterals as HistoryActionInitiatorWithLiteralsOriginal, HistoryViewMode as HistoryViewModeOriginal, type HistoryViewModeWithLiterals as HistoryViewModeWithLiteralsOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, IdentityType as IdentityTypeOriginal, type IdentityTypeWithLiterals as IdentityTypeWithLiteralsOriginal, type InitiatePaymentMethodSetupRequest as InitiatePaymentMethodSetupRequestOriginal, type InitiatePaymentMethodSetupResponse as InitiatePaymentMethodSetupResponseOriginal, type InitiatedPaymentMethodSetup as InitiatedPaymentMethodSetupOriginal, type InternalSubscriptionData as InternalSubscriptionDataOriginal, type InvoiceActionActionTypeOneOf as InvoiceActionActionTypeOneOfOriginal, type InvoiceAction as InvoiceActionOriginal, type InvoiceApplicationFee as InvoiceApplicationFeeOriginal, type InvoiceApplicationFeeValueOneOf as InvoiceApplicationFeeValueOneOfOriginal, type InvoiceDiscount as InvoiceDiscountOriginal, type InvoiceDiscountValueOneOf as InvoiceDiscountValueOneOfOriginal, type InvoiceItem as InvoiceItemOriginal, type InvoiceItemPaymentTypeOneOf as InvoiceItemPaymentTypeOneOfOriginal, type InvoiceItemPricingModelOneOf as InvoiceItemPricingModelOneOfOriginal, type Invoice as InvoiceOriginal, type InvoicePlatformFeeFeeModelOneOf as InvoicePlatformFeeFeeModelOneOfOriginal, type InvoicePlatformFee as InvoicePlatformFeeOriginal, type InvoiceShippingCharges as InvoiceShippingChargesOriginal, InvoiceStatus as InvoiceStatusOriginal, type InvoiceStatusWithLiterals as InvoiceStatusWithLiteralsOriginal, ItemCategory as ItemCategoryOriginal, type ItemCategoryWithLiterals as ItemCategoryWithLiteralsOriginal, type ItemChange as ItemChangeOriginal, type Item as ItemOriginal, type ItemTaxData as ItemTaxDataOriginal, ItemsToAddMode as ItemsToAddModeOriginal, type ItemsToAddModeWithLiterals as ItemsToAddModeWithLiteralsOriginal, type LatestInvoiceMarkedAsPaid as LatestInvoiceMarkedAsPaidOriginal, type LatestPaymentAttempt as LatestPaymentAttemptOriginal, type LineItemTaxSummary as LineItemTaxSummaryOriginal, type ListSubscriptionHistoryRequest as ListSubscriptionHistoryRequestOriginal, type ListSubscriptionHistoryResponse as ListSubscriptionHistoryResponseOriginal, type ListUpcomingChargesRequest as ListUpcomingChargesRequestOriginal, type ListUpcomingChargesResponse as ListUpcomingChargesResponseOriginal, type MarkBillingCycleAsPaidApplicationErrors as MarkBillingCycleAsPaidApplicationErrorsOriginal, type MarkBillingCycleAsPaidRequest as MarkBillingCycleAsPaidRequestOriginal, type MarkBillingCycleAsPaidResponse as MarkBillingCycleAsPaidResponseOriginal, type MarkLatestInvoiceAsPaidApplicationErrors as MarkLatestInvoiceAsPaidApplicationErrorsOriginal, type MarkLatestInvoiceAsPaidRequest as MarkLatestInvoiceAsPaidRequestOriginal, type MarkLatestInvoiceAsPaidResponse as MarkLatestInvoiceAsPaidResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MigrationDetails as MigrationDetailsOriginal, MissingPreviousBillingDateResumeStrategy as MissingPreviousBillingDateResumeStrategyOriginal, type MissingPreviousBillingDateResumeStrategyWithLiterals as MissingPreviousBillingDateResumeStrategyWithLiteralsOriginal, type Money as MoneyOriginal, type MultipleSubscriptionsOnOrdersInvoice as MultipleSubscriptionsOnOrdersInvoiceOriginal, type OneTime as OneTimeOriginal, OrderMethod as OrderMethodOriginal, type OrderMethodWithLiterals as OrderMethodWithLiteralsOriginal, type Origin as OriginOriginal, type OriginOverride as OriginOverrideOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type PassOnFeeConfig as PassOnFeeConfigOriginal, type PassOnFeeConfigValueOneOf as PassOnFeeConfigValueOneOfOriginal, type PatchSubscriptionRequest as PatchSubscriptionRequestOriginal, type PatchSubscriptionResponse as PatchSubscriptionResponseOriginal, PauseAt as PauseAtOriginal, type PauseAtWithLiterals as PauseAtWithLiteralsOriginal, type PauseInfo as PauseInfoOriginal, type PausePeriod as PausePeriodOriginal, PausePolicy as PausePolicyOriginal, type PausePolicyWithLiterals as PausePolicyWithLiteralsOriginal, type PauseResumeActionConfiguration as PauseResumeActionConfigurationOriginal, type PauseResumeActionSettings as PauseResumeActionSettingsOriginal, type PauseSubscriptionApplicationErrors as PauseSubscriptionApplicationErrorsOriginal, type PauseSubscriptionBORequest as PauseSubscriptionBORequestOriginal, type PauseSubscriptionBOResponse as PauseSubscriptionBOResponseOriginal, type PauseSubscriptionRequest as PauseSubscriptionRequestOriginal, type PauseSubscriptionRequested as PauseSubscriptionRequestedOriginal, type PauseSubscriptionResponse as PauseSubscriptionResponseOriginal, type PayCycleRequest as PayCycleRequestOriginal, type PayCycleResponse as PayCycleResponseOriginal, type PayRecurringInvoice as PayRecurringInvoiceOriginal, PaymentAttemptStatus as PaymentAttemptStatusOriginal, type PaymentAttemptStatusWithLiterals as PaymentAttemptStatusWithLiteralsOriginal, type PaymentData as PaymentDataOriginal, type PaymentMethod as PaymentMethodOriginal, type PaymentMethodUpdated as PaymentMethodUpdatedOriginal, PaymentMode as PaymentModeOriginal, type PaymentModeWithLiterals as PaymentModeWithLiteralsOriginal, type PaymentOrigin as PaymentOriginOriginal, type PaymentSettings as PaymentSettingsOriginal, PaymentSettlementMethod as PaymentSettlementMethodOriginal, type PaymentSettlementMethodWithLiterals as PaymentSettlementMethodWithLiteralsOriginal, PaymentSource as PaymentSourceOriginal, type PaymentSourceWithLiterals as PaymentSourceWithLiteralsOriginal, PaymentStatusEnumPaymentStatus as PaymentStatusEnumPaymentStatusOriginal, type PaymentStatusEnumPaymentStatusWithLiterals as PaymentStatusEnumPaymentStatusWithLiteralsOriginal, PaymentStatus as PaymentStatusOriginal, type PaymentStatusWithLiterals as PaymentStatusWithLiteralsOriginal, type PaymentTaxData as PaymentTaxDataOriginal, PaymentTestMode as PaymentTestModeOriginal, type PaymentTestModeWithLiterals as PaymentTestModeWithLiteralsOriginal, type PercentageFee as PercentageFeeOriginal, type PlatformOrigin as PlatformOriginOriginal, type PreviewChangeSubscriptionRequest as PreviewChangeSubscriptionRequestOriginal, type PreviewChangeSubscriptionResponse as PreviewChangeSubscriptionResponseOriginal, type PreviewSubscriptionChargesRequest as PreviewSubscriptionChargesRequestOriginal, type PreviewSubscriptionChargesRequestSubscriptionOneOf as PreviewSubscriptionChargesRequestSubscriptionOneOfOriginal, type PreviewSubscriptionChargesResponse as PreviewSubscriptionChargesResponseOriginal, type PreviewSubscriptionsChargesConfig as PreviewSubscriptionsChargesConfigOriginal, type PreviewSubscriptionsChargesRequest as PreviewSubscriptionsChargesRequestOriginal, type PreviewSubscriptionsChargesResponse as PreviewSubscriptionsChargesResponseOriginal, type PriceAdjustmentAdjustmentTypeOneOf as PriceAdjustmentAdjustmentTypeOneOfOriginal, type PriceAdjustment as PriceAdjustmentOriginal, PriceAdjustmentReason as PriceAdjustmentReasonOriginal, type PriceAdjustmentReasonWithLiterals as PriceAdjustmentReasonWithLiteralsOriginal, type PriceAdjustmentValueAdjustmentValueTypeOneOf as PriceAdjustmentValueAdjustmentValueTypeOneOfOriginal, type PriceAdjustmentValue as PriceAdjustmentValueOriginal, type PriceDetails as PriceDetailsOriginal, type PricingModelModelOneOf as PricingModelModelOneOfOriginal, type PricingModel as PricingModelOriginal, ProrationAction as ProrationActionOriginal, type ProrationActionWithLiterals as ProrationActionWithLiteralsOriginal, ProrationBehaviorEnumProrationBehavior as ProrationBehaviorEnumProrationBehaviorOriginal, type ProrationBehaviorEnumProrationBehaviorWithLiterals as ProrationBehaviorEnumProrationBehaviorWithLiteralsOriginal, ProrationBehavior as ProrationBehaviorOriginal, type ProrationBehaviorWithLiterals as ProrationBehaviorWithLiteralsOriginal, type Proration as ProrationOriginal, type ProrationPreview as ProrationPreviewOriginal, type ProrationResult as ProrationResultOriginal, type ProrationTypeOneOf as ProrationTypeOneOfOriginal, type QuerySubscriptionsRequest as QuerySubscriptionsRequestOriginal, type QuerySubscriptionsResponse as QuerySubscriptionsResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, type Recurring as RecurringOriginal, type RedirectUrls as RedirectUrlsOriginal, type RefundInfo as RefundInfoOriginal, type Refund as RefundOriginal, RefundReason as RefundReasonOriginal, type RefundReasonWithLiterals as RefundReasonWithLiteralsOriginal, type RemoveCancellationInfoRequest as RemoveCancellationInfoRequestOriginal, type RemoveCancellationInfoResponse as RemoveCancellationInfoResponseOriginal, type RemovePauseInfoRequest as RemovePauseInfoRequestOriginal, type RemovePauseInfoResponse as RemovePauseInfoResponseOriginal, type RenewalPreview as RenewalPreviewOriginal, RequestedFields as RequestedFieldsOriginal, type RequestedFieldsWithLiterals as RequestedFieldsWithLiteralsOriginal, type Reschedule as RescheduleOriginal, type ResetPendingUpdates as ResetPendingUpdatesOriginal, type RestoreDraftSubscriptionRequest as RestoreDraftSubscriptionRequestOriginal, type RestoreDraftSubscriptionResponse as RestoreDraftSubscriptionResponseOriginal, type RestoreInfo as RestoreInfoOriginal, ResumeAt as ResumeAtOriginal, type ResumeAtWithLiterals as ResumeAtWithLiteralsOriginal, type ResumeSubscriptionApplicationErrors as ResumeSubscriptionApplicationErrorsOriginal, type ResumeSubscriptionRequest as ResumeSubscriptionRequestOriginal, type ResumeSubscriptionRequested as ResumeSubscriptionRequestedOriginal, type ResumeSubscriptionResponse as ResumeSubscriptionResponseOriginal, type ReviseSubscriptionRequest as ReviseSubscriptionRequestOriginal, type ReviseSubscriptionResponse as ReviseSubscriptionResponseOriginal, RevivePolicy as RevivePolicyOriginal, type RevivePolicyWithLiterals as RevivePolicyWithLiteralsOriginal, type ReviveSubscriptionRequest as ReviveSubscriptionRequestOriginal, type ReviveSubscriptionResponse as ReviveSubscriptionResponseOriginal, type RunTimeCapsuleTaskNowRequest as RunTimeCapsuleTaskNowRequestOriginal, type ScheduleAdditionalInfo as ScheduleAdditionalInfoOriginal, type ScheduleAdditionalInfoParamOneOf as ScheduleAdditionalInfoParamOneOfOriginal, type ScheduleTimeCapsuleTaskRequest as ScheduleTimeCapsuleTaskRequestOriginal, type ScheduledContractChange as ScheduledContractChangeOriginal, type ScheduledPauseCanceled as ScheduledPauseCanceledOriginal, type ScheduledResumeCanceled as ScheduledResumeCanceledOriginal, type SearchSubscriptionRequest as SearchSubscriptionRequestOriginal, type SearchSubscriptionResponse as SearchSubscriptionResponseOriginal, type SearchSubscriptionsRequest as SearchSubscriptionsRequestOriginal, type SearchSubscriptionsRequestPagingMethodOneOf as SearchSubscriptionsRequestPagingMethodOneOfOriginal, type SearchSubscriptionsResponse as SearchSubscriptionsResponseOriginal, type SendSubscriptionActionEventBORequestEventOneOf as SendSubscriptionActionEventBORequestEventOneOfOriginal, type SendSubscriptionActionEventBORequest as SendSubscriptionActionEventBORequestOriginal, type SendSubscriptionActionEventResponse as SendSubscriptionActionEventResponseOriginal, type SendTimeCapsuleTaskCanceledBIRequest as SendTimeCapsuleTaskCanceledBIRequestOriginal, type SetIsMigratedEvent as SetIsMigratedEventOriginal, type SetShiftingDataRequest as SetShiftingDataRequestOriginal, type SetShiftingDataResponse as SetShiftingDataResponseOriginal, type ShippingCharges as ShippingChargesOriginal, type SkipActionConfiguration as SkipActionConfigurationOriginal, type SkipActionSettings as SkipActionSettingsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type SortingClauses as SortingClausesOriginal, type Sorting as SortingOriginal, type SpecificDateSubscriptionUpdateData as SpecificDateSubscriptionUpdateDataOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type StreetAddress as StreetAddressOriginal, type Subscriber as SubscriberOriginal, type SubscriptionActivated as SubscriptionActivatedOriginal, type SubscriptionAutoRenewalTurnedOff as SubscriptionAutoRenewalTurnedOffOriginal, type SubscriptionAutoRenewalTurnedOn as SubscriptionAutoRenewalTurnedOnOriginal, type SubscriptionBackOfficeAction as SubscriptionBackOfficeActionOriginal, type SubscriptionBillingCyclePaid as SubscriptionBillingCyclePaidOriginal, type SubscriptionBillingCycleStarted as SubscriptionBillingCycleStartedOriginal, type SubscriptionBillingDateUpdated as SubscriptionBillingDateUpdatedOriginal, type SubscriptionBillingDetails as SubscriptionBillingDetailsOriginal, type SubscriptionCanceled as SubscriptionCanceledOriginal, type SubscriptionCancellationRequested as SubscriptionCancellationRequestedOriginal, type SubscriptionChangeSummary as SubscriptionChangeSummaryOriginal, type SubscriptionCharge as SubscriptionChargeOriginal, type SubscriptionCharges as SubscriptionChargesOriginal, type SubscriptionCollectionMethodUpdated as SubscriptionCollectionMethodUpdatedOriginal, type SubscriptionCreated as SubscriptionCreatedOriginal, type SubscriptionCycleReadyToPay as SubscriptionCycleReadyToPayOriginal, type SubscriptionCycleTriggered as SubscriptionCycleTriggeredOriginal, type SubscriptionDelayedSyncEvent as SubscriptionDelayedSyncEventOriginal, type SubscriptionDeleted as SubscriptionDeletedOriginal, type SubscriptionDiff as SubscriptionDiffOriginal, type SubscriptionEnded as SubscriptionEndedOriginal, type SubscriptionEvent as SubscriptionEventOriginal, type SubscriptionEventPayloadOneOf as SubscriptionEventPayloadOneOfOriginal, type SubscriptionExpired as SubscriptionExpiredOriginal, type SubscriptionExtendedExtendPolicyOneOf as SubscriptionExtendedExtendPolicyOneOfOriginal, type SubscriptionExtended as SubscriptionExtendedOriginal, SubscriptionFrequency as SubscriptionFrequencyOriginal, type SubscriptionFrequencyWithLiterals as SubscriptionFrequencyWithLiteralsOriginal, type SubscriptionHistoryEntry as SubscriptionHistoryEntryOriginal, type SubscriptionInfo as SubscriptionInfoOriginal, type SubscriptionInitialPurchaseCompleted as SubscriptionInitialPurchaseCompletedOriginal, type SubscriptionInvoice as SubscriptionInvoiceOriginal, type SubscriptionItemChange as SubscriptionItemChangeOriginal, type SubscriptionMarkedAsPaid as SubscriptionMarkedAsPaidOriginal, type SubscriptionOfflinePurchaseCompleted as SubscriptionOfflinePurchaseCompletedOriginal, type Subscription as SubscriptionOriginal, type SubscriptionPaused as SubscriptionPausedOriginal, type SubscriptionPolicies as SubscriptionPoliciesOriginal, type SubscriptionPolicy as SubscriptionPolicyOriginal, type SubscriptionResumed as SubscriptionResumedOriginal, type SubscriptionRevived as SubscriptionRevivedOriginal, SubscriptionStatusEnumSubscriptionStatus as SubscriptionStatusEnumSubscriptionStatusOriginal, type SubscriptionStatusEnumSubscriptionStatusWithLiterals as SubscriptionStatusEnumSubscriptionStatusWithLiteralsOriginal, SubscriptionStatusGroup as SubscriptionStatusGroupOriginal, type SubscriptionStatusGroupWithLiterals as SubscriptionStatusGroupWithLiteralsOriginal, type SubscriptionStatus as SubscriptionStatusOriginal, type SubscriptionSuspended as SubscriptionSuspendedOriginal, type SubscriptionTrialPeriod as SubscriptionTrialPeriodOriginal, SubscriptionType as SubscriptionTypeOriginal, type SubscriptionTypeWithLiterals as SubscriptionTypeWithLiteralsOriginal, type SubscriptionUpdateData as SubscriptionUpdateDataOriginal, type SubscriptionUpdated as SubscriptionUpdatedOriginal, type Suspension as SuspensionOriginal, type TaskActionActionOneOf as TaskActionActionOneOfOriginal, type TaskAction as TaskActionOriginal, type TaskKey as TaskKeyOriginal, type Task as TaskOriginal, type TaxBreakdown as TaxBreakdownOriginal, type TaxData as TaxDataOriginal, type Tax as TaxOriginal, type TaxSettings as TaxSettingsOriginal, type TaxSummary as TaxSummaryOriginal, type TaxValueOneOf as TaxValueOneOfOriginal, TaxableAddressType as TaxableAddressTypeOriginal, type TaxableAddressTypeWithLiterals as TaxableAddressTypeWithLiteralsOriginal, type TimeBasedProration as TimeBasedProrationOriginal, type Totals as TotalsOriginal, type TurnOffSubscriptionAutoRenewalApplicationErrors as TurnOffSubscriptionAutoRenewalApplicationErrorsOriginal, type TurnOffSubscriptionAutoRenewalRequest as TurnOffSubscriptionAutoRenewalRequestOriginal, type TurnOffSubscriptionAutoRenewalResponse as TurnOffSubscriptionAutoRenewalResponseOriginal, type TurnOnSubscriptionAutoRenewalApplicationErrors as TurnOnSubscriptionAutoRenewalApplicationErrorsOriginal, type TurnOnSubscriptionAutoRenewalRequest as TurnOnSubscriptionAutoRenewalRequestOriginal, type TurnOnSubscriptionAutoRenewalResponse as TurnOnSubscriptionAutoRenewalResponseOriginal, type UnknownSubscriptionEvent as UnknownSubscriptionEventOriginal, type UnsupportedAction as UnsupportedActionOriginal, type UnsupportedReason as UnsupportedReasonOriginal, UpdateAction as UpdateActionOriginal, type UpdateActionWithLiterals as UpdateActionWithLiteralsOriginal, type UpdateBillingDateActionConfiguration as UpdateBillingDateActionConfigurationOriginal, type UpdateBillingDateActionSettings as UpdateBillingDateActionSettingsOriginal, type UpdateBillingDateData as UpdateBillingDateDataOriginal, type UpdateFullSubscriptionRequest as UpdateFullSubscriptionRequestOriginal, type UpdateFullSubscriptionResponse as UpdateFullSubscriptionResponseOriginal, type UpdatePausePaidDurationRequest as UpdatePausePaidDurationRequestOriginal, type UpdatePausePaidDurationResponse as UpdatePausePaidDurationResponseOriginal, type UpdatePaymentMethodBORequest as UpdatePaymentMethodBORequestOriginal, type UpdatePaymentMethodBOResponse as UpdatePaymentMethodBOResponseOriginal, type UpdatePaymentStatusRequest as UpdatePaymentStatusRequestOriginal, type UpdatePaymentStatusResponse as UpdatePaymentStatusResponseOriginal, type UpdateStatusRequest as UpdateStatusRequestOriginal, type UpdateStatusResponse as UpdateStatusResponseOriginal, type UpdateSubscriptionBillingDateApplicationErrors as UpdateSubscriptionBillingDateApplicationErrorsOriginal, type UpdateSubscriptionBillingDateRequest as UpdateSubscriptionBillingDateRequestOriginal, type UpdateSubscriptionBillingDateResponse as UpdateSubscriptionBillingDateResponseOriginal, type UpdateSubscriptionCurrencyRequest as UpdateSubscriptionCurrencyRequestOriginal, type UpdateSubscriptionCurrencyResponse as UpdateSubscriptionCurrencyResponseOriginal, type UpdateSubscriptionInvoiceCycleRequest as UpdateSubscriptionInvoiceCycleRequestOriginal, type UpdateSubscriptionInvoiceCycleResponse as UpdateSubscriptionInvoiceCycleResponseOriginal, type UpdateSubscriptionItemsRequest as UpdateSubscriptionItemsRequestOriginal, type UpdateSubscriptionItemsResponse as UpdateSubscriptionItemsResponseOriginal, type UpdateSubscriptionOriginRequest as UpdateSubscriptionOriginRequestOriginal, type UpdateSubscriptionOriginResponse as UpdateSubscriptionOriginResponseOriginal, type UpdateSubscriptionPaymentMethodRequest as UpdateSubscriptionPaymentMethodRequestOriginal, type UpdateSubscriptionPaymentMethodResponse as UpdateSubscriptionPaymentMethodResponseOriginal, type UpdateSubscriptionPlatformOriginRequest as UpdateSubscriptionPlatformOriginRequestOriginal, type UpdateSubscriptionPlatformOriginResponse as UpdateSubscriptionPlatformOriginResponseOriginal, type UpdateSubscriptionPoliciesRequest as UpdateSubscriptionPoliciesRequestOriginal, type UpdateSubscriptionPoliciesResponse as UpdateSubscriptionPoliciesResponseOriginal, type UpdateSubscriptionRequest as UpdateSubscriptionRequestOriginal, type UpdateSubscriptionResponse as UpdateSubscriptionResponseOriginal, type UpdateSubscriptionStartDateRequest as UpdateSubscriptionStartDateRequestOriginal, type UpdateSubscriptionStartDateResponse as UpdateSubscriptionStartDateResponseOriginal, type UpdatesApplied as UpdatesAppliedOriginal, type UpmActionSettings as UpmActionSettingsOriginal, type V1Duration as V1DurationOriginal, type V1ProrationResult as V1ProrationResultOriginal, type V1SubscriptionActivated as V1SubscriptionActivatedOriginal, type V1SubscriptionCanceled as V1SubscriptionCanceledOriginal, type V1SubscriptionCreated as V1SubscriptionCreatedOriginal, type V1SubscriptionEventEventOneOf as V1SubscriptionEventEventOneOfOriginal, type V1SubscriptionEvent as V1SubscriptionEventOriginal, type V1SubscriptionInitialPurchaseCompleted as V1SubscriptionInitialPurchaseCompletedOriginal, type V1Subscription as V1SubscriptionOriginal, type V1SubscriptionResumed as V1SubscriptionResumedOriginal, V1SubscriptionStatusEnumSubscriptionStatus as V1SubscriptionStatusEnumSubscriptionStatusOriginal, type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals as V1SubscriptionStatusEnumSubscriptionStatusWithLiteralsOriginal, type V1SubscriptionUpdated as V1SubscriptionUpdatedOriginal, type V2Subscription as V2SubscriptionOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, allowedActions, cancelSubscription, countSubscriptions, customerAllowedActions, customerCancelPendingChange, customerCancelScheduledPause, customerCancelScheduledSkip, customerCancelSubscription, customerChangeSubscription, customerCountSubscriptions, customerExtendSubscription, customerGetSubscription, customerInitiatePaymentMethodSetup, customerListUpcomingCharges, customerPauseSubscription, customerPreviewChangeSubscription, customerQuerySubscriptions, customerResumeSubscription, customerSkipCycle, customerTurnOffSubscriptionAutoRenewal, customerTurnOnSubscriptionAutoRenewal, customerUpdateBillingDate, customerUpdateSubscriptionPaymentMethod, extendSubscription, getSubscription, getSubscriptionsStats, initiatePaymentMethodSetup, listSubscriptionHistory, listUpcomingCharges, markBillingCycleAsPaid, markLatestInvoiceAsPaid, pauseSubscription, previewSubscriptionCharges, previewSubscriptionsCharges, querySubscriptions, resumeSubscription, reviseSubscription, searchSubscriptions, turnOffSubscriptionAutoRenewal, turnOnSubscriptionAutoRenewal, updateSubscriptionBillingDate, updateSubscriptionPaymentMethod };