@wix/auto_sdk_subscription_subscriptions 1.0.47 → 1.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +3 -11
  2. package/build/cjs/index.js +402 -142
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +2020 -1771
  5. package/build/cjs/index.typings.js +338 -97
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +1991 -1762
  8. package/build/cjs/meta.js +291 -92
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +3 -11
  11. package/build/es/index.mjs +396 -141
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +2020 -1771
  14. package/build/es/index.typings.mjs +332 -96
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +1991 -1762
  17. package/build/es/meta.mjs +285 -91
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +28 -10
  20. package/build/internal/cjs/index.typings.d.ts +1713 -1383
  21. package/build/internal/cjs/meta.d.ts +2124 -1783
  22. package/build/internal/es/index.d.mts +28 -10
  23. package/build/internal/es/index.typings.d.mts +1713 -1383
  24. package/build/internal/es/meta.d.mts +2124 -1783
  25. package/package.json +4 -4
  26. package/build/internal/cjs/index.js +0 -6659
  27. package/build/internal/cjs/index.js.map +0 -1
  28. package/build/internal/cjs/index.typings.js +0 -5629
  29. package/build/internal/cjs/index.typings.js.map +0 -1
  30. package/build/internal/cjs/meta.js +0 -4712
  31. package/build/internal/cjs/meta.js.map +0 -1
  32. package/build/internal/es/index.mjs +0 -6543
  33. package/build/internal/es/index.mjs.map +0 -1
  34. package/build/internal/es/index.typings.mjs +0 -5526
  35. package/build/internal/es/index.typings.mjs.map +0 -1
  36. package/build/internal/es/meta.mjs +0 -4606
  37. package/build/internal/es/meta.mjs.map +0 -1
@@ -79,6 +79,12 @@ interface Subscription {
79
79
  * @readonly
80
80
  */
81
81
  pendingUpdateData?: SubscriptionUpdateData;
82
+ /**
83
+ * Indicator whether subscription is managed by BASS or external system, like SAPI, for example.
84
+ * @internal
85
+ * @readonly
86
+ */
87
+ bassManaged?: boolean;
82
88
  /**
83
89
  * Key / Value store to keep up to 10 additional values related to the subscription.
84
90
  * Key max length = 50, Value max length = 200. Value can not be empty.
@@ -108,6 +114,12 @@ interface Subscription {
108
114
  * @format GUID
109
115
  */
110
116
  businessLocationId?: string | null;
117
+ /**
118
+ * Indicates BASS needs an operator choice for billing start when resuming this subscription.
119
+ * @internal
120
+ * @readonly
121
+ */
122
+ requiresResumeBillingStartChoice?: boolean;
111
123
  /**
112
124
  * items, minSize is 1, maxSize is 100
113
125
  * @maxSize 100
@@ -601,6 +613,11 @@ interface BillingStatus {
601
613
  latestPaymentData?: PaymentData;
602
614
  /** Free trial data */
603
615
  freeTrialData?: FreeTrialData;
616
+ /**
617
+ * Update billing date operation data
618
+ * @internal
619
+ */
620
+ updateBillingDateData?: UpdateBillingDateData;
604
621
  /**
605
622
  * Grace period information during grace period after payment failure
606
623
  * @readonly
@@ -660,6 +677,13 @@ interface Totals {
660
677
  * @readonly
661
678
  */
662
679
  tax?: string | null;
680
+ /**
681
+ * Tax-exempt amount.
682
+ * @format DECIMAL_VALUE
683
+ * @decimalValue options { gte:0.00, maxScale:2 }
684
+ * @readonly
685
+ */
686
+ exempt?: string | null;
663
687
  /**
664
688
  * Total discount.
665
689
  * @format DECIMAL_VALUE
@@ -862,11 +886,16 @@ interface SubscriptionPolicies {
862
886
  /** Subscription can be canceled not only immediately, but also at end of billing cycle by turning off auto-renew */
863
887
  allowEndOfCycleCancellation?: boolean;
864
888
  /**
865
- * Per-subscription customer action settings. Controls which self-service actions
866
- * customers can perform on this specific subscription.
867
- * If not provided on creation, copied from site-level BillingSettings.
889
+ * Deprecated. Never in production. BASS does not read or write this field; UoU gates use
890
+ * `CustomerSettingsResolver` BBS `customer_settings_by_app_def_id` or Legacy booleans above.
891
+ * @deprecated
868
892
  */
869
893
  customerActionSettings?: CustomerActionSettings;
894
+ /**
895
+ * Number of self-service actions already used on this subscription.
896
+ * @readonly
897
+ */
898
+ customerActionCounters?: CustomerActionCounters;
870
899
  }
871
900
  /**
872
901
  * Per-action merchant configuration for customer self-service actions.
@@ -983,6 +1012,18 @@ interface UpdateBillingDateActionConfiguration {
983
1012
  /** Whether to allow advancing billing date for weekly subscriptions */
984
1013
  allowAdvanceForWeekly?: boolean | null;
985
1014
  }
1015
+ interface CustomerActionCounters {
1016
+ /**
1017
+ * Number of self-service skips already used. Unset means zero.
1018
+ * @readonly
1019
+ */
1020
+ skipCount?: number | null;
1021
+ /**
1022
+ * Number of self-service pauses already used. Unset means zero.
1023
+ * @readonly
1024
+ */
1025
+ pauseCount?: number | null;
1026
+ }
986
1027
  interface PauseInfo {
987
1028
  pausePolicy?: PausePolicyWithLiterals;
988
1029
  pauseAt?: PauseAtWithLiterals;
@@ -1353,6 +1394,25 @@ interface Sorting {
1353
1394
  fieldName?: string;
1354
1395
  /** Sort order. */
1355
1396
  order?: SortOrderWithLiterals;
1397
+ /**
1398
+ * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
1399
+ * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
1400
+ *
1401
+ * If multiple filters are provided, they are combined with AND operator.
1402
+ *
1403
+ * Example:
1404
+ * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
1405
+ * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
1406
+ * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
1407
+ * @internal
1408
+ * @maxSize 10
1409
+ */
1410
+ selectItemsBy?: Record<string, any>[] | null;
1411
+ /**
1412
+ * Origin point for geo-distance sorting on a GEO field
1413
+ * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
1414
+ */
1415
+ origin?: AddressLocation;
1356
1416
  }
1357
1417
  declare enum SortOrder {
1358
1418
  ASC = "ASC",
@@ -1360,6 +1420,12 @@ declare enum SortOrder {
1360
1420
  }
1361
1421
  /** @enumType */
1362
1422
  type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
1423
+ interface AddressLocation {
1424
+ /** Address latitude. */
1425
+ latitude?: number | null;
1426
+ /** Address longitude. */
1427
+ longitude?: number | null;
1428
+ }
1363
1429
  interface Paging {
1364
1430
  /** Number of items to load. */
1365
1431
  limit?: number | null;
@@ -1396,6 +1462,13 @@ interface PagingMetadataV2 {
1396
1462
  tooManyToCount?: boolean | null;
1397
1463
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1398
1464
  cursors?: Cursors;
1465
+ /**
1466
+ * Indicates if there are more results after the current page.
1467
+ * If `true`, another page of results can be retrieved.
1468
+ * If `false`, this is the last page.
1469
+ * @internal
1470
+ */
1471
+ hasNext?: boolean | null;
1399
1472
  }
1400
1473
  interface Cursors {
1401
1474
  /**
@@ -1459,6 +1532,8 @@ interface SubscriptionStatus {
1459
1532
  statuses?: SubscriptionStatusEnumSubscriptionStatusWithLiterals[];
1460
1533
  }
1461
1534
  declare enum SubscriptionStatusGroup {
1535
+ /** @internal */
1536
+ UNKNOWN_STATUS_GROUP = "UNKNOWN_STATUS_GROUP",
1462
1537
  ALL = "ALL",
1463
1538
  /** Union of ACTIVE, PAUSED and PENDING */
1464
1539
  LIVE = "LIVE"
@@ -1524,10 +1599,11 @@ declare enum ActionType {
1524
1599
  UPDATE_BILLING_DATE = "UPDATE_BILLING_DATE",
1525
1600
  UPDATE_COLLECTION_METHOD = "UPDATE_COLLECTION_METHOD",
1526
1601
  SKIP_CYCLE = "SKIP_CYCLE",
1527
- CUSTOMER_UPDATE_BILLING_DATE = "CUSTOMER_UPDATE_BILLING_DATE"
1602
+ CUSTOMER_UPDATE_BILLING_DATE = "CUSTOMER_UPDATE_BILLING_DATE",
1603
+ CHANGE_SUBSCRIPTION = "CHANGE_SUBSCRIPTION"
1528
1604
  }
1529
1605
  /** @enumType */
1530
- 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';
1606
+ 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';
1531
1607
  declare enum ExtendPolicyType {
1532
1608
  PERIOD = "PERIOD",
1533
1609
  BILLING_CYCLE = "BILLING_CYCLE"
@@ -1861,6 +1937,12 @@ interface LineItemTaxSummary {
1861
1937
  * @decimalValue options { maxScale:4 }
1862
1938
  */
1863
1939
  finalTaxAmount?: string | null;
1940
+ /**
1941
+ * 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.
1942
+ * @format DECIMAL_VALUE
1943
+ * @decimalValue options { maxScale:4 }
1944
+ */
1945
+ exemptAmount?: string | null;
1864
1946
  }
1865
1947
  interface FixedPriceConfig {
1866
1948
  }
@@ -2069,6 +2151,182 @@ interface CustomerUpdateBillingDateRequest {
2069
2151
  interface CustomerUpdateBillingDateResponse {
2070
2152
  subscription?: Subscription;
2071
2153
  }
2154
+ interface CustomerChangeSubscriptionRequest {
2155
+ /** @format GUID */
2156
+ subscriptionId: string;
2157
+ /** @maxSize 100 */
2158
+ itemChanges?: SubscriptionItemChange[];
2159
+ newCycle?: Duration;
2160
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
2161
+ }
2162
+ /**
2163
+ * Describes a change to a single subscription item.
2164
+ * The caller (BG/CVS) resolves pricing from their catalog and passes concrete values.
2165
+ */
2166
+ interface SubscriptionItemChange {
2167
+ /**
2168
+ * Which item to change. Must match an existing item ID in the subscription.
2169
+ * @format GUID
2170
+ */
2171
+ itemId?: string;
2172
+ /**
2173
+ * New price per unit. Caller resolves this from their product catalog.
2174
+ * Required when changing product/plan. Optional for quantity-only changes (uses current price).
2175
+ * @decimalValue options { gte:0.00, maxScale:2 }
2176
+ */
2177
+ newPrice?: string | null;
2178
+ /**
2179
+ * New quantity (seats/licenses). Optional — unchanged if not set.
2180
+ * @min 1
2181
+ */
2182
+ newQuantity?: number | null;
2183
+ /**
2184
+ * New catalog reference. Optional — set when changing to a different product.
2185
+ * This is metadata for the caller's tracking; BASS does not use it for pricing.
2186
+ */
2187
+ newCatalogReference?: CatalogReference;
2188
+ /**
2189
+ * New item name. Optional — set when changing to a different product.
2190
+ * @maxLength 200
2191
+ */
2192
+ newName?: string | null;
2193
+ }
2194
+ declare enum ChangeEffectiveTime {
2195
+ UNKNOWN = "UNKNOWN",
2196
+ /** Apply change immediately with proration */
2197
+ IMMEDIATELY = "IMMEDIATELY",
2198
+ /** Schedule change for the next billing cycle */
2199
+ AT_NEXT_RENEWAL = "AT_NEXT_RENEWAL"
2200
+ }
2201
+ /** @enumType */
2202
+ type ChangeEffectiveTimeWithLiterals = ChangeEffectiveTime | 'UNKNOWN' | 'IMMEDIATELY' | 'AT_NEXT_RENEWAL';
2203
+ interface CustomerChangeSubscriptionResponse {
2204
+ subscription?: Subscription;
2205
+ }
2206
+ interface CustomerPreviewChangeSubscriptionRequest {
2207
+ /** @format GUID */
2208
+ subscriptionId: string;
2209
+ /** @maxSize 100 */
2210
+ itemChanges?: SubscriptionItemChange[];
2211
+ newCycle?: Duration;
2212
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
2213
+ }
2214
+ interface CustomerPreviewChangeSubscriptionResponse {
2215
+ preview?: PreviewChangeSubscriptionResponse;
2216
+ }
2217
+ interface PreviewChangeSubscriptionResponse {
2218
+ /** Summary of the current subscription state */
2219
+ current?: SubscriptionChangeSummary;
2220
+ /** Summary of the proposed subscription state after the change */
2221
+ proposed?: SubscriptionChangeSummary;
2222
+ /** Proration preview details. Present only for immediate changes. */
2223
+ proration?: ProrationPreview;
2224
+ /** Renewal preview. Present only for changes at next renewal. */
2225
+ renewalPreview?: RenewalPreview;
2226
+ }
2227
+ /** Summary of a subscription's state, used in change previews. */
2228
+ interface SubscriptionChangeSummary {
2229
+ /** Product ID */
2230
+ productId?: string;
2231
+ /** Product name */
2232
+ productName?: string;
2233
+ /** Billing cycle duration */
2234
+ cycle?: Duration;
2235
+ /** Number of units */
2236
+ quantity?: number;
2237
+ /**
2238
+ * Price per unit
2239
+ * @format DECIMAL_VALUE
2240
+ */
2241
+ pricePerUnit?: string;
2242
+ /**
2243
+ * Total price (price_per_unit * quantity)
2244
+ * @format DECIMAL_VALUE
2245
+ */
2246
+ totalPrice?: string;
2247
+ /**
2248
+ * Currency code (ISO 4217)
2249
+ * @format CURRENCY
2250
+ */
2251
+ currency?: string;
2252
+ /** Current billing period start */
2253
+ periodStart?: Date | null;
2254
+ /** Current billing period end */
2255
+ periodEnd?: Date | null;
2256
+ }
2257
+ /** Preview of proration amounts for a proposed subscription change. */
2258
+ interface ProrationPreview {
2259
+ /**
2260
+ * Credit amount for unused time on the current plan
2261
+ * @format DECIMAL_VALUE
2262
+ */
2263
+ creditAmount?: string;
2264
+ /**
2265
+ * Charge amount for the new plan's prorated price
2266
+ * @format DECIMAL_VALUE
2267
+ */
2268
+ chargeAmount?: string;
2269
+ /**
2270
+ * Net amount (charge minus credit)
2271
+ * @format DECIMAL_VALUE
2272
+ */
2273
+ netAmount?: string;
2274
+ /**
2275
+ * Tax amount on the net proration
2276
+ * @format DECIMAL_VALUE
2277
+ */
2278
+ taxAmount?: string;
2279
+ /**
2280
+ * Total amount including tax
2281
+ * @format DECIMAL_VALUE
2282
+ */
2283
+ totalAmount?: string;
2284
+ /** Remaining seconds in the current billing period */
2285
+ remainingSeconds?: string;
2286
+ /** Total seconds in the current billing cycle */
2287
+ totalCycleSeconds?: string;
2288
+ /** New period end date. Present when proration_behavior is PRORATE_AND_EXTEND. */
2289
+ newPeriodEnd?: Date | null;
2290
+ /** Number of days added to the billing period. Present when proration_behavior is PRORATE_AND_EXTEND. */
2291
+ daysAdded?: number;
2292
+ /** The proration action that would be taken */
2293
+ action?: ProrationActionWithLiterals;
2294
+ }
2295
+ declare enum ProrationAction {
2296
+ UNKNOWN = "UNKNOWN",
2297
+ /** Net charge to customer */
2298
+ CHARGE = "CHARGE",
2299
+ /** Net refund to customer */
2300
+ REFUND = "REFUND",
2301
+ /** Extend billing period instead of refund */
2302
+ EXTEND_PERIOD = "EXTEND_PERIOD",
2303
+ /** No financial change needed */
2304
+ NO_CHANGE = "NO_CHANGE"
2305
+ }
2306
+ /** @enumType */
2307
+ type ProrationActionWithLiterals = ProrationAction | 'UNKNOWN' | 'CHARGE' | 'REFUND' | 'EXTEND_PERIOD' | 'NO_CHANGE';
2308
+ /** Preview of what the next renewal will look like after a change. */
2309
+ interface RenewalPreview {
2310
+ /**
2311
+ * New price per unit at next renewal
2312
+ * @format DECIMAL_VALUE
2313
+ */
2314
+ newPrice?: string;
2315
+ /**
2316
+ * New total at next renewal (price * quantity)
2317
+ * @format DECIMAL_VALUE
2318
+ */
2319
+ newTotal?: string;
2320
+ /** Date of the next renewal */
2321
+ nextRenewalDate?: Date | null;
2322
+ }
2323
+ interface CustomerCancelPendingChangeRequest {
2324
+ /** @format GUID */
2325
+ subscriptionId: string;
2326
+ }
2327
+ interface CustomerCancelPendingChangeResponse {
2328
+ subscription?: Subscription;
2329
+ }
2072
2330
  interface DomainEvent extends DomainEventBodyOneOf {
2073
2331
  createdEvent?: EntityCreatedEvent;
2074
2332
  updatedEvent?: EntityUpdatedEvent;
@@ -2098,7 +2356,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
2098
2356
  /** If present, indicates the action that triggered the event. */
2099
2357
  originatedFrom?: string | null;
2100
2358
  /**
2101
- * 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.
2359
+ * 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.
2102
2360
  * 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.
2103
2361
  */
2104
2362
  entityEventSequence?: string | null;
@@ -2222,375 +2480,326 @@ interface AccountInfo {
2222
2480
  */
2223
2481
  siteId?: string | null;
2224
2482
  }
2225
- interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
2226
- activeSubscription?: CreateSubscriptionRequest;
2227
- }
2228
- /** @oneof */
2229
- interface CreateSubscriptionInStateRequestModeOneOf {
2230
- activeSubscription?: CreateSubscriptionRequest;
2231
- }
2232
- interface CreateSubscriptionRequest {
2233
- subscription?: Subscription;
2234
- /** Optional settings for the payments. Should be empty for free subscriptions. */
2235
- paymentSettings?: PaymentSettings;
2236
- /**
2237
- * Optional unique identifier for this request in order to prevent subscription duplications
2238
- * @format GUID
2239
- */
2240
- idempotencyKey?: string | null;
2241
- /** Optional origin override for setting identity of subscription creator instead of extracting from context */
2242
- originOverride?: OriginOverride;
2243
- }
2244
- interface OriginOverride {
2245
- /** @format GUID */
2246
- appId?: string;
2483
+ interface SetIsMigratedEvent {
2247
2484
  /** @format GUID */
2248
- instanceId?: string;
2485
+ subscriptionId?: string;
2249
2486
  }
2250
- interface CreateSubscriptionInStateResponse {
2487
+ interface SubscriptionDelayedSyncEvent {
2251
2488
  /** @format GUID */
2252
2489
  subscriptionId?: string;
2253
2490
  }
2254
- interface PayCycleRequest {
2255
- /** @format GUID */
2256
- subscriptionId: string;
2257
- paymentTestMode?: PaymentTestModeWithLiterals;
2258
- /** @format GUID */
2259
- tenantId: string;
2491
+ interface InvoiceAction extends InvoiceActionActionTypeOneOf {
2492
+ payRecurring?: PayRecurringInvoice;
2260
2493
  }
2261
- declare enum PaymentTestMode {
2262
- REGULAR = "REGULAR",
2263
- FAIL_TECHNICAL = "FAIL_TECHNICAL",
2264
- FAIL_DECLINE = "FAIL_DECLINE",
2265
- FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
2494
+ /** @oneof */
2495
+ interface InvoiceActionActionTypeOneOf {
2496
+ payRecurring?: PayRecurringInvoice;
2266
2497
  }
2267
- /** @enumType */
2268
- type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE';
2269
- interface PayCycleResponse {
2498
+ interface PayRecurringInvoice {
2270
2499
  /** @format GUID */
2271
2500
  invoiceId?: string;
2272
- /** @format GUID */
2273
- paymentOrderId?: string | null;
2274
- subscription?: Subscription;
2275
- }
2276
- interface GetFullSubscriptionDataRequest {
2277
- /** @format GUID */
2278
- _id?: string;
2279
2501
  }
2280
- interface GetFullSubscriptionDataResponse {
2502
+ /**
2503
+ * Sent each time a subscription status has been set to Active
2504
+ * Active shows that a subscription is live and operational.
2505
+ * For example:
2506
+ * * For subscription with free trial, free trial start date is also the activation date.
2507
+ * * For a subscription with future start date, the start date is also the activation date.
2508
+ * * When a subscription is resumed from a pause status, the resume date is also the activation date.
2509
+ */
2510
+ interface SubscriptionActivated {
2281
2511
  subscription?: Subscription;
2282
- internalSubscriptionData?: InternalSubscriptionData;
2283
- }
2284
- interface InternalSubscriptionData {
2285
- /** @format GUID */
2286
- originInstanceId?: string;
2287
- source?: string | null;
2288
- billingType?: string;
2289
- isOneTime?: boolean;
2290
- migrationDetails?: MigrationDetails;
2291
- pausePaidDuration?: string | null;
2292
- authorizationPaymentData?: PaymentData;
2293
- currentCyclePausePeriods?: PausePeriod[];
2294
2512
  }
2295
- interface MigrationDetails {
2296
- /** system (application) where the Subscription has been created */
2297
- originSystem?: string;
2298
- /** date when the Subscription started to be managed in BASS */
2299
- shiftManagementDate?: Date | null;
2300
- }
2301
- interface PausePeriod {
2302
- startDate?: Date | null;
2303
- endDate?: Date | null;
2513
+ /**
2514
+ * Sent each time a subscription status has been set to Ended
2515
+ * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
2516
+ * This is different from a Canceled subscription which ends the subscription before a designated end date.
2517
+ * Therefore, Ended and Canceled are mutually exclusive.
2518
+ */
2519
+ interface SubscriptionEnded {
2520
+ subscription?: Subscription;
2304
2521
  }
2305
- interface GetSubscriptionAndInternalDataRequest {
2306
- /** @format GUID */
2307
- subscriptionId?: string;
2522
+ interface SubscriptionInitialPurchaseCompleted {
2523
+ subscription?: Subscription;
2524
+ actionDetails?: ActionDetails;
2308
2525
  /** @format GUID */
2309
- tenantId?: string;
2526
+ paymentTransactionId?: string | null;
2310
2527
  }
2311
- interface GetSubscriptionAndInternalDataResponse {
2528
+ interface SubscriptionCycleReadyToPay {
2312
2529
  subscription?: Subscription;
2313
- internalSubscriptionData?: InternalSubscriptionData;
2314
2530
  }
2315
- interface SearchSubscriptionRequest {
2316
- /** @format GUID */
2317
- _id?: string;
2318
- /** @format GUID */
2319
- tenantId?: string;
2531
+ interface SubscriptionBillingCycleStarted {
2532
+ subscription?: Subscription;
2533
+ /**
2534
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2535
+ * @format GUID
2536
+ */
2537
+ paymentTransactionId?: string | null;
2320
2538
  }
2321
- interface SearchSubscriptionResponse {
2539
+ interface SubscriptionRevived {
2322
2540
  subscription?: Subscription;
2323
2541
  }
2324
- interface UpdatePausePaidDurationRequest {
2325
- /** @format GUID */
2326
- subscriptionId?: string;
2542
+ interface CreateSubscriptionRequest {
2543
+ subscription?: Subscription;
2544
+ /** Optional settings for the payments. Should be empty for free subscriptions. */
2545
+ paymentSettings?: PaymentSettings;
2327
2546
  /**
2328
- * @min 1
2329
- * @max 10000000
2547
+ * Optional unique identifier for this request in order to prevent subscription duplications
2548
+ * @format GUID
2330
2549
  */
2331
- pausePaidDurationSeconds?: string;
2332
- /** @format GUID */
2333
- tenantId?: string;
2334
- }
2335
- interface UpdatePausePaidDurationResponse {
2550
+ idempotencyKey?: string | null;
2551
+ /** Optional origin override for setting identity of subscription creator instead of extracting from context */
2552
+ originOverride?: OriginOverride;
2336
2553
  }
2337
- interface UpdateStatusRequest {
2554
+ interface OriginOverride {
2338
2555
  /** @format GUID */
2339
- subscriptionId?: string;
2556
+ appId?: string;
2340
2557
  /** @format GUID */
2341
- tenantId?: string;
2342
- status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
2558
+ instanceId?: string;
2343
2559
  }
2344
- interface UpdateStatusResponse {
2560
+ interface CreateSubscriptionResponse {
2345
2561
  subscription?: Subscription;
2562
+ /**
2563
+ * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
2564
+ * @format GUID
2565
+ */
2566
+ paymentOrderId?: string | null;
2346
2567
  }
2347
- interface UpdatePaymentStatusRequest {
2348
- /** @format GUID */
2349
- subscriptionId?: string;
2350
- /** @format GUID */
2351
- tenantId?: string;
2352
- paymentStatus?: PaymentStatusWithLiterals;
2568
+ interface UpdateSubscriptionRequest {
2569
+ /** Revision is validated if Subscription.revision is set */
2570
+ subscription?: Subscription;
2571
+ /** Supported fields: customer, metadata */
2572
+ fieldMask?: string[];
2353
2573
  }
2354
- interface UpdatePaymentStatusResponse {
2574
+ interface UpdateSubscriptionResponse {
2355
2575
  subscription?: Subscription;
2356
2576
  }
2357
- interface RemoveCancellationInfoRequest {
2358
- /** @format GUID */
2359
- subscriptionId?: string;
2360
- /** @format GUID */
2361
- tenantId?: string;
2577
+ interface UpdateSubscriptionStartDateRequest {
2578
+ /**
2579
+ * Subscription ID
2580
+ * @format GUID
2581
+ */
2582
+ _id?: string;
2583
+ /**
2584
+ * Can be updated only if Subscription is in Draft state
2585
+ * By setting start_date in the future, end_date will be recalculated for termed Subscriptions
2586
+ * cycles_to_pay_on_creation will be set to 1 if no free trial is set
2587
+ */
2588
+ startDate?: Date | null;
2362
2589
  }
2363
- interface RemoveCancellationInfoResponse {
2590
+ interface UpdateSubscriptionStartDateResponse {
2364
2591
  subscription?: Subscription;
2365
2592
  }
2366
- interface RemovePauseInfoRequest {
2367
- /** @format GUID */
2368
- subscriptionId?: string;
2369
- /** @format GUID */
2370
- tenantId?: string;
2593
+ interface BassToSapiPaypalMigrationRequest {
2594
+ /**
2595
+ * Subscription ID
2596
+ * @format GUID
2597
+ */
2598
+ _id?: string;
2599
+ collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
2371
2600
  }
2372
- interface RemovePauseInfoResponse {
2601
+ interface BassToSapiPaypalMigrationResponse {
2373
2602
  subscription?: Subscription;
2374
2603
  }
2375
- interface ReviveSubscriptionRequest {
2376
- /** @format GUID */
2377
- tenantId?: string;
2378
- /** @format GUID */
2379
- subscriptionId?: string;
2380
- revivePolicy?: RevivePolicyWithLiterals;
2381
- isTestRun?: boolean;
2382
- }
2383
- declare enum RevivePolicy {
2384
- SIMPLE = "SIMPLE",
2385
- RESUME = "RESUME"
2604
+ interface UpdateSubscriptionPoliciesRequest {
2605
+ /**
2606
+ * Subscription ID
2607
+ * @format GUID
2608
+ */
2609
+ _id?: string;
2610
+ cancellableByCustomer?: boolean | null;
2386
2611
  }
2387
- /** @enumType */
2388
- type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';
2389
- interface ReviveSubscriptionResponse {
2390
- subscription?: Subscription;
2612
+ interface UpdateSubscriptionPoliciesResponse {
2613
+ /** Updated policies of the subscription */
2614
+ policies?: SubscriptionPolicies;
2391
2615
  }
2392
- interface ConvertSapiRequest {
2393
- /** @format GUID */
2394
- subscriptionId?: string;
2616
+ interface UpdateSubscriptionBillingDateRequest {
2617
+ /**
2618
+ * ID of the subscription to update the billing date for.
2619
+ * @format GUID
2620
+ */
2621
+ _id: string;
2622
+ /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
2623
+ billingDate: Date | null;
2624
+ /**
2625
+ * Information about how BASS adjusts the total of the next invoice. Extending
2626
+ * the current billing cycle results in a higher payment, while shortening it
2627
+ * leads to a lower payment. BASS offers automatic calculation of the proration
2628
+ * amount based on the number of days added to or removed from the current billing
2629
+ * cycle. Alternatively, you can use your own custom method to calculate the
2630
+ * proration amount. The custom proration amount can't exceed the total of the
2631
+ * current billing cycle.
2632
+ */
2633
+ proration?: Proration;
2395
2634
  }
2396
- interface ConvertSapiResponse {
2635
+ interface UpdateSubscriptionBillingDateResponse {
2636
+ /** Updated subscription. */
2397
2637
  subscription?: Subscription;
2398
2638
  }
2399
- interface GetSubscriptionInvoicesRequest {
2400
- /** @format GUID */
2401
- _id?: string;
2402
- }
2403
- interface GetSubscriptionInvoicesResponse {
2404
- invoices?: SubscriptionInvoice[];
2639
+ interface SubscriptionBillingDateUpdated {
2640
+ subscription?: Subscription;
2641
+ billingDate?: Date | null;
2642
+ proration?: Proration;
2405
2643
  }
2406
- interface SubscriptionInvoice {
2407
- /** @format GUID */
2644
+ interface UpdateSubscriptionOriginRequest {
2645
+ /**
2646
+ * ID of the subscription to update origin.
2647
+ * @format GUID
2648
+ */
2408
2649
  _id?: string;
2409
- subscriptionCycle?: number;
2410
- _createdDate?: Date | null;
2411
- }
2412
- interface FinishFreeTrialNowRequest {
2413
- /** @format GUID */
2414
- subscriptionId?: string;
2415
- /** @format GUID */
2416
- tenantId?: string;
2650
+ /**
2651
+ * Origin entity ID of the subscription to update.
2652
+ * @format GUID
2653
+ */
2654
+ entityId?: string;
2417
2655
  }
2418
- interface FinishFreeTrialNowResponse {
2656
+ interface UpdateSubscriptionOriginResponse {
2657
+ /** Updated subscription. */
2419
2658
  subscription?: Subscription;
2420
2659
  }
2421
- interface FixSubscriptionTimeCapsuleTasksRequest {
2422
- /** @format GUID */
2423
- subscriptionId?: string;
2424
- /** @format GUID */
2425
- tenantId?: string;
2660
+ interface ReviseSubscriptionRequest {
2661
+ /**
2662
+ * Subscription ID
2663
+ * @format GUID
2664
+ */
2665
+ _id: string;
2666
+ /**
2667
+ * 0 for no revision, maxSize is 100
2668
+ * @maxSize 100
2669
+ */
2670
+ items?: Item[];
2426
2671
  }
2427
- interface FixSubscriptionTimeCapsuleTasksResponse {
2672
+ interface ReviseSubscriptionResponse {
2673
+ subscription?: Subscription;
2428
2674
  }
2429
- interface SendTimeCapsuleTaskCanceledBIRequest {
2430
- /** @format GUID */
2431
- tenantId?: string;
2432
- /** @format GUID */
2433
- subscriptionId?: string;
2434
- /** @minLength 1 */
2435
- taskType?: string;
2436
- }
2437
- interface Empty {
2438
- }
2439
- interface ScheduleTimeCapsuleTaskRequest {
2440
- /** @format GUID */
2441
- subscriptionId?: string;
2442
- /** @minLength 1 */
2443
- taskType?: string;
2444
- executionTime?: Date | null;
2445
- /** @format GUID */
2446
- tenantId?: string;
2447
- }
2448
- interface CancelTimeCapsuleTaskRequest {
2449
- /** @format GUID */
2450
- tenantId?: string;
2451
- /** @format GUID */
2452
- subscriptionId?: string;
2453
- /** @minLength 1 */
2454
- taskType?: string;
2455
- }
2456
- interface UpdateFullSubscriptionRequest {
2457
- /** @format GUID */
2458
- tenantId?: string;
2459
- subscription?: Subscription;
2460
- }
2461
- interface UpdateFullSubscriptionResponse {
2462
- subscription?: Subscription;
2463
- }
2464
- interface PatchSubscriptionRequest {
2675
+ interface UpdateSubscriptionItemsRequest {
2465
2676
  /**
2466
- * Tenant ID (instance ID) of the subscription
2677
+ * Subscription ID
2467
2678
  * @format GUID
2468
2679
  */
2469
- tenantId?: string;
2680
+ _id?: string;
2681
+ /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
2682
+ updateAction?: UpdateActionWithLiterals;
2683
+ /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
2684
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2470
2685
  /**
2471
- * Subscription ID to patch
2686
+ * Existing items to update
2687
+ * @maxSize 100
2688
+ */
2689
+ itemsToUpdate?: ItemChange[];
2690
+ /**
2691
+ * Items to add
2692
+ * @maxSize 99
2693
+ */
2694
+ itemsToAdd?: Item[];
2695
+ /**
2696
+ * Existing items to delete
2472
2697
  * @format GUID
2698
+ * @maxSize 99
2473
2699
  */
2474
- subscriptionId?: string;
2475
- /** Partial subscription with updated values */
2476
- subscription?: Subscription;
2477
- /** Fields to update (e.g., "name", "billing_settings.collection_method") */
2478
- fieldMask?: string[];
2479
- }
2480
- interface PatchSubscriptionResponse {
2481
- /** The updated subscription */
2482
- subscription?: Subscription;
2483
- }
2484
- interface UpdateSubscriptionInvoiceCycleRequest {
2485
- /** @format GUID */
2486
- subscriptionId?: string;
2487
- /** @format GUID */
2488
- tenantId?: string;
2489
- /** @format GUID */
2490
- invoiceId?: string;
2491
- subscriptionCycle?: number;
2492
- }
2493
- interface UpdateSubscriptionInvoiceCycleResponse {
2494
- subscriptionInvoice?: SubscriptionInvoice;
2495
- }
2496
- interface AddPausePeriodRequest {
2497
- /** @format GUID */
2498
- tenantId?: string;
2499
- /** @format GUID */
2500
- subscriptionId?: string;
2501
- pauseStartDate?: Date | null;
2502
- pauseEndDate?: Date | null;
2503
- }
2504
- interface AddPausePeriodResponse {
2505
- subscription?: Subscription;
2506
- }
2507
- interface RunTimeCapsuleTaskNowRequest {
2508
- /** @format GUID */
2509
- tenantId?: string;
2510
- /** @format GUID */
2511
- subscriptionId?: string;
2512
- /** @minLength 1 */
2513
- taskType?: string;
2514
- }
2515
- interface CreateRecurringInvoiceBORequest {
2516
- /** @format GUID */
2517
- subscriptionId?: string;
2518
- /** @format GUID */
2519
- tenantId?: string;
2520
- /** @min 2 */
2521
- cycleNumber?: number;
2522
- }
2523
- interface CreateRecurringInvoiceBOResponse {
2524
- invoiceId?: string;
2700
+ itemsToDelete?: string[] | null;
2525
2701
  }
2526
- interface SetShiftingDataRequest {
2527
- /** @format GUID */
2528
- subscriptionId?: string;
2529
- /** @format GUID */
2530
- tenantId?: string;
2531
- isBassManaged?: boolean;
2532
- shiftManagementDate?: Date | null;
2702
+ declare enum UpdateAction {
2703
+ NONE = "NONE",
2704
+ /** Update subscription immediately, please note proration for updates changing price are not yet supported */
2705
+ IMMEDIATELY = "IMMEDIATELY",
2706
+ /** Request updates that will take affect only at the start of the next billing cycle. */
2707
+ NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
2708
+ /** Reset all pending updates */
2709
+ RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
2710
+ /** Request updates that will take affect only at a specific date. */
2711
+ SPECIFIC_DATE = "SPECIFIC_DATE"
2533
2712
  }
2534
- interface SetShiftingDataResponse {
2713
+ /** @enumType */
2714
+ type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
2715
+ interface UpdateSubscriptionItemsResponse {
2535
2716
  subscription?: Subscription;
2536
2717
  }
2537
- interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
2538
- attachInvoice?: AttachInvoice;
2539
- detachInvoice?: DetachInvoice;
2540
- /** @format GUID */
2541
- tenantId?: string;
2542
- /** @format GUID */
2543
- subscriptionId?: string;
2544
- }
2545
- /** @oneof */
2546
- interface FixSubscriptionInvoicesRequestModeOneOf {
2547
- attachInvoice?: AttachInvoice;
2548
- detachInvoice?: DetachInvoice;
2549
- }
2550
- interface AttachInvoice {
2551
- /** @format GUID */
2552
- invoiceId?: string;
2553
- }
2554
- interface DetachInvoice {
2555
- /** @format GUID */
2556
- invoiceId?: string;
2557
- }
2558
- interface FixSubscriptionInvoicesResponse {
2559
- invoices?: SubscriptionInvoice[];
2718
+ interface BulkUpdateSubscriptionItemsByFilterRequest {
2719
+ /**
2720
+ * Filter to identify the subscriptions for which items are updated. For
2721
+ * supported fields see
2722
+ * [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).
2723
+ * Sending an empty subscription filter results in a validation error.
2724
+ * In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
2725
+ * `subscriptionId` field inside this filter. Passing any other filter results
2726
+ * in a failed validation error.
2727
+ */
2728
+ subscriptionFilter?: Record<string, any> | null;
2729
+ /**
2730
+ * Filter to specify which subscription items are updated. Make sure to use
2731
+ * the catalog item ID and not the item's unique ID. All subscription items
2732
+ * with matching `items.catalogReference.catalogItemId` are updated.
2733
+ *
2734
+ * Max: `100` reference catalog item IDs
2735
+ * @format GUID
2736
+ * @maxSize 100
2737
+ */
2738
+ catalogReferenceIds?: string[] | null;
2739
+ /**
2740
+ * Information about the update timing and update type.
2741
+ *
2742
+ * + `"IMMEDIATELY"`: The updates become effective immediately.
2743
+ * + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
2744
+ * + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
2745
+ * + `"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.
2746
+ */
2747
+ updateAction?: UpdateActionWithLiterals;
2748
+ /**
2749
+ * Additional information for updates. Currently, only supported for
2750
+ * `{"updateAction": "SPECIFIC_DATE"}`.
2751
+ */
2752
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2753
+ /**
2754
+ * Update details for the susbcription items that match the filtering.
2755
+ * Currently, you can update only the item price, quantity, and tax. Note
2756
+ * that all item properties are updated to the same values. In case you want set
2757
+ * different values for individual items, you must call
2758
+ * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
2759
+ */
2760
+ bulkItemUpdateData?: BulkItemChange;
2761
+ /**
2762
+ * __Not implemented yet__. Items to add to the subscriptions matching the filtering.
2763
+ * @maxSize 99
2764
+ */
2765
+ itemsToAdd?: Item[];
2560
2766
  }
2561
- interface RestoreDraftSubscriptionRequest {
2562
- /** @format GUID */
2563
- tenantId?: string;
2564
- /** @format GUID */
2565
- subscriptionId?: string;
2767
+ interface BulkItemChange {
2768
+ /** Information about the new item price. */
2769
+ pricingModel?: PricingModel;
2770
+ /**
2771
+ * New item quantity.
2772
+ *
2773
+ * Min: `1`
2774
+ * @min 1
2775
+ */
2776
+ quantity?: number | null;
2777
+ /** Information about the new item tax. */
2778
+ tax?: Tax;
2566
2779
  }
2567
- interface RestoreDraftSubscriptionResponse {
2568
- subscription?: Subscription;
2780
+ interface BulkUpdateSubscriptionItemsByFilterResponse {
2781
+ /**
2782
+ * ID of your bulk job. You can use
2783
+ * [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)
2784
+ * to retrieve information about the job status.
2785
+ */
2786
+ jobId?: string;
2569
2787
  }
2570
- interface DeleteDraftSubscriptionRequest {
2571
- /** @format GUID */
2572
- tenantId?: string;
2788
+ interface DeleteSubscriptionRequest {
2573
2789
  /** @format GUID */
2574
- subscriptionId?: string;
2790
+ _id?: string;
2791
+ revision?: string;
2575
2792
  }
2576
- interface DeleteDraftSubscriptionResponse {
2577
- subscription?: Subscription;
2793
+ interface DeleteSubscriptionResponse {
2578
2794
  }
2579
- interface DeleteSubscriptionBORequest {
2580
- /** @format GUID */
2581
- tenantId?: string;
2795
+ interface CancelSubscriptionRequest {
2582
2796
  /** @format GUID */
2583
- subscriptionId?: string;
2584
- }
2585
- interface DeleteSubscriptionBOResponse {
2586
- subscription?: Subscription;
2797
+ _id: string;
2798
+ actionContext: ActionContext;
2587
2799
  }
2588
- interface CancelSubscriptionBORequest {
2589
- /** @format GUID */
2590
- tenantId?: string;
2591
- /** @format GUID */
2592
- subscriptionId?: string;
2800
+ interface ActionContext {
2593
2801
  initiator?: ActionInitiatorWithLiterals;
2802
+ /** Optional action reason message */
2594
2803
  reason?: string | null;
2595
2804
  }
2596
2805
  declare enum ActionInitiator {
@@ -2601,971 +2810,600 @@ declare enum ActionInitiator {
2601
2810
  }
2602
2811
  /** @enumType */
2603
2812
  type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
2604
- interface CancelSubscriptionBOResponse {
2813
+ interface CancelSubscriptionResponse {
2605
2814
  subscription?: Subscription;
2606
2815
  }
2607
- interface UpdatePaymentMethodBORequest {
2816
+ interface PauseSubscriptionRequest {
2608
2817
  /** @format GUID */
2609
- tenantId?: string;
2610
- /** @format GUID */
2611
- subscriptionId?: string;
2612
- /** @format GUID */
2613
- paymentMethodId?: string;
2818
+ _id: string;
2819
+ pausePolicy?: PausePolicyWithLiterals;
2820
+ pauseAt?: PauseAtWithLiterals;
2821
+ /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
2822
+ pauseAtSchedule?: ScheduleAdditionalInfo;
2823
+ /** contains additional scheduling information for certain auto_resume_at either specific date */
2824
+ autoResumeAtSchedule?: ScheduleAdditionalInfo;
2825
+ actionContext: ActionContext;
2614
2826
  }
2615
- interface UpdatePaymentMethodBOResponse {
2827
+ interface PauseSubscriptionResponse {
2616
2828
  subscription?: Subscription;
2617
2829
  }
2618
- interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
2619
- billingCycleStarted?: SubscriptionBillingCycleStarted;
2620
- /** @format GUID */
2621
- tenantId?: string;
2622
- /** @format GUID */
2623
- subscriptionId?: string;
2624
- }
2625
- /** @oneof */
2626
- interface SendSubscriptionActionEventBORequestEventOneOf {
2627
- billingCycleStarted?: SubscriptionBillingCycleStarted;
2628
- }
2629
- interface SubscriptionBillingCycleStarted {
2830
+ interface SubscriptionPaused {
2630
2831
  subscription?: Subscription;
2631
- /**
2632
- * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2633
- * @format GUID
2634
- */
2635
- paymentTransactionId?: string | null;
2636
- }
2637
- interface SendSubscriptionActionEventResponse {
2638
- }
2639
- interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
2640
- /** @format GUID */
2641
- tenantId?: string;
2642
- /** @format GUID */
2643
- subscriptionId?: string;
2644
- transactionId?: string;
2645
- }
2646
- interface PauseSubscriptionBORequest {
2647
- /** @format GUID */
2648
- tenantId?: string;
2649
- /** @format GUID */
2650
- subscriptionId?: string;
2651
2832
  pausePolicy?: PausePolicyWithLiterals;
2833
+ actionDetails?: ActionDetails;
2834
+ }
2835
+ interface PauseSubscriptionRequested {
2836
+ subscription?: Subscription;
2652
2837
  pauseAt?: PauseAtWithLiterals;
2653
- initiator?: ActionInitiatorWithLiterals;
2654
- /** @maxLength 500 */
2655
- reason?: string | null;
2838
+ pausePolicy?: PausePolicyWithLiterals;
2839
+ actionDetails?: ActionDetails;
2656
2840
  }
2657
- interface PauseSubscriptionBOResponse {
2841
+ interface ScheduledPauseCanceled {
2658
2842
  subscription?: Subscription;
2843
+ actionDetails?: ActionDetails;
2659
2844
  }
2660
- interface FixSubscriptionInvoicesConsistencyRequest {
2661
- /** @format GUID */
2662
- tenantId?: string;
2845
+ interface ResumeSubscriptionRequest {
2663
2846
  /** @format GUID */
2664
- subscriptionId?: string;
2847
+ _id: string;
2848
+ resumeAt?: ResumeAtWithLiterals;
2849
+ /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
2850
+ resumeAtSchedule?: ScheduleAdditionalInfo;
2851
+ actionContext: ActionContext;
2852
+ /** Strategy for resuming a migrated paused subscription when the previous billing date is missing. */
2853
+ missingPreviousBillingDateResumeStrategy?: MissingPreviousBillingDateResumeStrategyWithLiterals;
2665
2854
  }
2666
- interface FixSubscriptionInvoicesConsistencyResponse {
2855
+ declare enum MissingPreviousBillingDateResumeStrategy {
2856
+ UNKNOWN = "UNKNOWN",
2857
+ /** Use a fallback that makes the next billing date resolve to now. */
2858
+ START_BILLING_IMMEDIATELY = "START_BILLING_IMMEDIATELY",
2859
+ /** Use a fallback that makes the next billing date resolve to one full cycle from now. */
2860
+ START_BILLING_AFTER_ONE_FULL_CYCLE = "START_BILLING_AFTER_ONE_FULL_CYCLE"
2667
2861
  }
2668
- interface UpdateSubscriptionCurrencyRequest {
2669
- /**
2670
- * Tenant ID (instance ID) of the subscription
2671
- * @format GUID
2672
- */
2673
- tenantId?: string;
2674
- /**
2675
- * Subscription ID to update currency for
2676
- * @format GUID
2677
- */
2678
- subscriptionId?: string;
2679
- /**
2680
- * New currency code (e.g., "USD", "EUR") - ISO 4217 format
2681
- * @format CURRENCY
2682
- */
2683
- newCurrency?: string;
2684
- /**
2685
- * Exchange rate from current currency to new currency (newAmount = oldAmount * exchangeRate)
2686
- * @decimalValue options { gt:0.00, maxScale:6 }
2687
- */
2688
- exchangeRate?: string;
2862
+ /** @enumType */
2863
+ type MissingPreviousBillingDateResumeStrategyWithLiterals = MissingPreviousBillingDateResumeStrategy | 'UNKNOWN' | 'START_BILLING_IMMEDIATELY' | 'START_BILLING_AFTER_ONE_FULL_CYCLE';
2864
+ interface ResumeSubscriptionResponse {
2865
+ subscription?: Subscription;
2689
2866
  }
2690
- interface UpdateSubscriptionCurrencyResponse {
2691
- /** The updated subscription with new currency and converted amounts */
2867
+ interface SubscriptionResumed {
2692
2868
  subscription?: Subscription;
2869
+ actionDetails?: ActionDetails;
2870
+ pauseInfo?: PauseInfo;
2693
2871
  }
2694
- interface UpdateSubscriptionPlatformOriginRequest {
2695
- /**
2696
- * Subscription ID to update platform origin for
2697
- * @format GUID
2698
- */
2699
- subscriptionId?: string;
2700
- /**
2701
- * Tenant ID (instance ID) of the subscription
2702
- * @format GUID
2703
- */
2704
- tenantId?: string;
2705
- /** New platform origin (appId and entityId) */
2706
- platformOrigin?: PlatformOrigin;
2872
+ interface ResumeSubscriptionRequested {
2873
+ subscription?: Subscription;
2874
+ resumeAt?: ResumeAtWithLiterals;
2875
+ actionDetails?: ActionDetails;
2707
2876
  }
2708
- interface UpdateSubscriptionPlatformOriginResponse {
2709
- /** The updated subscription with new platform origin */
2877
+ interface ScheduledResumeCanceled {
2710
2878
  subscription?: Subscription;
2879
+ actionDetails?: ActionDetails;
2711
2880
  }
2712
- interface SetIsMigratedEvent {
2713
- /** @format GUID */
2714
- subscriptionId?: string;
2881
+ interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
2882
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2883
+ paging?: Paging;
2884
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2885
+ cursor?: CursorPaging;
2886
+ /** A filter object */
2887
+ filter?: any;
2888
+ /** A Sorting option by field name and order. */
2889
+ sorting?: SortingClauses;
2715
2890
  }
2716
- interface SubscriptionDelayedSyncEvent {
2717
- /** @format GUID */
2718
- subscriptionId?: string;
2891
+ /** @oneof */
2892
+ interface SearchSubscriptionsRequestPagingMethodOneOf {
2893
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2894
+ paging?: Paging;
2895
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2896
+ cursor?: CursorPaging;
2719
2897
  }
2720
- interface InvoiceAction extends InvoiceActionActionTypeOneOf {
2721
- payRecurring?: PayRecurringInvoice;
2898
+ interface SortingClauses {
2899
+ sorting?: Sorting[];
2722
2900
  }
2723
- /** @oneof */
2724
- interface InvoiceActionActionTypeOneOf {
2725
- payRecurring?: PayRecurringInvoice;
2901
+ interface SearchSubscriptionsResponse {
2902
+ subscriptions?: Subscription[];
2903
+ cursor?: CursorPaging;
2904
+ pagingMetadata?: CursorPagingMetadata;
2726
2905
  }
2727
- interface PayRecurringInvoice {
2728
- /** @format GUID */
2729
- invoiceId?: string;
2906
+ interface CursorPagingMetadata {
2907
+ /** Total number of items matching the filter. Available only on the first page of *Search* */
2908
+ total?: number | null;
2730
2909
  }
2731
- /**
2732
- * Sent each time a subscription status has been set to Active
2733
- * Active shows that a subscription is live and operational.
2734
- * For example:
2735
- * * For subscription with free trial, free trial start date is also the activation date.
2736
- * * For a subscription with future start date, the start date is also the activation date.
2737
- * * When a subscription is resumed from a pause status, the resume date is also the activation date.
2738
- */
2739
- interface SubscriptionActivated {
2740
- subscription?: Subscription;
2910
+ interface TurnOnSubscriptionAutoRenewalRequest {
2911
+ /** @format GUID */
2912
+ _id: string;
2913
+ actionContext: ActionContext;
2741
2914
  }
2742
- /**
2743
- * Sent each time a subscription status has been set to Ended
2744
- * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
2745
- * This is different from a Canceled subscription which ends the subscription before a designated end date.
2746
- * Therefore, Ended and Canceled are mutually exclusive.
2747
- */
2748
- interface SubscriptionEnded {
2915
+ interface TurnOnSubscriptionAutoRenewalResponse {
2749
2916
  subscription?: Subscription;
2750
2917
  }
2751
- interface SubscriptionInitialPurchaseCompleted {
2918
+ interface SubscriptionAutoRenewalTurnedOn {
2752
2919
  subscription?: Subscription;
2753
2920
  actionDetails?: ActionDetails;
2921
+ }
2922
+ interface TurnOffSubscriptionAutoRenewalRequest {
2754
2923
  /** @format GUID */
2755
- paymentTransactionId?: string | null;
2924
+ _id: string;
2925
+ actionContext: ActionContext;
2756
2926
  }
2757
- interface SubscriptionCycleReadyToPay {
2927
+ interface TurnOffSubscriptionAutoRenewalResponse {
2758
2928
  subscription?: Subscription;
2759
2929
  }
2760
- interface SubscriptionRevived {
2930
+ interface SubscriptionAutoRenewalTurnedOff {
2761
2931
  subscription?: Subscription;
2932
+ actionDetails?: ActionDetails;
2762
2933
  }
2763
- interface CreateSubscriptionResponse {
2764
- subscription?: Subscription;
2934
+ interface MarkLatestInvoiceAsPaidRequest {
2765
2935
  /**
2766
- * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
2936
+ * The ID of the offline subscription to mark as paid its latest invoice
2767
2937
  * @format GUID
2768
2938
  */
2769
- paymentOrderId?: string | null;
2939
+ subscriptionId: string;
2770
2940
  }
2771
- interface UpdateSubscriptionRequest {
2772
- /** Revision is validated if Subscription.revision is set */
2941
+ interface MarkLatestInvoiceAsPaidResponse {
2773
2942
  subscription?: Subscription;
2774
- /**
2775
- * Supported field: start_date
2776
- * Can be updated only if Subscription is in Draft state
2777
- */
2778
- fieldMask?: string[];
2779
2943
  }
2780
- interface UpdateSubscriptionResponse {
2944
+ interface LatestInvoiceMarkedAsPaid {
2781
2945
  subscription?: Subscription;
2782
2946
  }
2783
- interface UpdateSubscriptionStartDateRequest {
2947
+ interface MultipleSubscriptionsOnOrdersInvoice {
2784
2948
  /**
2785
- * Subscription ID
2949
+ * the invoice id of the affected subscription
2786
2950
  * @format GUID
2787
2951
  */
2788
- _id?: string;
2952
+ invoiceId?: string;
2789
2953
  /**
2790
- * Can be updated only if Subscription is in Draft state
2791
- * By setting start_date in the future, end_date will be recalculated for termed Subscriptions
2792
- * cycles_to_pay_on_creation will be set to 1 if no free trial is set
2954
+ * the order id of the affected subscription
2955
+ * @format GUID
2793
2956
  */
2794
- startDate?: Date | null;
2795
- }
2796
- interface UpdateSubscriptionStartDateResponse {
2797
- subscription?: Subscription;
2957
+ orderId?: string;
2798
2958
  }
2799
- interface BassToSapiPaypalMigrationRequest {
2959
+ interface MarkBillingCycleAsPaidRequest {
2800
2960
  /**
2801
- * Subscription ID
2961
+ * The ID of the subscription to mark as paid its invoice.
2802
2962
  * @format GUID
2803
2963
  */
2804
- _id?: string;
2805
- collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
2964
+ subscriptionId: string;
2965
+ /**
2966
+ * The subscription cycle for which the invoice is to be marked as paid.
2967
+ * If left empty, the most recent cycle will be selected.
2968
+ * @min 1
2969
+ */
2970
+ paidCycle?: number | null;
2806
2971
  }
2807
- interface BassToSapiPaypalMigrationResponse {
2972
+ interface MarkBillingCycleAsPaidResponse {
2808
2973
  subscription?: Subscription;
2809
2974
  }
2810
- interface UpdateSubscriptionPoliciesRequest {
2811
- /**
2812
- * Subscription ID
2813
- * @format GUID
2814
- */
2815
- _id?: string;
2816
- cancellableByCustomer?: boolean | null;
2975
+ interface GetSubscriptionsStatsRequest {
2817
2976
  }
2818
- interface UpdateSubscriptionPoliciesResponse {
2819
- /** Updated policies of the subscription */
2820
- policies?: SubscriptionPolicies;
2977
+ interface GetSubscriptionsStatsResponse {
2978
+ amountByStatuses?: AmountByStatus[];
2979
+ total?: number;
2821
2980
  }
2822
- interface UpdateSubscriptionBillingDateRequest {
2981
+ interface AmountByStatus {
2982
+ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
2983
+ amount?: number;
2984
+ }
2985
+ interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
2986
+ /** User won't be charged for additional period added on top of subscription end date. */
2987
+ extensionPeriod?: Duration;
2823
2988
  /**
2824
- * ID of the subscription to update the billing date for.
2989
+ * user will be charged for billing cycles added
2990
+ * @min 1
2991
+ */
2992
+ extensionBillingCycles?: number;
2993
+ /**
2994
+ * The ID of the subscription to be extended
2825
2995
  * @format GUID
2826
2996
  */
2827
2997
  _id: string;
2828
- /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
2829
- billingDate: Date | null;
2998
+ actionContext: ActionContext;
2999
+ }
3000
+ /** @oneof */
3001
+ interface ExtendSubscriptionRequestExtendPolicyOneOf {
3002
+ /** User won't be charged for additional period added on top of subscription end date. */
3003
+ extensionPeriod?: Duration;
2830
3004
  /**
2831
- * Information about how BASS adjusts the total of the next invoice. Extending
2832
- * the current billing cycle results in a higher payment, while shortening it
2833
- * leads to a lower payment. BASS offers automatic calculation of the proration
2834
- * amount based on the number of days added to or removed from the current billing
2835
- * cycle. Alternatively, you can use your own custom method to calculate the
2836
- * proration amount. The custom proration amount can't exceed the total of the
2837
- * current billing cycle.
3005
+ * user will be charged for billing cycles added
3006
+ * @min 1
2838
3007
  */
2839
- proration?: Proration;
3008
+ extensionBillingCycles?: number;
2840
3009
  }
2841
- interface UpdateSubscriptionBillingDateResponse {
2842
- /** Updated subscription. */
3010
+ interface ExtendSubscriptionResponse {
3011
+ /** The now extended subscription */
2843
3012
  subscription?: Subscription;
2844
3013
  }
2845
- interface SubscriptionBillingDateUpdated {
2846
- subscription?: Subscription;
2847
- billingDate?: Date | null;
2848
- proration?: Proration;
3014
+ interface AllowedActionsRequest {
3015
+ /** @format GUID */
3016
+ _id: string;
3017
+ /**
3018
+ * List of additional fields to be included in the response.
3019
+ * @maxSize 1
3020
+ */
3021
+ fields?: RequestedFieldsWithLiterals[];
2849
3022
  }
2850
- interface UpdateSubscriptionOriginRequest {
3023
+ declare enum RequestedFields {
3024
+ /** Include unsupported action list, including the reasons for the lack of support */
3025
+ UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
3026
+ }
3027
+ /** @enumType */
3028
+ type RequestedFieldsWithLiterals = RequestedFields | 'UNSUPPORTED_ACTION';
3029
+ interface AllowedActionsResponse {
3030
+ /** List of actions that are allowed. */
3031
+ actions?: Action[];
2851
3032
  /**
2852
- * ID of the subscription to update origin.
2853
- * @format GUID
3033
+ * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
3034
+ * @maxSize 20
2854
3035
  */
2855
- _id?: string;
3036
+ unsupportedActions?: UnsupportedAction[];
3037
+ }
3038
+ interface UnsupportedAction {
3039
+ actionType?: ActionTypeWithLiterals;
2856
3040
  /**
2857
- * Origin entity ID of the subscription to update.
2858
- * @format GUID
3041
+ * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
3042
+ * @maxSize 20
2859
3043
  */
2860
- entityId?: string;
3044
+ reasons?: UnsupportedReason[];
2861
3045
  }
2862
- interface UpdateSubscriptionOriginResponse {
2863
- /** Updated subscription. */
2864
- subscription?: Subscription;
3046
+ interface UnsupportedReason {
3047
+ code?: string;
3048
+ description?: string | null;
2865
3049
  }
2866
- interface ReviseSubscriptionRequest {
3050
+ interface ListUpcomingChargesRequest {
2867
3051
  /**
2868
- * Subscription ID
3052
+ * Subscription id charges to be previewed for
2869
3053
  * @format GUID
2870
3054
  */
2871
- _id: string;
3055
+ subscriptionId: string;
3056
+ /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
3057
+ customDuration?: Duration;
2872
3058
  /**
2873
- * 0 for no revision, maxSize is 100
2874
- * @maxSize 100
3059
+ * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
3060
+ * If not provided, the upcoming charges will be calculated according to the existing next billing date.
2875
3061
  */
3062
+ nextBillingDate?: Date | null;
3063
+ }
3064
+ interface ListUpcomingChargesResponse {
3065
+ upcomingCharges?: SubscriptionCharge[];
3066
+ }
3067
+ interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
3068
+ /** Information about a non-existing subscription. */
3069
+ subscriptionInfo?: SubscriptionInfo;
3070
+ }
3071
+ /** @oneof */
3072
+ interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
3073
+ /** Information about a non-existing subscription. */
3074
+ subscriptionInfo?: SubscriptionInfo;
3075
+ }
3076
+ /** Subscription information to use for calculating the preview of charges for a subscription. */
3077
+ interface SubscriptionInfo {
3078
+ billingSettings?: BillingSettings;
2876
3079
  items?: Item[];
3080
+ startDate?: Date | null;
3081
+ /**
3082
+ * Customer the subscription belongs to. When provided, used for accurate tax calculation.
3083
+ * Optional for backward compatibility; if omitted, a synthetic id is used (legacy behavior)
3084
+ * and customer-specific tax rules (VAT exemptions, tax IDs) will not apply.
3085
+ */
3086
+ customer?: Customer;
2877
3087
  }
2878
- interface ReviseSubscriptionResponse {
2879
- subscription?: Subscription;
3088
+ interface PreviewSubscriptionChargesResponse {
3089
+ /** Charges for subscription. */
3090
+ charges?: Charge[];
2880
3091
  }
2881
- interface UpdateSubscriptionItemsRequest {
3092
+ /** Represents a charge applicable to a subscription. */
3093
+ interface Charge {
3094
+ /** The cycle number from which the charge starts. */
3095
+ cycleFrom?: number;
3096
+ /** The number of cycles for which the charge is applicable. */
3097
+ cycleCount?: number | null;
3098
+ /** The breakdown of the charge */
3099
+ totals?: Totals;
3100
+ /** The billing date from which the charge starts */
3101
+ cycleBillingDate?: Date | null;
3102
+ }
3103
+ interface PreviewSubscriptionsChargesRequest {
2882
3104
  /**
2883
- * Subscription ID
3105
+ * Information required to calculate the preview charges for the subscriptions, including an identifier.
3106
+ * @minSize 1
3107
+ * @maxSize 10
3108
+ */
3109
+ subscriptionsBillingDetails?: SubscriptionBillingDetails[];
3110
+ /**
3111
+ * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
3112
+ * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
3113
+ * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
3114
+ * - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
3115
+ * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
3116
+ * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
3117
+ * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
3118
+ * in this case, charges for cycle 1 through 3.
3119
+ * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
3120
+ * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
3121
+ * @min 1
3122
+ * @max 10
3123
+ */
3124
+ numberOfNextRecurringCharges?: number | null;
3125
+ }
3126
+ interface SubscriptionBillingDetails {
3127
+ /**
3128
+ * External identifier of the subscription
2884
3129
  * @format GUID
2885
3130
  */
2886
- _id?: string;
2887
- /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
2888
- updateAction?: UpdateActionWithLiterals;
2889
- /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
2890
- scheduleAdditionalInfo?: ScheduleAdditionalInfo;
3131
+ externalId?: string | null;
3132
+ /** Billing details parameters including schedule, currency, etc. */
3133
+ billingSettings?: BillingSettings;
2891
3134
  /**
2892
- * Existing items to update
3135
+ * Items, minSize is 1, maxSize is 100
3136
+ * @minSize 1
2893
3137
  * @maxSize 100
2894
3138
  */
2895
- itemsToUpdate?: ItemChange[];
3139
+ items?: Item[];
3140
+ /** Subscription start date, now if not set */
3141
+ startDate?: Date | null;
3142
+ /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
3143
+ shippingAddress?: FullAddressDetails;
2896
3144
  /**
2897
- * Items to add
2898
- * @maxSize 99
3145
+ * Customer the subscription belongs to. When provided, used for accurate tax calculation.
3146
+ * Optional for backward compatibility; if omitted, a synthetic id is used (legacy behavior).
2899
3147
  */
2900
- itemsToAdd?: Item[];
3148
+ customer?: Customer;
3149
+ }
3150
+ interface PreviewSubscriptionsChargesResponse {
3151
+ /** Charges for the subscriptions, including an identifier. */
3152
+ subscriptionsCharges?: SubscriptionCharges[];
3153
+ }
3154
+ interface SubscriptionCharges {
2901
3155
  /**
2902
- * Existing items to delete
3156
+ * External identifier of the subscription
2903
3157
  * @format GUID
2904
- * @maxSize 99
2905
3158
  */
2906
- itemsToDelete?: string[] | null;
2907
- }
2908
- declare enum UpdateAction {
2909
- NONE = "NONE",
2910
- /** Update subscription immediately, please note proration for updates changing price are not yet supported */
2911
- IMMEDIATELY = "IMMEDIATELY",
2912
- /** Request updates that will take affect only at the start of the next billing cycle. */
2913
- NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
2914
- /** Reset all pending updates */
2915
- RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
2916
- /** Request updates that will take affect only at a specific date. */
2917
- SPECIFIC_DATE = "SPECIFIC_DATE"
3159
+ externalId?: string | null;
3160
+ /** Charges for subscription. */
3161
+ charges?: Charge[];
2918
3162
  }
2919
- /** @enumType */
2920
- type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
2921
- interface UpdateSubscriptionItemsResponse {
3163
+ interface CreateSubscriptionForOrderRequest {
3164
+ /** Subscription needs to be created */
2922
3165
  subscription?: Subscription;
2923
- }
2924
- interface BulkUpdateSubscriptionItemsByFilterRequest {
2925
3166
  /**
2926
- * Filter to identify the subscriptions for which items are updated. For
2927
- * supported fields see
2928
- * [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).
2929
- * Sending an empty subscription filter results in a validation error.
2930
- * In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
2931
- * `subscriptionId` field inside this filter. Passing any other filter results
2932
- * in a failed validation error.
3167
+ * Optional unique identifier for this request in order to prevent subscription duplications
3168
+ * @format GUID
2933
3169
  */
2934
- subscriptionFilter?: Record<string, any> | null;
3170
+ idempotencyKey?: string | null;
3171
+ }
3172
+ interface CreateSubscriptionForOrderResponse {
3173
+ /** Created subscription */
3174
+ subscription?: Subscription;
3175
+ /** Non-persistent invoice */
3176
+ invoice?: Invoice;
3177
+ }
3178
+ /** An invoice includes information about the subscription and the customer. */
3179
+ interface Invoice {
2935
3180
  /**
2936
- * Filter to specify which subscription items are updated. Make sure to use
2937
- * the catalog item ID and not the item's unique ID. All subscription items
2938
- * with matching `items.catalogReference.catalogItemId` are updated.
2939
- *
2940
- * Max: `100` reference catalog item IDs
3181
+ * Invoice ID.
2941
3182
  * @format GUID
2942
- * @maxSize 100
3183
+ * @readonly
2943
3184
  */
2944
- catalogReferenceIds?: string[] | null;
3185
+ _id?: string | null;
2945
3186
  /**
2946
- * Information about the update timing and update type.
2947
- *
2948
- * + `"IMMEDIATELY"`: The updates become effective immediately.
2949
- * + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
2950
- * + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
2951
- * + `"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.
3187
+ * Date and time the invoice was created.
3188
+ * @readonly
2952
3189
  */
2953
- updateAction?: UpdateActionWithLiterals;
3190
+ _createdDate?: Date | null;
2954
3191
  /**
2955
- * Additional information for updates. Currently, only supported for
2956
- * `{"updateAction": "SPECIFIC_DATE"}`.
3192
+ * Date and time the invoice was last updated.
3193
+ * @readonly
2957
3194
  */
2958
- scheduleAdditionalInfo?: ScheduleAdditionalInfo;
3195
+ _updatedDate?: Date | null;
2959
3196
  /**
2960
- * Update details for the susbcription items that match the filtering.
2961
- * Currently, you can update only the item price, quantity, and tax. Note
2962
- * that all item properties are updated to the same values. In case you want set
2963
- * different values for individual items, you must call
2964
- * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
3197
+ * Revision number, which increments by 1 each time the invoice is updated.
3198
+ * To prevent conflicting changes,
3199
+ * the current revision must be passed when updating the invoice.
3200
+ *
3201
+ * Ignored when creating a invoice.
3202
+ * @readonly
2965
3203
  */
2966
- bulkItemUpdateData?: BulkItemChange;
3204
+ revision?: string | null;
2967
3205
  /**
2968
- * __Not implemented yet__. Items to add to the subscriptions matching the filtering.
2969
- * @maxSize 99
3206
+ * Source of the invoice.
3207
+ * @internal
2970
3208
  */
2971
- itemsToAdd?: Item[];
2972
- }
2973
- interface BulkItemChange {
2974
- /** Information about the new item price. */
2975
- pricingModel?: PricingModel;
3209
+ source?: string | null;
3210
+ /** Information about the invoice origin. */
3211
+ origin?: BusinessOriginData;
2976
3212
  /**
2977
- * New item quantity.
3213
+ * Invoice status.
2978
3214
  *
2979
- * Min: `1`
2980
- * @min 1
3215
+ * + `"UNKNOWN"`: There is no information about the invoice status.
3216
+ * + `"OPEN"`: BASS has created the invoice but hasn't initiated the payment process.
3217
+ * + `"PAID"`: The customer has successfully paid for the invoice.
3218
+ * + `"ATTEMPT_FAILED"`: The payment process has started and there has been at least one unsuccessful payment attempt.
3219
+ * + `"FAILED"`: The payment process has failed and there are no more retries.
3220
+ * + `"CANCELED"`: The payment process has been stopped because the related subscription has been canceled.
3221
+ * @readonly
2981
3222
  */
2982
- quantity?: number | null;
2983
- /** Information about the new item tax. */
2984
- tax?: Tax;
2985
- }
2986
- interface BulkUpdateSubscriptionItemsByFilterResponse {
3223
+ status?: InvoiceStatusWithLiterals;
2987
3224
  /**
2988
- * ID of your bulk job. You can use
2989
- * [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)
2990
- * to retrieve information about the job status.
3225
+ * 3-letter currency code of the invoice in
3226
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
3227
+ * @format CURRENCY
2991
3228
  */
2992
- jobId?: string;
2993
- }
2994
- interface DeleteSubscriptionRequest {
2995
- /** @format GUID */
2996
- _id?: string;
2997
- revision?: string;
2998
- }
2999
- interface DeleteSubscriptionResponse {
3000
- }
3001
- interface CancelSubscriptionRequest {
3002
- /** @format GUID */
3003
- _id: string;
3004
- actionContext: ActionContext;
3005
- }
3006
- interface ActionContext {
3007
- initiator?: ActionInitiatorWithLiterals;
3008
- /** Optional action reason message */
3009
- reason?: string | null;
3010
- }
3011
- interface CancelSubscriptionResponse {
3012
- subscription?: Subscription;
3013
- }
3014
- interface PauseSubscriptionRequest {
3015
- /** @format GUID */
3016
- _id: string;
3017
- pausePolicy?: PausePolicyWithLiterals;
3018
- pauseAt?: PauseAtWithLiterals;
3019
- /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
3020
- pauseAtSchedule?: ScheduleAdditionalInfo;
3021
- /** contains additional scheduling information for certain auto_resume_at either specific date */
3022
- autoResumeAtSchedule?: ScheduleAdditionalInfo;
3023
- actionContext: ActionContext;
3024
- }
3025
- interface PauseSubscriptionResponse {
3026
- subscription?: Subscription;
3027
- }
3028
- interface SubscriptionPaused {
3029
- subscription?: Subscription;
3030
- pausePolicy?: PausePolicyWithLiterals;
3031
- actionDetails?: ActionDetails;
3032
- }
3033
- interface PauseSubscriptionRequested {
3034
- subscription?: Subscription;
3035
- pauseAt?: PauseAtWithLiterals;
3036
- pausePolicy?: PausePolicyWithLiterals;
3037
- actionDetails?: ActionDetails;
3038
- }
3039
- interface ScheduledPauseCanceled {
3040
- subscription?: Subscription;
3041
- actionDetails?: ActionDetails;
3042
- }
3043
- interface ResumeSubscriptionRequest {
3044
- /** @format GUID */
3045
- _id: string;
3046
- resumeAt?: ResumeAtWithLiterals;
3047
- /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
3048
- resumeAtSchedule?: ScheduleAdditionalInfo;
3049
- actionContext: ActionContext;
3050
- }
3051
- interface ResumeSubscriptionResponse {
3052
- subscription?: Subscription;
3053
- }
3054
- interface SubscriptionResumed {
3055
- subscription?: Subscription;
3056
- actionDetails?: ActionDetails;
3057
- pauseInfo?: PauseInfo;
3058
- }
3059
- interface ResumeSubscriptionRequested {
3060
- subscription?: Subscription;
3061
- resumeAt?: ResumeAtWithLiterals;
3062
- actionDetails?: ActionDetails;
3063
- }
3064
- interface ScheduledResumeCanceled {
3065
- subscription?: Subscription;
3066
- actionDetails?: ActionDetails;
3067
- }
3068
- interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
3069
- /** Limit number of results and enable to skip rows. The default limit is 25. */
3070
- paging?: Paging;
3071
- /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
3072
- cursor?: CursorPaging;
3073
- /** A filter object */
3074
- filter?: any;
3075
- /** A Sorting option by field name and order. */
3076
- sorting?: SortingClauses;
3077
- }
3078
- /** @oneof */
3079
- interface SearchSubscriptionsRequestPagingMethodOneOf {
3080
- /** Limit number of results and enable to skip rows. The default limit is 25. */
3081
- paging?: Paging;
3082
- /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
3083
- cursor?: CursorPaging;
3084
- }
3085
- interface SortingClauses {
3086
- sorting?: Sorting[];
3087
- }
3088
- interface SearchSubscriptionsResponse {
3089
- subscriptions?: Subscription[];
3090
- cursor?: CursorPaging;
3091
- pagingMetadata?: CursorPagingMetadata;
3092
- }
3093
- interface CursorPagingMetadata {
3094
- /** Total number of items matching the filter. Available only on the first page of *Search* */
3095
- total?: number | null;
3096
- }
3097
- interface TurnOnSubscriptionAutoRenewalRequest {
3098
- /** @format GUID */
3099
- _id: string;
3100
- actionContext: ActionContext;
3101
- }
3102
- interface TurnOnSubscriptionAutoRenewalResponse {
3103
- subscription?: Subscription;
3104
- }
3105
- interface SubscriptionAutoRenewalTurnedOn {
3106
- subscription?: Subscription;
3107
- actionDetails?: ActionDetails;
3108
- }
3109
- interface TurnOffSubscriptionAutoRenewalRequest {
3110
- /** @format GUID */
3111
- _id: string;
3112
- actionContext: ActionContext;
3113
- }
3114
- interface TurnOffSubscriptionAutoRenewalResponse {
3115
- subscription?: Subscription;
3116
- }
3117
- interface SubscriptionAutoRenewalTurnedOff {
3118
- subscription?: Subscription;
3119
- actionDetails?: ActionDetails;
3120
- }
3121
- interface MarkLatestInvoiceAsPaidRequest {
3229
+ currency?: string;
3230
+ /** Information about the customer. */
3231
+ customer?: Customer;
3122
3232
  /**
3123
- * The ID of the offline subscription to mark as paid its latest invoice
3124
- * @format GUID
3233
+ * Whether the payment is processed through Wix and whether the customer must provide some input.
3234
+ *
3235
+ * + `"UNKNOWN"`: There is no information about the collection method.
3236
+ * + `"AUTO_CHARGE"`: The customer pays automatically through Wix.
3237
+ * + `"SEND_INVOICE"`: The customer pays through Wix, but some manual input is required.
3238
+ * + `"OFFLINE"`: The customer pays outside of Wix.
3125
3239
  */
3126
- subscriptionId: string;
3127
- }
3128
- interface MarkLatestInvoiceAsPaidResponse {
3129
- subscription?: Subscription;
3130
- }
3131
- interface LatestInvoiceMarkedAsPaid {
3132
- subscription?: Subscription;
3133
- }
3134
- interface MultipleSubscriptionsOnOrdersInvoice {
3240
+ collectionMethod?: CollectionMethodWithLiterals;
3135
3241
  /**
3136
- * the invoice id of the affected subscription
3242
+ * ID of the
3243
+ * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
3244
+ * Not available for the first payment of a subscription and all offline
3245
+ * payments.
3137
3246
  * @format GUID
3138
3247
  */
3139
- invoiceId?: string;
3248
+ paymentMethodId?: string | null;
3140
3249
  /**
3141
- * the order id of the affected subscription
3250
+ * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
3251
+ * for the corresponding payment.
3142
3252
  * @format GUID
3253
+ * @readonly
3143
3254
  */
3144
- orderId?: string;
3145
- }
3146
- interface MarkBillingCycleAsPaidRequest {
3255
+ paymentOrderId?: string | null;
3256
+ /** Information about a discount. Available only for invoices that include a discount. */
3257
+ discount?: InvoiceDiscount;
3258
+ /** Billing address. */
3259
+ billingAddress?: FullAddressDetails;
3260
+ /** Shipping address. Available only for `"PHYSICAL"` line items. */
3261
+ shippingAddress?: FullAddressDetails;
3147
3262
  /**
3148
- * The ID of the subscription to mark as paid its invoice.
3149
- * @format GUID
3263
+ * Shipping fee in `0.00` format.
3264
+ * @format DECIMAL_VALUE
3150
3265
  */
3151
- subscriptionId: string;
3266
+ shippingFee?: string | null;
3152
3267
  /**
3153
- * The subscription cycle for which the invoice is to be marked as paid.
3154
- * If left empty, the most recent cycle will be selected.
3155
- * @min 1
3268
+ * Information about the invoice's totals.
3269
+ * @readonly
3156
3270
  */
3157
- paidCycle?: number | null;
3158
- }
3159
- interface MarkBillingCycleAsPaidResponse {
3160
- subscription?: Subscription;
3161
- }
3162
- interface GetSubscriptionsStatsRequest {
3163
- }
3164
- interface GetSubscriptionsStatsResponse {
3165
- amountByStatuses?: AmountByStatus[];
3166
- total?: number;
3167
- }
3168
- interface AmountByStatus {
3169
- status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
3170
- amount?: number;
3171
- }
3172
- interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
3173
- /** User won't be charged for additional period added on top of subscription end date. */
3174
- extensionPeriod?: Duration;
3271
+ totals?: Totals;
3272
+ /** Line items belonging to the invoice. */
3273
+ invoiceItems?: InvoiceItem[];
3175
3274
  /**
3176
- * user will be charged for billing cycles added
3177
- * @min 1
3275
+ * Whether the invoice is used to validate payment details.
3276
+ *
3277
+ * + `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.
3278
+ * + `false`: Standard invoice.
3178
3279
  */
3179
- extensionBillingCycles?: number;
3180
- /**
3181
- * The ID of the subscription to be extended
3182
- * @format GUID
3183
- */
3184
- _id: string;
3185
- actionContext: ActionContext;
3186
- }
3187
- /** @oneof */
3188
- interface ExtendSubscriptionRequestExtendPolicyOneOf {
3189
- /** User won't be charged for additional period added on top of subscription end date. */
3190
- extensionPeriod?: Duration;
3191
- /**
3192
- * user will be charged for billing cycles added
3193
- * @min 1
3194
- */
3195
- extensionBillingCycles?: number;
3196
- }
3197
- interface ExtendSubscriptionResponse {
3198
- /** The now extended subscription */
3199
- subscription?: Subscription;
3200
- }
3201
- interface AllowedActionsRequest {
3202
- /** @format GUID */
3203
- _id: string;
3280
+ isAuthorization?: boolean | null;
3281
+ /** Whether the invoice's `totals.totalPrice` includes tax. */
3282
+ isTaxInclusive?: boolean | null;
3204
3283
  /**
3205
- * List of additional fields to be included in the response.
3206
- * @maxSize 1
3284
+ * Information about the invoice creation process.
3285
+ *
3286
+ * + `"UNKNOWN"`: There is no information about how BASS created the invoice.
3287
+ * + `"SYSTEM"`: BASS automatically created the invoice.
3288
+ * + `"MANUAL"`: A BASS system admin manually created the invoice.
3289
+ * @internal
3207
3290
  */
3208
- fields?: RequestedFieldsWithLiterals[];
3209
- }
3210
- declare enum RequestedFields {
3211
- /** Include unsupported action list, including the reasons for the lack of support */
3212
- UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
3213
- }
3214
- /** @enumType */
3215
- type RequestedFieldsWithLiterals = RequestedFields | 'UNSUPPORTED_ACTION';
3216
- interface AllowedActionsResponse {
3217
- /** List of actions that are allowed. */
3218
- actions?: Action[];
3291
+ creationMode?: CreationModeWithLiterals;
3292
+ /** Details of the latest payment attempt. */
3293
+ latestPaymentAttempt?: LatestPaymentAttempt;
3294
+ /** List of charges and credits that adjust the invoice's `totals.totalPrice`. */
3295
+ adjustments?: PriceAdjustment[];
3219
3296
  /**
3220
- * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
3221
- * @maxSize 20
3297
+ * Invoice Number.
3298
+ * @maxLength 10
3299
+ * @readonly
3222
3300
  */
3223
- unsupportedActions?: UnsupportedAction[];
3224
- }
3225
- interface UnsupportedAction {
3226
- actionType?: ActionTypeWithLiterals;
3301
+ invoiceNumber?: string | null;
3227
3302
  /**
3228
- * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
3229
- * @maxSize 20
3303
+ * Shipping charges for the invoice.
3304
+ * Supports only one discount without cycles.
3305
+ * Discounts with cycles (repeated discounts across different billing cycles) are not supported for shipping
3230
3306
  */
3231
- reasons?: UnsupportedReason[];
3232
- }
3233
- interface UnsupportedReason {
3234
- code?: string;
3235
- description?: string | null;
3236
- }
3237
- interface ListUpcomingChargesRequest {
3307
+ shippingCharges?: InvoiceShippingCharges;
3308
+ /** Information about the invoice tax */
3309
+ taxData?: TaxData;
3310
+ /** Business address. */
3311
+ businessAddress?: Address;
3238
3312
  /**
3239
- * Subscription id charges to be previewed for
3313
+ * ID of the billing order that created this invoice.
3240
3314
  * @format GUID
3241
3315
  */
3242
- subscriptionId: string;
3243
- /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
3244
- customDuration?: Duration;
3245
- /**
3246
- * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
3247
- * If not provided, the upcoming charges will be calculated according to the existing next billing date.
3248
- */
3249
- nextBillingDate?: Date | null;
3250
- }
3251
- interface ListUpcomingChargesResponse {
3252
- upcomingCharges?: SubscriptionCharge[];
3253
- }
3254
- interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
3255
- /** Information about a non-existing subscription. */
3256
- subscriptionInfo?: SubscriptionInfo;
3257
- }
3258
- /** @oneof */
3259
- interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
3260
- /** Information about a non-existing subscription. */
3261
- subscriptionInfo?: SubscriptionInfo;
3262
- }
3263
- /** Subscription information to use for calculating the preview of charges for a subscription. */
3264
- interface SubscriptionInfo {
3265
- billingSettings?: BillingSettings;
3266
- items?: Item[];
3267
- startDate?: Date | null;
3268
- }
3269
- interface PreviewSubscriptionChargesResponse {
3270
- /** Charges for subscription. */
3271
- charges?: Charge[];
3272
- }
3273
- /** Represents a charge applicable to a subscription. */
3274
- interface Charge {
3275
- /** The cycle number from which the charge starts. */
3276
- cycleFrom?: number;
3277
- /** The number of cycles for which the charge is applicable. */
3278
- cycleCount?: number | null;
3279
- /** The breakdown of the charge */
3280
- totals?: Totals;
3281
- /** The billing date from which the charge starts */
3282
- cycleBillingDate?: Date | null;
3283
- }
3284
- interface PreviewSubscriptionsChargesRequest {
3316
+ orderId?: string | null;
3285
3317
  /**
3286
- * Information required to calculate the preview charges for the subscriptions, including an identifier.
3287
- * @minSize 1
3288
- * @maxSize 10
3318
+ * Platform origin the invoice is originated from.
3319
+ * @format GUID
3289
3320
  */
3290
- subscriptionsBillingDetails?: SubscriptionBillingDetails[];
3321
+ platformOriginAppId?: string | null;
3291
3322
  /**
3292
- * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
3293
- * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
3294
- * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
3295
- * - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
3296
- * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
3297
- * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
3298
- * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
3299
- * in this case, charges for cycle 1 through 3.
3300
- * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
3301
- * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
3302
- * @min 1
3303
- * @max 10
3323
+ * Refund information, provided that there are refunds for this invoice.
3324
+ * @readonly
3304
3325
  */
3305
- numberOfNextRecurringCharges?: number | null;
3326
+ refundInfo?: RefundInfo;
3306
3327
  }
3307
- interface SubscriptionBillingDetails {
3328
+ interface BusinessOriginData {
3308
3329
  /**
3309
- * External identifier of the subscription
3330
+ * ID of the app for which BASS has created the invoice. For example,
3331
+ * `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
3310
3332
  * @format GUID
3311
3333
  */
3312
- externalId?: string | null;
3313
- /** Billing details parameters including schedule, currency, etc. */
3314
- billingSettings?: BillingSettings;
3315
- /**
3316
- * Items, minSize is 1, maxSize is 100
3317
- * @minSize 1
3318
- * @maxSize 100
3319
- */
3320
- items?: Item[];
3321
- /** Subscription start date, now if not set */
3322
- startDate?: Date | null;
3323
- /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
3324
- shippingAddress?: FullAddressDetails;
3325
- }
3326
- interface PreviewSubscriptionsChargesResponse {
3327
- /** Charges for the subscriptions, including an identifier. */
3328
- subscriptionsCharges?: SubscriptionCharges[];
3329
- }
3330
- interface SubscriptionCharges {
3334
+ appId?: string;
3331
3335
  /**
3332
- * External identifier of the subscription
3336
+ * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)
3337
+ * of the app for which BASS has created the invoice.
3333
3338
  * @format GUID
3334
3339
  */
3335
- externalId?: string | null;
3336
- /** Charges for subscription. */
3337
- charges?: Charge[];
3338
- }
3339
- interface CreateSubscriptionForOrderRequest {
3340
- /** Subscription needs to be created */
3341
- subscription?: Subscription;
3340
+ instanceId?: string;
3342
3341
  /**
3343
- * Optional unique identifier for this request in order to prevent subscription duplications
3342
+ * ID of the entity that triggered the invoice creation. For example, the ID of a
3343
+ * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).
3344
3344
  * @format GUID
3345
3345
  */
3346
- idempotencyKey?: string | null;
3346
+ entityId?: string;
3347
3347
  }
3348
- interface CreateSubscriptionForOrderResponse {
3349
- /** Created subscription */
3350
- subscription?: Subscription;
3351
- /** Non-persistent invoice */
3352
- invoice?: Invoice;
3348
+ declare enum InvoiceStatus {
3349
+ UNKNOWN = "UNKNOWN",
3350
+ OPEN = "OPEN",
3351
+ PAID = "PAID",
3352
+ FAILED = "FAILED",
3353
+ ATTEMPT_FAILED = "ATTEMPT_FAILED",
3354
+ CANCELED = "CANCELED",
3355
+ REFUNDED = "REFUNDED",
3356
+ CHARGEBACKED = "CHARGEBACKED"
3353
3357
  }
3354
- /** An invoice includes information about the subscription and the customer. */
3355
- interface Invoice {
3358
+ /** @enumType */
3359
+ type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN' | 'OPEN' | 'PAID' | 'FAILED' | 'ATTEMPT_FAILED' | 'CANCELED' | 'REFUNDED' | 'CHARGEBACKED';
3360
+ declare enum CollectionMethod {
3361
+ UNKNOWN = "UNKNOWN",
3362
+ AUTO_CHARGE = "AUTO_CHARGE",
3363
+ OFFLINE = "OFFLINE",
3364
+ SEND_INVOICE = "SEND_INVOICE"
3365
+ }
3366
+ /** @enumType */
3367
+ type CollectionMethodWithLiterals = CollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE';
3368
+ declare enum CreationMode {
3369
+ UNKNOWN = "UNKNOWN",
3370
+ SYSTEM = "SYSTEM",
3371
+ MANUAL = "MANUAL"
3372
+ }
3373
+ /** @enumType */
3374
+ type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL';
3375
+ interface LatestPaymentAttempt {
3356
3376
  /**
3357
- * Invoice ID.
3377
+ * ID of the latest payment attempt.
3358
3378
  * @format GUID
3359
3379
  * @readonly
3360
3380
  */
3361
- _id?: string | null;
3381
+ paymentAttemptId?: string;
3362
3382
  /**
3363
- * Date and time the invoice was created.
3383
+ * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.
3364
3384
  * @readonly
3365
3385
  */
3366
- _createdDate?: Date | null;
3386
+ dateAttempt?: Date | null;
3387
+ /** Number of the latest payment attempt. */
3388
+ attemptNumber?: number;
3367
3389
  /**
3368
- * Date and time the invoice was last updated.
3390
+ * Status of the latest payment attempt.
3391
+ *
3392
+ * + `"UNKNOWN"`: There is no information about the status of the latest payment attempt.
3393
+ * + `"SCHEDULED"`: The latest payment attempt is scheduled but hasn't started yet.
3394
+ * + `"IN_PROGRESS"`: The latest payment attempt is in progress.
3395
+ * + `"PAID"`: The latest payment attempt resulted in a successful payment.
3396
+ * + `"DECLINED"`: The latest payment attempt has been declined.
3397
+ * + `"TECHNICAL_FAILURE"`: The latest payment attempt couldn't be process due to a technical failure.
3398
+ * + `"CANCELED"`: The latest payment attempt has been canceled by BASS.
3369
3399
  * @readonly
3370
3400
  */
3371
- _updatedDate?: Date | null;
3401
+ status?: PaymentAttemptStatusWithLiterals;
3372
3402
  /**
3373
- * Revision number, which increments by 1 each time the invoice is updated.
3374
- * To prevent conflicting changes,
3375
- * the current revision must be passed when updating the invoice.
3376
- *
3377
- * Ignored when creating a invoice.
3378
- * @readonly
3403
+ * Whether BASS tries to collect the payment another time. Available only when
3404
+ * `latestPaymentAttempt.status` is set to `"DECLINED"`.
3379
3405
  */
3380
- revision?: string | null;
3381
- /** Information about the invoice origin. */
3382
- origin?: BusinessOriginData;
3383
- /**
3384
- * Invoice status.
3385
- *
3386
- * + `"UNKNOWN"`: There is no information about the invoice status.
3387
- * + `"OPEN"`: BASS has created the invoice but hasn't initiated the payment process.
3388
- * + `"PAID"`: The customer has successfully paid for the invoice.
3389
- * + `"ATTEMPT_FAILED"`: The payment process has started and there has been at least one unsuccessful payment attempt.
3390
- * + `"FAILED"`: The payment process has failed and there are no more retries.
3391
- * + `"CANCELED"`: The payment process has been stopped because the related subscription has been canceled.
3392
- * @readonly
3393
- */
3394
- status?: InvoiceStatusWithLiterals;
3395
- /**
3396
- * 3-letter currency code of the invoice in
3397
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
3398
- * @format CURRENCY
3399
- */
3400
- currency?: string;
3401
- /** Information about the customer. */
3402
- customer?: Customer;
3403
- /**
3404
- * Whether the payment is processed through Wix and whether the customer must provide some input.
3405
- *
3406
- * + `"UNKNOWN"`: There is no information about the collection method.
3407
- * + `"AUTO_CHARGE"`: The customer pays automatically through Wix.
3408
- * + `"SEND_INVOICE"`: The customer pays through Wix, but some manual input is required.
3409
- * + `"OFFLINE"`: The customer pays outside of Wix.
3410
- */
3411
- collectionMethod?: CollectionMethodWithLiterals;
3412
- /**
3413
- * ID of the
3414
- * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
3415
- * Not available for the first payment of a subscription and all offline
3416
- * payments.
3417
- * @format GUID
3418
- */
3419
- paymentMethodId?: string | null;
3420
- /**
3421
- * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
3422
- * for the corresponding payment.
3423
- * @format GUID
3424
- * @readonly
3425
- */
3426
- paymentOrderId?: string | null;
3427
- /** Information about a discount. Available only for invoices that include a discount. */
3428
- discount?: InvoiceDiscount;
3429
- /** Billing address. */
3430
- billingAddress?: FullAddressDetails;
3431
- /** Shipping address. Available only for `"PHYSICAL"` line items. */
3432
- shippingAddress?: FullAddressDetails;
3433
- /**
3434
- * Shipping fee in `0.00` format.
3435
- * @format DECIMAL_VALUE
3436
- */
3437
- shippingFee?: string | null;
3438
- /**
3439
- * Information about the invoice's totals.
3440
- * @readonly
3441
- */
3442
- totals?: Totals;
3443
- /** Line items belonging to the invoice. */
3444
- invoiceItems?: InvoiceItem[];
3445
- /**
3446
- * Whether the invoice is used to validate payment details.
3447
- *
3448
- * + `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.
3449
- * + `false`: Standard invoice.
3450
- */
3451
- isAuthorization?: boolean | null;
3452
- /** Whether the invoice's `totals.totalPrice` includes tax. */
3453
- isTaxInclusive?: boolean | null;
3454
- /** Details of the latest payment attempt. */
3455
- latestPaymentAttempt?: LatestPaymentAttempt;
3456
- /** List of charges and credits that adjust the invoice's `totals.totalPrice`. */
3457
- adjustments?: PriceAdjustment[];
3458
- /**
3459
- * Invoice Number.
3460
- * @maxLength 10
3461
- * @readonly
3462
- */
3463
- invoiceNumber?: string | null;
3464
- /**
3465
- * Shipping charges for the invoice.
3466
- * Supports only one discount without cycles.
3467
- * Discounts with cycles (repeated discounts across different billing cycles) are not supported for shipping
3468
- */
3469
- shippingCharges?: InvoiceShippingCharges;
3470
- /** Information about the invoice tax */
3471
- taxData?: TaxData;
3472
- /** Business address. */
3473
- businessAddress?: Address;
3474
- /**
3475
- * ID of the billing order that created this invoice.
3476
- * @format GUID
3477
- */
3478
- orderId?: string | null;
3479
- /**
3480
- * Platform origin the invoice is originated from.
3481
- * @format GUID
3482
- */
3483
- platformOriginAppId?: string | null;
3484
- /**
3485
- * Refund information, provided that there are refunds for this invoice.
3486
- * @readonly
3487
- */
3488
- refundInfo?: RefundInfo;
3489
- }
3490
- interface BusinessOriginData {
3491
- /**
3492
- * ID of the app for which BASS has created the invoice. For example,
3493
- * `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
3494
- * @format GUID
3495
- */
3496
- appId?: string;
3497
- /**
3498
- * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)
3499
- * of the app for which BASS has created the invoice.
3500
- * @format GUID
3501
- */
3502
- instanceId?: string;
3503
- /**
3504
- * ID of the entity that triggered the invoice creation. For example, the ID of a
3505
- * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).
3506
- * @format GUID
3507
- */
3508
- entityId?: string;
3509
- }
3510
- declare enum InvoiceStatus {
3511
- UNKNOWN = "UNKNOWN",
3512
- OPEN = "OPEN",
3513
- PAID = "PAID",
3514
- FAILED = "FAILED",
3515
- ATTEMPT_FAILED = "ATTEMPT_FAILED",
3516
- CANCELED = "CANCELED",
3517
- REFUNDED = "REFUNDED",
3518
- CHARGEBACKED = "CHARGEBACKED"
3519
- }
3520
- /** @enumType */
3521
- type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN' | 'OPEN' | 'PAID' | 'FAILED' | 'ATTEMPT_FAILED' | 'CANCELED' | 'REFUNDED' | 'CHARGEBACKED';
3522
- declare enum CollectionMethod {
3523
- UNKNOWN = "UNKNOWN",
3524
- AUTO_CHARGE = "AUTO_CHARGE",
3525
- OFFLINE = "OFFLINE",
3526
- SEND_INVOICE = "SEND_INVOICE"
3527
- }
3528
- /** @enumType */
3529
- type CollectionMethodWithLiterals = CollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE';
3530
- declare enum CreationMode {
3531
- UNKNOWN = "UNKNOWN",
3532
- SYSTEM = "SYSTEM",
3533
- MANUAL = "MANUAL"
3534
- }
3535
- /** @enumType */
3536
- type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL';
3537
- interface LatestPaymentAttempt {
3538
- /**
3539
- * ID of the latest payment attempt.
3540
- * @format GUID
3541
- * @readonly
3542
- */
3543
- paymentAttemptId?: string;
3544
- /**
3545
- * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.
3546
- * @readonly
3547
- */
3548
- dateAttempt?: Date | null;
3549
- /** Number of the latest payment attempt. */
3550
- attemptNumber?: number;
3551
- /**
3552
- * Status of the latest payment attempt.
3553
- *
3554
- * + `"UNKNOWN"`: There is no information about the status of the latest payment attempt.
3555
- * + `"SCHEDULED"`: The latest payment attempt is scheduled but hasn't started yet.
3556
- * + `"IN_PROGRESS"`: The latest payment attempt is in progress.
3557
- * + `"PAID"`: The latest payment attempt resulted in a successful payment.
3558
- * + `"DECLINED"`: The latest payment attempt has been declined.
3559
- * + `"TECHNICAL_FAILURE"`: The latest payment attempt couldn't be process due to a technical failure.
3560
- * + `"CANCELED"`: The latest payment attempt has been canceled by BASS.
3561
- * @readonly
3562
- */
3563
- status?: PaymentAttemptStatusWithLiterals;
3564
- /**
3565
- * Whether BASS tries to collect the payment another time. Available only when
3566
- * `latestPaymentAttempt.status` is set to `"DECLINED"`.
3567
- */
3568
- retryable?: boolean;
3406
+ retryable?: boolean;
3569
3407
  /**
3570
3408
  * Platform fee that was collected on this transaction.
3571
3409
  * @format DECIMAL_VALUE
@@ -3693,6 +3531,12 @@ interface TaxSummary {
3693
3531
  * @maxSize 50
3694
3532
  */
3695
3533
  aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
3534
+ /**
3535
+ * 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.
3536
+ * @format DECIMAL_VALUE
3537
+ * @decimalValue options { maxScale:4 }
3538
+ */
3539
+ exemptAmount?: string | null;
3696
3540
  }
3697
3541
  interface AggregatedTaxBreakdown {
3698
3542
  /**
@@ -3723,6 +3567,13 @@ interface AggregatedTaxBreakdown {
3723
3567
  * @decimalValue options { maxScale:4 }
3724
3568
  */
3725
3569
  aggregatedTaxAmount?: string;
3570
+ /**
3571
+ * Total taxable amount of this tax
3572
+ * @internal
3573
+ * @format DECIMAL_VALUE
3574
+ * @decimalValue options { maxScale:4 }
3575
+ */
3576
+ aggregatedTaxableAmount?: string;
3726
3577
  }
3727
3578
  interface RefundInfo {
3728
3579
  /**
@@ -3789,52 +3640,11 @@ interface ChangeSubscriptionRequest {
3789
3640
  /** When the change takes effect. */
3790
3641
  effectiveTime?: ChangeEffectiveTimeWithLiterals;
3791
3642
  /** How to handle proration for immediate changes. Ignored for AT_NEXT_RENEWAL. */
3792
- prorationBehavior?: ProrationBehaviorWithLiterals;
3643
+ prorationBehavior?: ProrationBehaviorEnumProrationBehaviorWithLiterals;
3793
3644
  /** Payment context for immediate changes without checkout flow. */
3794
3645
  paymentContext?: ChangePaymentContext;
3795
3646
  }
3796
- /**
3797
- * Describes a change to a single subscription item.
3798
- * The caller (BG/CVS) resolves pricing from their catalog and passes concrete values.
3799
- */
3800
- interface SubscriptionItemChange {
3801
- /**
3802
- * Which item to change. Must match an existing item ID in the subscription.
3803
- * @format GUID
3804
- */
3805
- itemId?: string;
3806
- /**
3807
- * New price per unit. Caller resolves this from their product catalog.
3808
- * Required when changing product/plan. Optional for quantity-only changes (uses current price).
3809
- * @decimalValue options { gte:0.00, maxScale:2 }
3810
- */
3811
- newPrice?: string | null;
3812
- /**
3813
- * New quantity (seats/licenses). Optional — unchanged if not set.
3814
- * @min 1
3815
- */
3816
- newQuantity?: number | null;
3817
- /**
3818
- * New catalog reference. Optional — set when changing to a different product.
3819
- * This is metadata for the caller's tracking; BASS does not use it for pricing.
3820
- */
3821
- newCatalogReference?: CatalogReference;
3822
- /**
3823
- * New item name. Optional — set when changing to a different product.
3824
- * @maxLength 200
3825
- */
3826
- newName?: string | null;
3827
- }
3828
- declare enum ChangeEffectiveTime {
3829
- UNKNOWN = "UNKNOWN",
3830
- /** Apply change immediately with proration */
3831
- IMMEDIATELY = "IMMEDIATELY",
3832
- /** Schedule change for the next billing cycle */
3833
- AT_NEXT_RENEWAL = "AT_NEXT_RENEWAL"
3834
- }
3835
- /** @enumType */
3836
- type ChangeEffectiveTimeWithLiterals = ChangeEffectiveTime | 'UNKNOWN' | 'IMMEDIATELY' | 'AT_NEXT_RENEWAL';
3837
- declare enum ProrationBehavior {
3647
+ declare enum ProrationBehaviorEnumProrationBehavior {
3838
3648
  UNKNOWN = "UNKNOWN",
3839
3649
  /** Credit unused time + charge new prorated price (default for upgrades) */
3840
3650
  PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
@@ -3846,7 +3656,7 @@ declare enum ProrationBehavior {
3846
3656
  NO_PRORATION = "NO_PRORATION"
3847
3657
  }
3848
3658
  /** @enumType */
3849
- type ProrationBehaviorWithLiterals = ProrationBehavior | 'UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3659
+ type ProrationBehaviorEnumProrationBehaviorWithLiterals = ProrationBehaviorEnumProrationBehavior | 'UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3850
3660
  /** Payment context for immediate subscription changes without the checkout flow. */
3851
3661
  interface ChangePaymentContext {
3852
3662
  /** Payment settings override for this change */
@@ -3856,7 +3666,7 @@ interface ChangeSubscriptionResponse {
3856
3666
  /** Updated subscription */
3857
3667
  subscription?: Subscription;
3858
3668
  /** Proration calculation result. Present for immediate changes with proration. */
3859
- prorationResult?: ProrationResult;
3669
+ prorationResult?: V1ProrationResult;
3860
3670
  /**
3861
3671
  * ID of the adjustment invoice created for the proration charge or refund.
3862
3672
  * @format GUID
@@ -3864,7 +3674,7 @@ interface ChangeSubscriptionResponse {
3864
3674
  adjustmentInvoiceId?: string | null;
3865
3675
  }
3866
3676
  /** Result of a proration calculation applied during a subscription change. */
3867
- interface ProrationResult {
3677
+ interface V1ProrationResult {
3868
3678
  /**
3869
3679
  * Credit amount for unused time on the current plan
3870
3680
  * @format DECIMAL_VALUE
@@ -3900,50 +3710,74 @@ interface PreviewChangeSubscriptionRequest {
3900
3710
  /** When the change would take effect. */
3901
3711
  effectiveTime?: ChangeEffectiveTimeWithLiterals;
3902
3712
  /** How proration would be handled for immediate changes. */
3903
- prorationBehavior?: ProrationBehaviorWithLiterals;
3713
+ prorationBehavior?: ProrationBehaviorEnumProrationBehaviorWithLiterals;
3904
3714
  }
3905
- interface PreviewChangeSubscriptionResponse {
3906
- /** Summary of the current subscription state */
3907
- current?: SubscriptionChangeSummary;
3908
- /** Summary of the proposed subscription state after the change */
3909
- proposed?: SubscriptionChangeSummary;
3910
- /** Proration preview details. Present only for immediate changes. */
3911
- proration?: ProrationPreview;
3912
- /** Renewal preview. Present only for changes at next renewal. */
3913
- renewalPreview?: RenewalPreview;
3715
+ interface CancelPendingChangeRequest {
3716
+ /**
3717
+ * ID of the subscription to cancel the pending change for
3718
+ * @format GUID
3719
+ */
3720
+ subscriptionId?: string;
3914
3721
  }
3915
- /** Summary of a subscription's state, used in change previews. */
3916
- interface SubscriptionChangeSummary {
3917
- /** Product ID */
3918
- productId?: string;
3919
- /** Product name */
3920
- productName?: string;
3921
- /** Billing cycle duration */
3922
- cycle?: Duration;
3923
- /** Number of units */
3924
- quantity?: number;
3925
- /**
3926
- * Price per unit
3927
- * @format DECIMAL_VALUE
3928
- */
3929
- pricePerUnit?: string;
3722
+ interface CancelPendingChangeResponse {
3723
+ /** Updated subscription with cleared pending data */
3724
+ subscription?: Subscription;
3725
+ }
3726
+ interface ChangeSubscriptionForOrderRequest {
3727
+ /** The new subscription definition from the order (items, billing settings). */
3728
+ subscription?: Subscription;
3729
+ /** Context of the change: source subscription, change type, proration behavior. */
3730
+ changeContext?: ChangeContext;
3731
+ }
3732
+ /**
3733
+ * Context for subscription changes within the order/checkout flow.
3734
+ * Carries the source subscription reference and change parameters.
3735
+ * Present on an OrderSubscription when it represents a modification of an
3736
+ * existing subscription rather than a new purchase.
3737
+ */
3738
+ interface ChangeContext {
3930
3739
  /**
3931
- * Total price (price_per_unit * quantity)
3932
- * @format DECIMAL_VALUE
3740
+ * ID of the existing subscription being changed.
3741
+ * @format GUID
3933
3742
  */
3934
- totalPrice?: string;
3743
+ sourceSubscriptionId?: string;
3744
+ /** Type of change being performed. */
3745
+ changeType?: ChangeTypeWithLiterals;
3746
+ /** How proration should be handled. */
3747
+ prorationBehavior?: ProrationBehaviorWithLiterals;
3935
3748
  /**
3936
- * Currency code (ISO 4217)
3937
- * @format CURRENCY
3749
+ * System-populated: proration result after calculation.
3750
+ * Populated by billing-subscriptions during order processing.
3938
3751
  */
3939
- currency?: string;
3940
- /** Current billing period start */
3941
- periodStart?: Date | null;
3942
- /** Current billing period end */
3943
- periodEnd?: Date | null;
3752
+ prorationResult?: ProrationResult;
3944
3753
  }
3945
- /** Preview of proration amounts for a proposed subscription change. */
3946
- interface ProrationPreview {
3754
+ declare enum ChangeType {
3755
+ CHANGE_TYPE_UNKNOWN = "CHANGE_TYPE_UNKNOWN",
3756
+ UPGRADE = "UPGRADE",
3757
+ DOWNGRADE = "DOWNGRADE",
3758
+ CYCLE_CHANGE = "CYCLE_CHANGE",
3759
+ QUANTITY_CHANGE = "QUANTITY_CHANGE"
3760
+ }
3761
+ /** @enumType */
3762
+ type ChangeTypeWithLiterals = ChangeType | 'CHANGE_TYPE_UNKNOWN' | 'UPGRADE' | 'DOWNGRADE' | 'CYCLE_CHANGE' | 'QUANTITY_CHANGE';
3763
+ declare enum ProrationBehavior {
3764
+ PRORATION_BEHAVIOR_UNKNOWN = "PRORATION_BEHAVIOR_UNKNOWN",
3765
+ /** Credit unused time + charge new prorated price (default for upgrades) */
3766
+ PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
3767
+ /** Credit unused time + refund to payment method (downgrades) */
3768
+ PRORATE_AND_REFUND = "PRORATE_AND_REFUND",
3769
+ /** Convert unused value to extra days, no financial transaction */
3770
+ PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND",
3771
+ /** Immediate switch with no financial adjustment */
3772
+ NO_PRORATION = "NO_PRORATION"
3773
+ }
3774
+ /** @enumType */
3775
+ type ProrationBehaviorWithLiterals = ProrationBehavior | 'PRORATION_BEHAVIOR_UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3776
+ /**
3777
+ * Result of a proration calculation. Contains the credit, charge, and net amounts
3778
+ * computed during a subscription change.
3779
+ */
3780
+ interface ProrationResult {
3947
3781
  /**
3948
3782
  * Credit amount for unused time on the current plan
3949
3783
  * @format DECIMAL_VALUE
@@ -3955,69 +3789,24 @@ interface ProrationPreview {
3955
3789
  */
3956
3790
  chargeAmount?: string;
3957
3791
  /**
3958
- * Net amount (charge minus credit)
3792
+ * Net amount (charge minus credit). Positive means customer pays, negative means refund.
3959
3793
  * @format DECIMAL_VALUE
3960
3794
  */
3961
3795
  netAmount?: string;
3962
- /**
3963
- * Tax amount on the net proration
3964
- * @format DECIMAL_VALUE
3965
- */
3966
- taxAmount?: string;
3967
- /**
3968
- * Total amount including tax
3969
- * @format DECIMAL_VALUE
3970
- */
3971
- totalAmount?: string;
3972
- /** Remaining seconds in the current billing period */
3796
+ /** Date when the proration was calculated */
3797
+ prorationDate?: Date | null;
3798
+ /** Remaining seconds in the current billing period at time of change */
3973
3799
  remainingSeconds?: string;
3974
3800
  /** Total seconds in the current billing cycle */
3975
3801
  totalCycleSeconds?: string;
3976
- /** New period end date. Present when proration_behavior is PRORATE_AND_EXTEND. */
3977
- newPeriodEnd?: Date | null;
3978
- /** Number of days added to the billing period. Present when proration_behavior is PRORATE_AND_EXTEND. */
3979
- daysAdded?: number;
3980
- /** The proration action that would be taken */
3981
- action?: ProrationActionWithLiterals;
3982
- }
3983
- declare enum ProrationAction {
3984
- UNKNOWN = "UNKNOWN",
3985
- /** Net charge to customer */
3986
- CHARGE = "CHARGE",
3987
- /** Net refund to customer */
3988
- REFUND = "REFUND",
3989
- /** Extend billing period instead of refund */
3990
- EXTEND_PERIOD = "EXTEND_PERIOD",
3991
- /** No financial change needed */
3992
- NO_CHANGE = "NO_CHANGE"
3993
- }
3994
- /** @enumType */
3995
- type ProrationActionWithLiterals = ProrationAction | 'UNKNOWN' | 'CHARGE' | 'REFUND' | 'EXTEND_PERIOD' | 'NO_CHANGE';
3996
- /** Preview of what the next renewal will look like after a change. */
3997
- interface RenewalPreview {
3998
- /**
3999
- * New price per unit at next renewal
4000
- * @format DECIMAL_VALUE
4001
- */
4002
- newPrice?: string;
4003
- /**
4004
- * New total at next renewal (price * quantity)
4005
- * @format DECIMAL_VALUE
4006
- */
4007
- newTotal?: string;
4008
- /** Date of the next renewal */
4009
- nextRenewalDate?: Date | null;
4010
- }
4011
- interface CancelPendingChangeRequest {
4012
- /**
4013
- * ID of the subscription to cancel the pending change for
4014
- * @format GUID
4015
- */
4016
- subscriptionId?: string;
4017
3802
  }
4018
- interface CancelPendingChangeResponse {
4019
- /** Updated subscription with cleared pending data */
3803
+ interface ChangeSubscriptionForOrderResponse {
3804
+ /** The source subscription (unchanged, for reference). */
4020
3805
  subscription?: Subscription;
3806
+ /** Non-persistent invoice with proration adjustments. */
3807
+ invoice?: Invoice;
3808
+ /** Calculated proration result. */
3809
+ prorationResult?: ProrationResult;
4021
3810
  }
4022
3811
  interface Task {
4023
3812
  key?: TaskKey;
@@ -4048,6 +3837,8 @@ interface Reschedule {
4048
3837
  executeAt?: Date | null;
4049
3838
  payload?: string | null;
4050
3839
  }
3840
+ interface Empty {
3841
+ }
4051
3842
  interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
4052
3843
  /** A subscriptions was created */
4053
3844
  created?: V1SubscriptionCreated;
@@ -4246,149 +4037,624 @@ declare enum V1SubscriptionStatusEnumSubscriptionStatus {
4246
4037
  /** Subscription is suspended */
4247
4038
  SUSPENDED = "SUSPENDED"
4248
4039
  }
4249
- /** @enumType */
4250
- type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED';
4251
- declare enum PaymentStatusEnumPaymentStatus {
4252
- /** Payment status undefined */
4253
- UNDEFINED = "UNDEFINED",
4254
- /** Payment has been paid */
4255
- PAID = "PAID",
4256
- /** Payment has been refunded */
4257
- REFUNDED = "REFUNDED",
4258
- /** Recurring payment has failed */
4259
- FAILED = "FAILED",
4260
- /** Payment has not been paid */
4261
- UNPAID = "UNPAID",
4262
- /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
4263
- PENDING = "PENDING"
4040
+ /** @enumType */
4041
+ type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED';
4042
+ declare enum PaymentStatusEnumPaymentStatus {
4043
+ /** Payment status undefined */
4044
+ UNDEFINED = "UNDEFINED",
4045
+ /** Payment has been paid */
4046
+ PAID = "PAID",
4047
+ /** Payment has been refunded */
4048
+ REFUNDED = "REFUNDED",
4049
+ /** Recurring payment has failed */
4050
+ FAILED = "FAILED",
4051
+ /** Payment has not been paid */
4052
+ UNPAID = "UNPAID",
4053
+ /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
4054
+ PENDING = "PENDING"
4055
+ }
4056
+ /** @enumType */
4057
+ type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING';
4058
+ /**
4059
+ * Recurring payment is described by `frequency` (day, week, month) and `interval`.
4060
+ *
4061
+ * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
4062
+ *
4063
+ * In some cases there should be a trial period for the order, after which payments start to occur.
4064
+ * Trial period is also defined as `frequency` and `interval` pair.
4065
+ *
4066
+ * So one can define a monthly 'subscription' with a 14 days trial period.
4067
+ */
4068
+ interface V2Subscription {
4069
+ /** frequency of recurring payment (required) */
4070
+ frequency?: SubscriptionFrequencyWithLiterals;
4071
+ /** interval of recurring payment (required) */
4072
+ interval?: number;
4073
+ /** trial period for recurring payment (optional) */
4074
+ trial?: SubscriptionTrialPeriod;
4075
+ /**
4076
+ * how many billing cycles should be done before subscription finishes
4077
+ * (optional, 0 by default means endless subscription)
4078
+ */
4079
+ billingCycles?: number;
4080
+ /**
4081
+ * date in the future or in the past when the first billing cycle begins
4082
+ * (the first off-session payment is performed when it ends)
4083
+ */
4084
+ firstCycleStartDate?: Date | null;
4085
+ }
4086
+ /** Frequency unit of recurring payment */
4087
+ declare enum SubscriptionFrequency {
4088
+ UNDEFINED = "UNDEFINED",
4089
+ DAY = "DAY",
4090
+ WEEK = "WEEK",
4091
+ MONTH = "MONTH",
4092
+ YEAR = "YEAR"
4093
+ }
4094
+ /** @enumType */
4095
+ type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
4096
+ /** Trial period of subscription */
4097
+ interface SubscriptionTrialPeriod {
4098
+ /** trial period in units (required) */
4099
+ period?: number;
4100
+ /** units in which trial period is described (optional, default DAY) */
4101
+ unit?: SubscriptionFrequencyWithLiterals;
4102
+ }
4103
+ declare enum CancellationInitiator {
4104
+ /** Cancellation initiator undefined */
4105
+ UNDEFINED = "UNDEFINED",
4106
+ /** Subscription was canceled by site owner (default if canceled by user or service identity) */
4107
+ OWNER = "OWNER",
4108
+ /** Subscription was canceled by member (default if canceled by member identity) */
4109
+ MEMBER = "MEMBER",
4110
+ /** Subscription was canceled because of payment failure */
4111
+ PAYMENT_FAILURE = "PAYMENT_FAILURE",
4112
+ /** Subscription was canceled because of payment setup failure */
4113
+ SETUP_FAILURE = "SETUP_FAILURE"
4114
+ }
4115
+ /** @enumType */
4116
+ type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE';
4117
+ interface SubscriptionPolicy {
4118
+ /** Subscription expiration date can be updated */
4119
+ expiryDateChangeable?: boolean;
4120
+ /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
4121
+ cancellableByMember?: boolean;
4122
+ /** Subscription expiration date on cancellation can be set to next payment date */
4123
+ cancellableAtNextPaymentCycle?: boolean;
4124
+ }
4125
+ interface Suspension {
4126
+ status?: StatusWithLiterals;
4127
+ /** Beginning of the suspended period */
4128
+ startsAt?: Date | null;
4129
+ /** End of the suspended period */
4130
+ endsAt?: Date | null;
4131
+ }
4132
+ declare enum Status {
4133
+ UNDEFINED = "UNDEFINED",
4134
+ ACTIVE = "ACTIVE",
4135
+ ENDED = "ENDED"
4136
+ }
4137
+ /** @enumType */
4138
+ type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';
4139
+ /** A duration expressed in amount of time units. */
4140
+ interface V1Duration {
4141
+ /** Amount of the unit */
4142
+ amount?: number;
4143
+ /** Day, Week, Month, Year. */
4144
+ unit?: SubscriptionFrequencyWithLiterals;
4145
+ }
4146
+ interface V1SubscriptionActivated {
4147
+ subscription?: V1Subscription;
4148
+ }
4149
+ interface V1SubscriptionCanceled {
4150
+ subscription?: V1Subscription;
4151
+ }
4152
+ interface V1SubscriptionUpdated {
4153
+ subscription?: V1Subscription;
4154
+ }
4155
+ interface SubscriptionCycleTriggered {
4156
+ subscription?: V1Subscription;
4157
+ billingCycle?: number;
4158
+ /**
4159
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
4160
+ * @format GUID
4161
+ */
4162
+ transactionId?: string | null;
4163
+ }
4164
+ interface SubscriptionMarkedAsPaid {
4165
+ subscription?: V1Subscription;
4166
+ /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
4167
+ billingCycle?: number | null;
4168
+ }
4169
+ interface SubscriptionCancellationRequested {
4170
+ subscription?: V1Subscription;
4171
+ }
4172
+ interface SubscriptionSuspended {
4173
+ subscription?: V1Subscription;
4174
+ }
4175
+ interface V1SubscriptionResumed {
4176
+ subscription?: V1Subscription;
4177
+ }
4178
+ interface SubscriptionExpired {
4179
+ subscription?: V1Subscription;
4180
+ }
4181
+ interface V1SubscriptionInitialPurchaseCompleted {
4182
+ subscription?: V1Subscription;
4183
+ }
4184
+ interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
4185
+ activeSubscription?: CreateSubscriptionRequest;
4186
+ }
4187
+ /** @oneof */
4188
+ interface CreateSubscriptionInStateRequestModeOneOf {
4189
+ activeSubscription?: CreateSubscriptionRequest;
4190
+ }
4191
+ interface CreateSubscriptionInStateResponse {
4192
+ /** @format GUID */
4193
+ subscriptionId?: string;
4194
+ }
4195
+ interface PayCycleRequest {
4196
+ /** @format GUID */
4197
+ subscriptionId?: string;
4198
+ paymentTestMode?: PaymentTestModeWithLiterals;
4199
+ /** @format GUID */
4200
+ tenantId?: string;
4201
+ }
4202
+ declare enum PaymentTestMode {
4203
+ REGULAR = "REGULAR",
4204
+ FAIL_TECHNICAL = "FAIL_TECHNICAL",
4205
+ FAIL_DECLINE = "FAIL_DECLINE",
4206
+ FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
4207
+ }
4208
+ /** @enumType */
4209
+ type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE';
4210
+ interface PayCycleResponse {
4211
+ /** @format GUID */
4212
+ invoiceId?: string;
4213
+ /** @format GUID */
4214
+ paymentOrderId?: string | null;
4215
+ subscription?: Subscription;
4216
+ }
4217
+ interface GetFullSubscriptionDataRequest {
4218
+ /** @format GUID */
4219
+ _id?: string;
4220
+ }
4221
+ interface GetFullSubscriptionDataResponse {
4222
+ subscription?: Subscription;
4223
+ internalSubscriptionData?: InternalSubscriptionData;
4224
+ }
4225
+ interface InternalSubscriptionData {
4226
+ /** @format GUID */
4227
+ originInstanceId?: string;
4228
+ source?: string | null;
4229
+ billingType?: string;
4230
+ isOneTime?: boolean;
4231
+ migrationDetails?: MigrationDetails;
4232
+ pausePaidDuration?: string | null;
4233
+ authorizationPaymentData?: PaymentData;
4234
+ currentCyclePausePeriods?: PausePeriod[];
4235
+ }
4236
+ interface MigrationDetails {
4237
+ /** system (application) where the Subscription has been created */
4238
+ originSystem?: string;
4239
+ /** date when the Subscription started to be managed in BASS */
4240
+ shiftManagementDate?: Date | null;
4241
+ }
4242
+ interface PausePeriod {
4243
+ startDate?: Date | null;
4244
+ endDate?: Date | null;
4245
+ }
4246
+ interface GetSubscriptionAndInternalDataRequest {
4247
+ /** @format GUID */
4248
+ subscriptionId?: string;
4249
+ /** @format GUID */
4250
+ tenantId?: string;
4251
+ }
4252
+ interface GetSubscriptionAndInternalDataResponse {
4253
+ subscription?: Subscription;
4254
+ internalSubscriptionData?: InternalSubscriptionData;
4255
+ }
4256
+ interface SearchSubscriptionRequest {
4257
+ /** @format GUID */
4258
+ _id?: string;
4259
+ /** @format GUID */
4260
+ tenantId?: string;
4261
+ }
4262
+ interface SearchSubscriptionResponse {
4263
+ subscription?: Subscription;
4264
+ }
4265
+ interface UpdatePausePaidDurationRequest {
4266
+ /** @format GUID */
4267
+ subscriptionId?: string;
4268
+ /**
4269
+ * @min 1
4270
+ * @max 10000000
4271
+ */
4272
+ pausePaidDurationSeconds?: string;
4273
+ /** @format GUID */
4274
+ tenantId?: string;
4275
+ }
4276
+ interface UpdatePausePaidDurationResponse {
4277
+ }
4278
+ interface UpdateStatusRequest {
4279
+ /** @format GUID */
4280
+ subscriptionId?: string;
4281
+ /** @format GUID */
4282
+ tenantId?: string;
4283
+ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
4284
+ }
4285
+ interface UpdateStatusResponse {
4286
+ subscription?: Subscription;
4287
+ }
4288
+ interface UpdatePaymentStatusRequest {
4289
+ /** @format GUID */
4290
+ subscriptionId?: string;
4291
+ /** @format GUID */
4292
+ tenantId?: string;
4293
+ paymentStatus?: PaymentStatusWithLiterals;
4294
+ }
4295
+ interface UpdatePaymentStatusResponse {
4296
+ subscription?: Subscription;
4297
+ }
4298
+ interface RemoveCancellationInfoRequest {
4299
+ /** @format GUID */
4300
+ subscriptionId?: string;
4301
+ /** @format GUID */
4302
+ tenantId?: string;
4303
+ }
4304
+ interface RemoveCancellationInfoResponse {
4305
+ subscription?: Subscription;
4306
+ }
4307
+ interface RemovePauseInfoRequest {
4308
+ /** @format GUID */
4309
+ subscriptionId?: string;
4310
+ /** @format GUID */
4311
+ tenantId?: string;
4312
+ }
4313
+ interface RemovePauseInfoResponse {
4314
+ subscription?: Subscription;
4315
+ }
4316
+ interface ReviveSubscriptionRequest {
4317
+ /** @format GUID */
4318
+ tenantId?: string;
4319
+ /** @format GUID */
4320
+ subscriptionId?: string;
4321
+ revivePolicy?: RevivePolicyWithLiterals;
4322
+ isTestRun?: boolean;
4323
+ }
4324
+ declare enum RevivePolicy {
4325
+ SIMPLE = "SIMPLE",
4326
+ RESUME = "RESUME"
4327
+ }
4328
+ /** @enumType */
4329
+ type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';
4330
+ interface ReviveSubscriptionResponse {
4331
+ subscription?: Subscription;
4332
+ }
4333
+ interface ConvertSapiRequest {
4334
+ /** @format GUID */
4335
+ subscriptionId?: string;
4336
+ }
4337
+ interface ConvertSapiResponse {
4338
+ subscription?: Subscription;
4339
+ }
4340
+ interface GetSubscriptionInvoicesRequest {
4341
+ /** @format GUID */
4342
+ _id?: string;
4343
+ }
4344
+ interface GetSubscriptionInvoicesResponse {
4345
+ invoices?: SubscriptionInvoice[];
4346
+ }
4347
+ interface SubscriptionInvoice {
4348
+ /** @format GUID */
4349
+ _id?: string;
4350
+ subscriptionCycle?: number;
4351
+ _createdDate?: Date | null;
4352
+ }
4353
+ interface FinishFreeTrialNowRequest {
4354
+ /** @format GUID */
4355
+ subscriptionId?: string;
4356
+ /** @format GUID */
4357
+ tenantId?: string;
4358
+ }
4359
+ interface FinishFreeTrialNowResponse {
4360
+ subscription?: Subscription;
4361
+ }
4362
+ interface FixSubscriptionTimeCapsuleTasksRequest {
4363
+ /** @format GUID */
4364
+ subscriptionId?: string;
4365
+ /** @format GUID */
4366
+ tenantId?: string;
4367
+ }
4368
+ interface FixSubscriptionTimeCapsuleTasksResponse {
4369
+ }
4370
+ interface SendTimeCapsuleTaskCanceledBIRequest {
4371
+ /** @format GUID */
4372
+ tenantId?: string;
4373
+ /** @format GUID */
4374
+ subscriptionId?: string;
4375
+ /** @minLength 1 */
4376
+ taskType?: string;
4377
+ }
4378
+ interface ScheduleTimeCapsuleTaskRequest {
4379
+ /** @format GUID */
4380
+ subscriptionId?: string;
4381
+ /** @minLength 1 */
4382
+ taskType?: string;
4383
+ executionTime?: Date | null;
4384
+ /** @format GUID */
4385
+ tenantId?: string;
4386
+ }
4387
+ interface CancelTimeCapsuleTaskRequest {
4388
+ /** @format GUID */
4389
+ tenantId?: string;
4390
+ /** @format GUID */
4391
+ subscriptionId?: string;
4392
+ /** @minLength 1 */
4393
+ taskType?: string;
4394
+ }
4395
+ interface UpdateFullSubscriptionRequest {
4396
+ /** @format GUID */
4397
+ tenantId?: string;
4398
+ subscription?: Subscription;
4399
+ }
4400
+ interface UpdateFullSubscriptionResponse {
4401
+ subscription?: Subscription;
4402
+ }
4403
+ interface PatchSubscriptionRequest {
4404
+ /**
4405
+ * Tenant ID (instance ID) of the subscription
4406
+ * @format GUID
4407
+ */
4408
+ tenantId?: string;
4409
+ /**
4410
+ * Subscription ID to patch
4411
+ * @format GUID
4412
+ */
4413
+ subscriptionId?: string;
4414
+ /** Partial subscription with updated values */
4415
+ subscription?: Subscription;
4416
+ /** Fields to update (e.g., "name", "billing_settings.collection_method") */
4417
+ fieldMask?: string[];
4418
+ }
4419
+ interface PatchSubscriptionResponse {
4420
+ /** The updated subscription */
4421
+ subscription?: Subscription;
4422
+ }
4423
+ interface UpdateSubscriptionInvoiceCycleRequest {
4424
+ /** @format GUID */
4425
+ subscriptionId?: string;
4426
+ /** @format GUID */
4427
+ tenantId?: string;
4428
+ /** @format GUID */
4429
+ invoiceId?: string;
4430
+ subscriptionCycle?: number;
4431
+ }
4432
+ interface UpdateSubscriptionInvoiceCycleResponse {
4433
+ subscriptionInvoice?: SubscriptionInvoice;
4434
+ }
4435
+ interface AddPausePeriodRequest {
4436
+ /** @format GUID */
4437
+ tenantId?: string;
4438
+ /** @format GUID */
4439
+ subscriptionId?: string;
4440
+ pauseStartDate?: Date | null;
4441
+ pauseEndDate?: Date | null;
4442
+ }
4443
+ interface AddPausePeriodResponse {
4444
+ subscription?: Subscription;
4445
+ }
4446
+ interface RunTimeCapsuleTaskNowRequest {
4447
+ /** @format GUID */
4448
+ tenantId?: string;
4449
+ /** @format GUID */
4450
+ subscriptionId?: string;
4451
+ /** @minLength 1 */
4452
+ taskType?: string;
4453
+ }
4454
+ interface CreateRecurringInvoiceBORequest {
4455
+ /** @format GUID */
4456
+ subscriptionId?: string;
4457
+ /** @format GUID */
4458
+ tenantId?: string;
4459
+ /** @min 2 */
4460
+ cycleNumber?: number;
4461
+ }
4462
+ interface CreateRecurringInvoiceBOResponse {
4463
+ invoiceId?: string;
4464
+ }
4465
+ interface SetShiftingDataRequest {
4466
+ /** @format GUID */
4467
+ subscriptionId?: string;
4468
+ /** @format GUID */
4469
+ tenantId?: string;
4470
+ isBassManaged?: boolean;
4471
+ shiftManagementDate?: Date | null;
4472
+ }
4473
+ interface SetShiftingDataResponse {
4474
+ subscription?: Subscription;
4475
+ }
4476
+ interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
4477
+ attachInvoice?: AttachInvoice;
4478
+ detachInvoice?: DetachInvoice;
4479
+ /** @format GUID */
4480
+ tenantId?: string;
4481
+ /** @format GUID */
4482
+ subscriptionId?: string;
4483
+ }
4484
+ /** @oneof */
4485
+ interface FixSubscriptionInvoicesRequestModeOneOf {
4486
+ attachInvoice?: AttachInvoice;
4487
+ detachInvoice?: DetachInvoice;
4488
+ }
4489
+ interface AttachInvoice {
4490
+ /** @format GUID */
4491
+ invoiceId?: string;
4492
+ }
4493
+ interface DetachInvoice {
4494
+ /** @format GUID */
4495
+ invoiceId?: string;
4496
+ }
4497
+ interface FixSubscriptionInvoicesResponse {
4498
+ invoices?: SubscriptionInvoice[];
4499
+ }
4500
+ interface RestoreDraftSubscriptionRequest {
4501
+ /** @format GUID */
4502
+ tenantId?: string;
4503
+ /** @format GUID */
4504
+ subscriptionId?: string;
4505
+ }
4506
+ interface RestoreDraftSubscriptionResponse {
4507
+ subscription?: Subscription;
4508
+ }
4509
+ interface DeleteDraftSubscriptionRequest {
4510
+ /** @format GUID */
4511
+ tenantId?: string;
4512
+ /** @format GUID */
4513
+ subscriptionId?: string;
4514
+ }
4515
+ interface DeleteDraftSubscriptionResponse {
4516
+ subscription?: Subscription;
4517
+ }
4518
+ interface DeleteSubscriptionBORequest {
4519
+ /** @format GUID */
4520
+ tenantId?: string;
4521
+ /** @format GUID */
4522
+ subscriptionId?: string;
4523
+ }
4524
+ interface DeleteSubscriptionBOResponse {
4525
+ subscription?: Subscription;
4526
+ }
4527
+ interface CancelSubscriptionBORequest {
4528
+ /** @format GUID */
4529
+ tenantId?: string;
4530
+ /** @format GUID */
4531
+ subscriptionId?: string;
4532
+ initiator?: ActionInitiatorWithLiterals;
4533
+ reason?: string | null;
4534
+ }
4535
+ interface CancelSubscriptionBOResponse {
4536
+ subscription?: Subscription;
4264
4537
  }
4265
- /** @enumType */
4266
- type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING';
4267
- /**
4268
- * Recurring payment is described by `frequency` (day, week, month) and `interval`.
4269
- *
4270
- * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
4271
- *
4272
- * In some cases there should be a trial period for the order, after which payments start to occur.
4273
- * Trial period is also defined as `frequency` and `interval` pair.
4274
- *
4275
- * So one can define a monthly 'subscription' with a 14 days trial period.
4276
- */
4277
- interface V2Subscription {
4278
- /** frequency of recurring payment (required) */
4279
- frequency?: SubscriptionFrequencyWithLiterals;
4280
- /** interval of recurring payment (required) */
4281
- interval?: number;
4282
- /** trial period for recurring payment (optional) */
4283
- trial?: SubscriptionTrialPeriod;
4284
- /**
4285
- * how many billing cycles should be done before subscription finishes
4286
- * (optional, 0 by default means endless subscription)
4287
- */
4288
- billingCycles?: number;
4289
- /**
4290
- * date in the future or in the past when the first billing cycle begins
4291
- * (the first off-session payment is performed when it ends)
4292
- */
4293
- firstCycleStartDate?: Date | null;
4538
+ interface UpdatePaymentMethodBORequest {
4539
+ /** @format GUID */
4540
+ tenantId?: string;
4541
+ /** @format GUID */
4542
+ subscriptionId?: string;
4543
+ /** @format GUID */
4544
+ paymentMethodId?: string;
4294
4545
  }
4295
- /** Frequency unit of recurring payment */
4296
- declare enum SubscriptionFrequency {
4297
- UNDEFINED = "UNDEFINED",
4298
- DAY = "DAY",
4299
- WEEK = "WEEK",
4300
- MONTH = "MONTH",
4301
- YEAR = "YEAR"
4546
+ interface UpdatePaymentMethodBOResponse {
4547
+ subscription?: Subscription;
4302
4548
  }
4303
- /** @enumType */
4304
- type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
4305
- /** Trial period of subscription */
4306
- interface SubscriptionTrialPeriod {
4307
- /** trial period in units (required) */
4308
- period?: number;
4309
- /** units in which trial period is described (optional, default DAY) */
4310
- unit?: SubscriptionFrequencyWithLiterals;
4549
+ interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
4550
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
4551
+ /** @format GUID */
4552
+ tenantId?: string;
4553
+ /** @format GUID */
4554
+ subscriptionId?: string;
4311
4555
  }
4312
- declare enum CancellationInitiator {
4313
- /** Cancellation initiator undefined */
4314
- UNDEFINED = "UNDEFINED",
4315
- /** Subscription was canceled by site owner (default if canceled by user or service identity) */
4316
- OWNER = "OWNER",
4317
- /** Subscription was canceled by member (default if canceled by member identity) */
4318
- MEMBER = "MEMBER",
4319
- /** Subscription was canceled because of payment failure */
4320
- PAYMENT_FAILURE = "PAYMENT_FAILURE",
4321
- /** Subscription was canceled because of payment setup failure */
4322
- SETUP_FAILURE = "SETUP_FAILURE"
4556
+ /** @oneof */
4557
+ interface SendSubscriptionActionEventBORequestEventOneOf {
4558
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
4323
4559
  }
4324
- /** @enumType */
4325
- type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE';
4326
- interface SubscriptionPolicy {
4327
- /** Subscription expiration date can be updated */
4328
- expiryDateChangeable?: boolean;
4329
- /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
4330
- cancellableByMember?: boolean;
4331
- /** Subscription expiration date on cancellation can be set to next payment date */
4332
- cancellableAtNextPaymentCycle?: boolean;
4560
+ interface SendSubscriptionActionEventResponse {
4333
4561
  }
4334
- interface Suspension {
4335
- status?: StatusWithLiterals;
4336
- /** Beginning of the suspended period */
4337
- startsAt?: Date | null;
4338
- /** End of the suspended period */
4339
- endsAt?: Date | null;
4562
+ interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
4563
+ /** @format GUID */
4564
+ tenantId?: string;
4565
+ /** @format GUID */
4566
+ subscriptionId?: string;
4567
+ transactionId?: string;
4340
4568
  }
4341
- declare enum Status {
4342
- UNDEFINED = "UNDEFINED",
4343
- ACTIVE = "ACTIVE",
4344
- ENDED = "ENDED"
4569
+ interface PauseSubscriptionBORequest {
4570
+ /** @format GUID */
4571
+ tenantId?: string;
4572
+ /** @format GUID */
4573
+ subscriptionId?: string;
4574
+ pausePolicy?: PausePolicyWithLiterals;
4575
+ pauseAt?: PauseAtWithLiterals;
4576
+ initiator?: ActionInitiatorWithLiterals;
4577
+ /** @maxLength 500 */
4578
+ reason?: string | null;
4345
4579
  }
4346
- /** @enumType */
4347
- type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';
4348
- /** A duration expressed in amount of time units. */
4349
- interface V1Duration {
4350
- /** Amount of the unit */
4351
- amount?: number;
4352
- /** Day, Week, Month, Year. */
4353
- unit?: SubscriptionFrequencyWithLiterals;
4580
+ interface PauseSubscriptionBOResponse {
4581
+ subscription?: Subscription;
4354
4582
  }
4355
- interface V1SubscriptionActivated {
4356
- subscription?: V1Subscription;
4583
+ interface FixSubscriptionInvoicesConsistencyRequest {
4584
+ /** @format GUID */
4585
+ tenantId?: string;
4586
+ /** @format GUID */
4587
+ subscriptionId?: string;
4357
4588
  }
4358
- interface V1SubscriptionCanceled {
4359
- subscription?: V1Subscription;
4589
+ interface FixSubscriptionInvoicesConsistencyResponse {
4360
4590
  }
4361
- interface V1SubscriptionUpdated {
4362
- subscription?: V1Subscription;
4591
+ interface FixSubscriptionPaymentStatusRequest {
4592
+ /** @format GUID */
4593
+ tenantId?: string;
4594
+ /** @format GUID */
4595
+ subscriptionId?: string;
4596
+ /** When true, verify and report the would-be fix without mutating anything. */
4597
+ dryRun?: boolean;
4363
4598
  }
4364
- interface SubscriptionCycleTriggered {
4365
- subscription?: V1Subscription;
4366
- billingCycle?: number;
4599
+ interface FixSubscriptionPaymentStatusResponse {
4600
+ /** The invoice is PAID but the (DRAFT) subscription never processed the paid event. */
4601
+ mismatchDetected?: boolean;
4602
+ /** A real mismatch was found and the invoice-paid activation was re-driven (always false in dry-run). */
4603
+ fixed?: boolean;
4367
4604
  /**
4368
- * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
4369
- * @format GUID
4605
+ * Subscription status after the re-drive (ACTIVE / PENDING); in dry-run, the predicted status; "" when no fix ran.
4606
+ * @maxLength 50
4370
4607
  */
4371
- transactionId?: string | null;
4372
- }
4373
- interface SubscriptionMarkedAsPaid {
4374
- subscription?: V1Subscription;
4375
- /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
4376
- billingCycle?: number | null;
4377
- }
4378
- interface SubscriptionCancellationRequested {
4379
- subscription?: V1Subscription;
4608
+ resultingStatus?: string;
4609
+ /**
4610
+ * Human-readable summary of the decision and action.
4611
+ * @maxLength 500
4612
+ */
4613
+ detail?: string;
4380
4614
  }
4381
- interface SubscriptionSuspended {
4382
- subscription?: V1Subscription;
4615
+ interface UpdateSubscriptionCurrencyRequest {
4616
+ /**
4617
+ * Tenant ID (instance ID) of the subscription
4618
+ * @format GUID
4619
+ */
4620
+ tenantId?: string;
4621
+ /**
4622
+ * Subscription ID to update currency for
4623
+ * @format GUID
4624
+ */
4625
+ subscriptionId?: string;
4626
+ /**
4627
+ * New currency code (e.g., "USD", "EUR") - ISO 4217 format
4628
+ * @format CURRENCY
4629
+ */
4630
+ newCurrency?: string;
4631
+ /**
4632
+ * Exchange rate from current currency to new currency (newAmount = oldAmount * exchangeRate)
4633
+ * @decimalValue options { gt:0.00, maxScale:6 }
4634
+ */
4635
+ exchangeRate?: string;
4383
4636
  }
4384
- interface V1SubscriptionResumed {
4385
- subscription?: V1Subscription;
4637
+ interface UpdateSubscriptionCurrencyResponse {
4638
+ /** The updated subscription with new currency and converted amounts */
4639
+ subscription?: Subscription;
4386
4640
  }
4387
- interface SubscriptionExpired {
4388
- subscription?: V1Subscription;
4641
+ interface UpdateSubscriptionPlatformOriginRequest {
4642
+ /**
4643
+ * Subscription ID to update platform origin for
4644
+ * @format GUID
4645
+ */
4646
+ subscriptionId?: string;
4647
+ /**
4648
+ * Tenant ID (instance ID) of the subscription
4649
+ * @format GUID
4650
+ */
4651
+ tenantId?: string;
4652
+ /** New platform origin (appId and entityId) */
4653
+ platformOrigin?: PlatformOrigin;
4389
4654
  }
4390
- interface V1SubscriptionInitialPurchaseCompleted {
4391
- subscription?: V1Subscription;
4655
+ interface UpdateSubscriptionPlatformOriginResponse {
4656
+ /** The updated subscription with new platform origin */
4657
+ subscription?: Subscription;
4392
4658
  }
4393
4659
  interface ListSubscriptionHistoryRequest {
4394
4660
  /** @format GUID */
@@ -4455,6 +4721,8 @@ interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
4455
4721
  billingCyclePaid?: SubscriptionBillingCyclePaid;
4456
4722
  initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
4457
4723
  futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;
4724
+ /** Fired once when an offline subscription purchase is completed (BILL-534). */
4725
+ offlinePurchaseCompleted?: SubscriptionOfflinePurchaseCompleted;
4458
4726
  subscriptionBoAction?: SubscriptionBackOfficeAction;
4459
4727
  unknown?: UnknownSubscriptionEvent;
4460
4728
  }
@@ -4493,6 +4761,8 @@ interface SubscriptionEventPayloadOneOf {
4493
4761
  billingCyclePaid?: SubscriptionBillingCyclePaid;
4494
4762
  initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
4495
4763
  futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;
4764
+ /** Fired once when an offline subscription purchase is completed (BILL-534). */
4765
+ offlinePurchaseCompleted?: SubscriptionOfflinePurchaseCompleted;
4496
4766
  subscriptionBoAction?: SubscriptionBackOfficeAction;
4497
4767
  unknown?: UnknownSubscriptionEvent;
4498
4768
  }
@@ -4566,6 +4836,10 @@ interface FuturePriceUpdatesRequested {
4566
4836
  subscription?: Subscription;
4567
4837
  requestedUpdateData?: SubscriptionUpdateData;
4568
4838
  }
4839
+ interface SubscriptionOfflinePurchaseCompleted {
4840
+ subscription?: Subscription;
4841
+ actionDetails?: ActionDetails;
4842
+ }
4569
4843
  interface SubscriptionBackOfficeAction {
4570
4844
  subscription?: Subscription;
4571
4845
  /** The backoffice method name */
@@ -4686,6 +4960,16 @@ type CustomerUpdateBillingDateApplicationErrors = {
4686
4960
  data?: Record<string, any>;
4687
4961
  };
4688
4962
  /** @docsIgnore */
4963
+ type CustomerChangeSubscriptionApplicationErrors = {
4964
+ code?: 'CUSTOMER_ACTION_NOT_ENABLED';
4965
+ description?: string;
4966
+ data?: Record<string, any>;
4967
+ } | {
4968
+ code?: 'CUSTOMER_TIMING_RESTRICTION';
4969
+ description?: string;
4970
+ data?: Record<string, any>;
4971
+ };
4972
+ /** @docsIgnore */
4689
4973
  type UpdateSubscriptionBillingDateApplicationErrors = {
4690
4974
  code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
4691
4975
  description?: string;
@@ -4796,7 +5080,7 @@ interface EventMetadata extends BaseEventMetadata {
4796
5080
  /** If present, indicates the action that triggered the event. */
4797
5081
  originatedFrom?: string | null;
4798
5082
  /**
4799
- * 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.
5083
+ * 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.
4800
5084
  * 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.
4801
5085
  */
4802
5086
  entityEventSequence?: string | null;
@@ -4816,6 +5100,8 @@ interface SubscriptionCanceledEnvelope {
4816
5100
  }
4817
5101
  /**
4818
5102
  * Triggered when a subscription is canceled.
5103
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5104
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4819
5105
  * @permissionScope Manage Stores
4820
5106
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4821
5107
  * @permissionScope Manage Events
@@ -4834,6 +5120,8 @@ interface SubscriptionExtendedEnvelope {
4834
5120
  }
4835
5121
  /**
4836
5122
  * Triggered when subscription has been extended
5123
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5124
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4837
5125
  * @permissionScope Manage Stores
4838
5126
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4839
5127
  * @permissionScope Manage Events
@@ -4852,6 +5140,8 @@ interface SubscriptionUpdatedEnvelope {
4852
5140
  }
4853
5141
  /**
4854
5142
  * Triggered when a subscription is updated.
5143
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5144
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4855
5145
  * @permissionScope Manage Stores
4856
5146
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4857
5147
  * @permissionScope Manage Events
@@ -4870,6 +5160,8 @@ interface SubscriptionAutoRenewalTurnedOffEnvelope {
4870
5160
  }
4871
5161
  /**
4872
5162
  * Triggered when a subscription cycleAutoRenew was turned off.
5163
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5164
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4873
5165
  * @permissionScope Manage Stores
4874
5166
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4875
5167
  * @permissionScope Manage Events
@@ -4888,6 +5180,8 @@ interface SubscriptionAutoRenewalTurnedOnEnvelope {
4888
5180
  }
4889
5181
  /**
4890
5182
  * Triggered when a subscription cycleAutoRenew was turned on.
5183
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5184
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4891
5185
  * @permissionScope Manage Stores
4892
5186
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4893
5187
  * @permissionScope Manage Events
@@ -4906,6 +5200,8 @@ interface SubscriptionBillingDateUpdatedEnvelope {
4906
5200
  }
4907
5201
  /**
4908
5202
  * Triggered when subscription has been extended
5203
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5204
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4909
5205
  * @permissionScope Manage Stores
4910
5206
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4911
5207
  * @permissionScope Manage Events
@@ -4922,7 +5218,9 @@ interface SubscriptionLatestInvoiceMarkedAsPaidEnvelope {
4922
5218
  data: LatestInvoiceMarkedAsPaid;
4923
5219
  metadata: EventMetadata;
4924
5220
  }
4925
- /** @permissionScope Manage Stores
5221
+ /** @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5222
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
5223
+ * @permissionScope Manage Stores
4926
5224
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4927
5225
  * @permissionScope Manage Events
4928
5226
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
@@ -4940,6 +5238,8 @@ interface SubscriptionPauseScheduleCanceledEnvelope {
4940
5238
  }
4941
5239
  /**
4942
5240
  * Triggered when scheduled pause canceled
5241
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5242
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4943
5243
  * @permissionScope Manage Stores
4944
5244
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4945
5245
  * @permissionScope Manage Events
@@ -4958,6 +5258,8 @@ interface SubscriptionPauseScheduledEnvelope {
4958
5258
  }
4959
5259
  /**
4960
5260
  * Triggered when pause subscription requested
5261
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5262
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4961
5263
  * @permissionScope Manage Stores
4962
5264
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4963
5265
  * @permissionScope Manage Events
@@ -4976,6 +5278,8 @@ interface SubscriptionPausedEnvelope {
4976
5278
  }
4977
5279
  /**
4978
5280
  * Triggered when a subscription is paused.
5281
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5282
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4979
5283
  * @permissionScope Manage Stores
4980
5284
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4981
5285
  * @permissionScope Manage Events
@@ -4994,6 +5298,8 @@ interface SubscriptionResumeScheduleCanceledEnvelope {
4994
5298
  }
4995
5299
  /**
4996
5300
  * Triggered when scheduled pause canceled
5301
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5302
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4997
5303
  * @permissionScope Manage Stores
4998
5304
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4999
5305
  * @permissionScope Manage Events
@@ -5012,6 +5318,8 @@ interface SubscriptionResumeScheduledEnvelope {
5012
5318
  }
5013
5319
  /**
5014
5320
  * Triggered when resume subscription requested
5321
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5322
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
5015
5323
  * @permissionScope Manage Stores
5016
5324
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
5017
5325
  * @permissionScope Manage Events
@@ -5030,6 +5338,8 @@ interface SubscriptionResumedEnvelope {
5030
5338
  }
5031
5339
  /**
5032
5340
  * Triggered when a subscription is resumed.
5341
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5342
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
5033
5343
  * @permissionScope Manage Stores
5034
5344
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
5035
5345
  * @permissionScope Manage Events
@@ -5277,20 +5587,38 @@ interface CustomerUpdateBillingDateOptions {
5277
5587
  /** Optional reason for the update. */
5278
5588
  reason?: string | null;
5279
5589
  }
5280
- /**
5281
- * This used only for automation and permitted tenants (QA & testing)
5282
- * @public
5590
+ /** @internal
5283
5591
  * @documentationMaturity preview
5284
- * @requiredField options.tenantId
5285
5592
  * @requiredField subscriptionId
5286
- * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsBackOfficeService.PayCycle
5593
+ * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerChangeSubscription
5287
5594
  */
5288
- declare function payCycle(subscriptionId: string, options?: NonNullablePaths<PayCycleOptions, `tenantId`, 2>): Promise<NonNullablePaths<PayCycleResponse, `invoiceId` | `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8>>;
5289
- interface PayCycleOptions {
5290
- paymentTestMode?: PaymentTestModeWithLiterals;
5291
- /** @format GUID */
5292
- tenantId: string;
5595
+ declare function customerChangeSubscription(subscriptionId: string, options?: CustomerChangeSubscriptionOptions): Promise<NonNullablePaths<CustomerChangeSubscriptionResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
5596
+ __applicationErrorsType?: CustomerChangeSubscriptionApplicationErrors;
5597
+ }>;
5598
+ interface CustomerChangeSubscriptionOptions {
5599
+ /** @maxSize 100 */
5600
+ itemChanges?: SubscriptionItemChange[];
5601
+ newCycle?: Duration;
5602
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
5603
+ }
5604
+ /** @internal
5605
+ * @documentationMaturity preview
5606
+ * @requiredField subscriptionId
5607
+ * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerPreviewChangeSubscription
5608
+ */
5609
+ declare function customerPreviewChangeSubscription(subscriptionId: string, options?: CustomerPreviewChangeSubscriptionOptions): Promise<NonNullablePaths<CustomerPreviewChangeSubscriptionResponse, `preview.current.productId` | `preview.current.productName` | `preview.current.cycle.unit` | `preview.current.quantity` | `preview.current.pricePerUnit` | `preview.current.totalPrice` | `preview.current.currency` | `preview.proration.creditAmount` | `preview.proration.chargeAmount` | `preview.proration.netAmount` | `preview.proration.taxAmount` | `preview.proration.totalAmount` | `preview.proration.remainingSeconds` | `preview.proration.totalCycleSeconds` | `preview.proration.daysAdded` | `preview.proration.action` | `preview.renewalPreview.newPrice` | `preview.renewalPreview.newTotal`, 5>>;
5610
+ interface CustomerPreviewChangeSubscriptionOptions {
5611
+ /** @maxSize 100 */
5612
+ itemChanges?: SubscriptionItemChange[];
5613
+ newCycle?: Duration;
5614
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
5293
5615
  }
5616
+ /** @internal
5617
+ * @documentationMaturity preview
5618
+ * @requiredField subscriptionId
5619
+ * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelPendingChange
5620
+ */
5621
+ declare function customerCancelPendingChange(subscriptionId: string): Promise<NonNullablePaths<CustomerCancelPendingChangeResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate` | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8>>;
5294
5622
  /**
5295
5623
  * Returns a single subscription by its id
5296
5624
  * @public
@@ -5423,6 +5751,8 @@ interface ResumeSubscriptionOptions {
5423
5751
  /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
5424
5752
  resumeAtSchedule?: ScheduleAdditionalInfo;
5425
5753
  actionContext: ActionContext;
5754
+ /** Strategy for resuming a migrated paused subscription when the previous billing date is missing. */
5755
+ missingPreviousBillingDateResumeStrategy?: MissingPreviousBillingDateResumeStrategyWithLiterals;
5426
5756
  }
5427
5757
  /**
5428
5758
  * Lists subscriptions based on specified filters.
@@ -5738,4 +6068,4 @@ interface ListSubscriptionHistoryOptions {
5738
6068
  cursor?: CursorPaging;
5739
6069
  }
5740
6070
 
5741
- export { type AbsorbFeeConfig, type AbsorbFeeConfigValueOneOf, type AccountInfo, type AccountInfoMetadata, type Action, type ActionContext, type ActionDetails, type ActionEvent, ActionInitiator, type ActionInitiatorWithLiterals, ActionType, type ActionTypeWithLiterals, type AddPausePeriodRequest, type AddPausePeriodResponse, type AdditionalFee, AdditionalFeeTrigger, type AdditionalFeeTriggerWithLiterals, type Address, type AddressStreetOneOf, type AggregatedTaxBreakdown, type AllowedActionsOptions, type AllowedActionsRequest, type AllowedActionsResponse, type AmountByStatus, type ApplicationFee, type ApplicationFeeValueOneOf, type AttachInvoice, type AutomaticRetryData, type BaseEventMetadata, type BassToSapiPaypalMigrationRequest, type BassToSapiPaypalMigrationResponse, type BillingSettings, type BillingStatus, type BulkItemChange, type BulkUpdateSubscriptionItemsByFilterRequest, type BulkUpdateSubscriptionItemsByFilterResponse, type BusinessOrigin, type BusinessOriginData, type Cancel, type CancelActionConfiguration, type CancelActionSettings, type CancelPendingChangeRequest, type CancelPendingChangeResponse, type CancelSubscriptionApplicationErrors, type CancelSubscriptionBORequest, type CancelSubscriptionBOResponse, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CancelTimeCapsuleTaskRequest, type CancellationInfo, CancellationInitiator, type CancellationInitiatorWithLiterals, type CatalogReference, ChangeEffectiveTime, type ChangeEffectiveTimeWithLiterals, type ChangePaymentContext, type ChangeSubscriptionRequest, type ChangeSubscriptionResponse, type Charge, CollectionMethod, CollectionMethodEnumCollectionMethod, type CollectionMethodEnumCollectionMethodWithLiterals, type CollectionMethodWithLiterals, type Complete, type ConvertSapiRequest, type ConvertSapiResponse, type CountByStatus, type CountSubscriptionFilter, type CountSubscriptionFilterStatusOneOf, type CountSubscriptionsOptions, type CountSubscriptionsRequest, type CountSubscriptionsResponse, type CreateRecurringInvoiceBORequest, type CreateRecurringInvoiceBOResponse, type CreateSubscriptionForOrderRequest, type CreateSubscriptionForOrderResponse, type CreateSubscriptionInStateRequest, type CreateSubscriptionInStateRequestModeOneOf, type CreateSubscriptionInStateResponse, type CreateSubscriptionRequest, type CreateSubscriptionResponse, CreationMode, type CreationModeWithLiterals, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomBillingSchedule, type CustomProration, type CustomProrationAmountOneOf, type Customer, type CustomerAction, type CustomerActionConfigurationOneOf, type CustomerActionSettings, type CustomerAllowedActionsRequest, type CustomerAllowedActionsResponse, type CustomerCancelConfiguration, type CustomerCancelScheduledPauseApplicationErrors, type CustomerCancelScheduledPauseOptions, type CustomerCancelScheduledPauseRequest, type CustomerCancelScheduledPauseResponse, type CustomerCancelScheduledSkipApplicationErrors, type CustomerCancelScheduledSkipOptions, type CustomerCancelScheduledSkipRequest, type CustomerCancelScheduledSkipResponse, type CustomerCancelSubscriptionApplicationErrors, type CustomerCancelSubscriptionOptions, type CustomerCancelSubscriptionRequest, type CustomerCancelSubscriptionResponse, type CustomerExtendSubscriptionApplicationErrors, type CustomerExtendSubscriptionOptions, type CustomerExtendSubscriptionRequest, type CustomerExtendSubscriptionResponse, type CustomerIdOneOf, type CustomerInitiatePaymentMethodSetupOptions, type CustomerListUpcomingChargesRequest, type CustomerListUpcomingChargesResponse, type CustomerPauseResumeConfiguration, type CustomerPauseSubscriptionApplicationErrors, type CustomerPauseSubscriptionOptions, type CustomerPauseSubscriptionRequest, type CustomerPauseSubscriptionResponse, type CustomerQuerySubscriptionsOptions, type CustomerResumeSubscriptionApplicationErrors, type CustomerResumeSubscriptionOptions, type CustomerResumeSubscriptionRequest, type CustomerResumeSubscriptionResponse, type CustomerSkipConfiguration, type CustomerSkipCycleApplicationErrors, type CustomerSkipCycleOptions, type CustomerSkipCycleRequest, type CustomerSkipCycleResponse, type CustomerTurnOffAutoRenewalRequest, type CustomerTurnOffAutoRenewalResponse, type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors, type CustomerTurnOffSubscriptionAutoRenewalOptions, type CustomerTurnOnAutoRenewalRequest, type CustomerTurnOnAutoRenewalResponse, type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors, type CustomerTurnOnSubscriptionAutoRenewalOptions, type CustomerUpdateBillingDateApplicationErrors, type CustomerUpdateBillingDateConfiguration, type CustomerUpdateBillingDateOptions, type CustomerUpdateBillingDateRequest, type CustomerUpdateBillingDateResponse, type Cycles, type DeleteDraftSubscriptionRequest, type DeleteDraftSubscriptionResponse, type DeleteSubscriptionBORequest, type DeleteSubscriptionBOResponse, type DeleteSubscriptionRequest, type DeleteSubscriptionResponse, type DetachInvoice, type Discount, type DiscountCycles, type DiscountOrigin, type DiscountValueOneOf, type DomainEvent, type DomainEventBodyOneOf, type Duration, DurationUnit, type DurationUnitWithLiterals, type DynamicTax, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, ExtendPolicyType, type ExtendPolicyTypeWithLiterals, type ExtendSubscriptionApplicationErrors, type ExtendSubscriptionOptions, type ExtendSubscriptionOptionsExtendPolicyOneOf, type ExtendSubscriptionRequest, type ExtendSubscriptionRequestExtendPolicyOneOf, type ExtendSubscriptionResponse, type ExternalCollectionDetails, type ExternalPrice, type ExternalPriceConfig, type FinishFreeTrialNowRequest, type FinishFreeTrialNowResponse, type FixSubscriptionInvoicesConsistencyRequest, type FixSubscriptionInvoicesConsistencyResponse, type FixSubscriptionInvoicesRequest, type FixSubscriptionInvoicesRequestModeOneOf, type FixSubscriptionInvoicesResponse, type FixSubscriptionTimeCapsuleTasksRequest, type FixSubscriptionTimeCapsuleTasksResponse, type FixedAmountFee, type FixedPrice, type FixedPriceConfig, type FreeTrailEnded, type FreeTrailStarted, type FreeTrialData, type FullAddressContactDetails, type FullAddressDetails, type FuturePriceUpdatesRequested, type FutureUpdatesRequested, type GetFullSubscriptionDataRequest, type GetFullSubscriptionDataResponse, type GetSubscriptionAndInternalDataRequest, type GetSubscriptionAndInternalDataResponse, type GetSubscriptionInvoicesRequest, type GetSubscriptionInvoicesResponse, type GetSubscriptionRequest, type GetSubscriptionResponse, type GetSubscriptionsStatsRequest, type GetSubscriptionsStatsResponse, type GracePeriodData, type GracePeriodEnded, type GracePeriodStarted, type HandleSubscriptionAfterInvoiceMarkedAsPaidRequest, HistoryActionInitiator, type HistoryActionInitiatorWithLiterals, HistoryViewMode, type HistoryViewModeWithLiterals, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type InitiatePaymentMethodSetupOptions, type InitiatePaymentMethodSetupRequest, type InitiatePaymentMethodSetupResponse, type InitiatedPaymentMethodSetup, type InternalSubscriptionData, type Invoice, type InvoiceAction, type InvoiceActionActionTypeOneOf, type InvoiceApplicationFee, type InvoiceApplicationFeeValueOneOf, type InvoiceDiscount, type InvoiceDiscountValueOneOf, type InvoiceItem, type InvoiceItemPaymentTypeOneOf, type InvoiceItemPricingModelOneOf, type InvoicePlatformFee, type InvoicePlatformFeeFeeModelOneOf, type InvoiceShippingCharges, InvoiceStatus, type InvoiceStatusWithLiterals, type Item, ItemCategory, type ItemCategoryWithLiterals, type ItemChange, type ItemTaxData, type LatestInvoiceMarkedAsPaid, type LatestPaymentAttempt, type LineItemTaxSummary, type ListSubscriptionHistoryOptions, type ListSubscriptionHistoryRequest, type ListSubscriptionHistoryResponse, type ListUpcomingChargesOptions, type ListUpcomingChargesRequest, type ListUpcomingChargesResponse, type MarkBillingCycleAsPaidApplicationErrors, type MarkBillingCycleAsPaidOptions, type MarkBillingCycleAsPaidRequest, type MarkBillingCycleAsPaidResponse, type MarkLatestInvoiceAsPaidApplicationErrors, type MarkLatestInvoiceAsPaidRequest, type MarkLatestInvoiceAsPaidResponse, type MessageEnvelope, type MigrationDetails, type Money, type MultipleSubscriptionsOnOrdersInvoice, type OneTime, OrderMethod, type OrderMethodWithLiterals, type Origin, type OriginOverride, type Paging, type PagingMetadataV2, type PassOnFeeConfig, type PassOnFeeConfigValueOneOf, type PatchSubscriptionRequest, type PatchSubscriptionResponse, PauseAt, type PauseAtWithLiterals, type PauseInfo, type PausePeriod, PausePolicy, type PausePolicyWithLiterals, type PauseResumeActionConfiguration, type PauseResumeActionSettings, type PauseSubscriptionApplicationErrors, type PauseSubscriptionBORequest, type PauseSubscriptionBOResponse, type PauseSubscriptionOptions, type PauseSubscriptionRequest, type PauseSubscriptionRequested, type PauseSubscriptionResponse, type PayCycleOptions, type PayCycleRequest, type PayCycleResponse, type PayRecurringInvoice, PaymentAttemptStatus, type PaymentAttemptStatusWithLiterals, type PaymentData, type PaymentMethod, type PaymentMethodUpdated, PaymentMode, type PaymentModeWithLiterals, type PaymentOrigin, type PaymentSettings, PaymentSettlementMethod, type PaymentSettlementMethodWithLiterals, PaymentStatus, PaymentStatusEnumPaymentStatus, type PaymentStatusEnumPaymentStatusWithLiterals, type PaymentStatusWithLiterals, type PaymentTaxData, PaymentTestMode, type PaymentTestModeWithLiterals, type PercentageFee, type PlatformOrigin, type PreviewChangeSubscriptionRequest, type PreviewChangeSubscriptionResponse, type PreviewSubscriptionChargesOptions, type PreviewSubscriptionChargesOptionsSubscriptionOneOf, type PreviewSubscriptionChargesRequest, type PreviewSubscriptionChargesRequestSubscriptionOneOf, type PreviewSubscriptionChargesResponse, type PreviewSubscriptionsChargesOptions, type PreviewSubscriptionsChargesRequest, type PreviewSubscriptionsChargesResponse, type PriceAdjustment, type PriceAdjustmentAdjustmentTypeOneOf, PriceAdjustmentReason, type PriceAdjustmentReasonWithLiterals, type PriceAdjustmentValue, type PriceAdjustmentValueAdjustmentValueTypeOneOf, type PriceDetails, type PricingModel, type PricingModelModelOneOf, type Proration, ProrationAction, type ProrationActionWithLiterals, ProrationBehavior, type ProrationBehaviorWithLiterals, type ProrationPreview, type ProrationResult, type ProrationTypeOneOf, type QuerySubscriptionsRequest, type QuerySubscriptionsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type Recurring, type RedirectUrls, type Refund, type RefundInfo, RefundReason, type RefundReasonWithLiterals, type RemoveCancellationInfoRequest, type RemoveCancellationInfoResponse, type RemovePauseInfoRequest, type RemovePauseInfoResponse, type RenewalPreview, RequestedFields, type RequestedFieldsWithLiterals, type Reschedule, type ResetPendingUpdates, type RestoreDraftSubscriptionRequest, type RestoreDraftSubscriptionResponse, type RestoreInfo, ResumeAt, type ResumeAtWithLiterals, type ResumeSubscriptionApplicationErrors, type ResumeSubscriptionOptions, type ResumeSubscriptionRequest, type ResumeSubscriptionRequested, type ResumeSubscriptionResponse, type ReviseSubscriptionOptions, type ReviseSubscriptionRequest, type ReviseSubscriptionResponse, RevivePolicy, type RevivePolicyWithLiterals, type ReviveSubscriptionRequest, type ReviveSubscriptionResponse, type RunTimeCapsuleTaskNowRequest, type ScheduleAdditionalInfo, type ScheduleAdditionalInfoParamOneOf, type ScheduleTimeCapsuleTaskRequest, type ScheduledPauseCanceled, type ScheduledResumeCanceled, type SearchSubscriptionRequest, type SearchSubscriptionResponse, type SearchSubscriptionsOptions, type SearchSubscriptionsOptionsPagingMethodOneOf, type SearchSubscriptionsRequest, type SearchSubscriptionsRequestPagingMethodOneOf, type SearchSubscriptionsResponse, type SendSubscriptionActionEventBORequest, type SendSubscriptionActionEventBORequestEventOneOf, type SendSubscriptionActionEventResponse, type SendTimeCapsuleTaskCanceledBIRequest, type SetIsMigratedEvent, type SetShiftingDataRequest, type SetShiftingDataResponse, type ShippingCharges, type SkipActionConfiguration, type SkipActionSettings, SortOrder, type SortOrderWithLiterals, type Sorting, type SortingClauses, type SpecificDateSubscriptionUpdateData, Status, type StatusWithLiterals, type StreetAddress, type Subscriber, type Subscription, type SubscriptionActivated, type SubscriptionAutoRenewalTurnedOff, type SubscriptionAutoRenewalTurnedOffEnvelope, type SubscriptionAutoRenewalTurnedOn, type SubscriptionAutoRenewalTurnedOnEnvelope, type SubscriptionBackOfficeAction, type SubscriptionBillingCyclePaid, type SubscriptionBillingCycleStarted, type SubscriptionBillingDateUpdated, type SubscriptionBillingDateUpdatedEnvelope, type SubscriptionBillingDetails, type SubscriptionCanceled, type SubscriptionCanceledEnvelope, type SubscriptionCancellationRequested, type SubscriptionChangeSummary, type SubscriptionCharge, type SubscriptionCharges, type SubscriptionCollectionMethodUpdated, type SubscriptionCreated, type SubscriptionCycleReadyToPay, type SubscriptionCycleTriggered, type SubscriptionDelayedSyncEvent, type SubscriptionDeleted, type SubscriptionDiff, type SubscriptionEnded, type SubscriptionEvent, type SubscriptionEventPayloadOneOf, type SubscriptionExpired, type SubscriptionExtended, type SubscriptionExtendedEnvelope, type SubscriptionExtendedExtendPolicyOneOf, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionHistoryEntry, type SubscriptionInfo, type SubscriptionInitialPurchaseCompleted, type SubscriptionInvoice, type SubscriptionItemChange, type SubscriptionLatestInvoiceMarkedAsPaidEnvelope, type SubscriptionMarkedAsPaid, type SubscriptionPauseScheduleCanceledEnvelope, type SubscriptionPauseScheduledEnvelope, type SubscriptionPaused, type SubscriptionPausedEnvelope, type SubscriptionPolicies, type SubscriptionPolicy, type SubscriptionResumeScheduleCanceledEnvelope, type SubscriptionResumeScheduledEnvelope, type SubscriptionResumed, type SubscriptionResumedEnvelope, type SubscriptionRevived, type SubscriptionStatus, SubscriptionStatusEnumSubscriptionStatus, type SubscriptionStatusEnumSubscriptionStatusWithLiterals, SubscriptionStatusGroup, type SubscriptionStatusGroupWithLiterals, type SubscriptionSuspended, type SubscriptionTrialPeriod, SubscriptionType, type SubscriptionTypeWithLiterals, type SubscriptionUpdateData, type SubscriptionUpdated, type SubscriptionUpdatedEnvelope, type Suspension, type Task, type TaskAction, type TaskActionActionOneOf, type TaskKey, type Tax, type TaxBreakdown, type TaxData, type TaxSettings, type TaxSummary, type TaxValueOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TimeBasedProration, type Totals, type TurnOffSubscriptionAutoRenewalApplicationErrors, type TurnOffSubscriptionAutoRenewalRequest, type TurnOffSubscriptionAutoRenewalResponse, type TurnOnSubscriptionAutoRenewalApplicationErrors, type TurnOnSubscriptionAutoRenewalRequest, type TurnOnSubscriptionAutoRenewalResponse, type UnknownSubscriptionEvent, type UnsupportedAction, type UnsupportedReason, UpdateAction, type UpdateActionWithLiterals, type UpdateBillingDateActionConfiguration, type UpdateBillingDateActionSettings, type UpdateBillingDateData, type UpdateFullSubscriptionRequest, type UpdateFullSubscriptionResponse, type UpdatePausePaidDurationRequest, type UpdatePausePaidDurationResponse, type UpdatePaymentMethodBORequest, type UpdatePaymentMethodBOResponse, type UpdatePaymentStatusRequest, type UpdatePaymentStatusResponse, type UpdateStatusRequest, type UpdateStatusResponse, type UpdateSubscriptionBillingDateApplicationErrors, type UpdateSubscriptionBillingDateOptions, type UpdateSubscriptionBillingDateRequest, type UpdateSubscriptionBillingDateResponse, type UpdateSubscriptionCurrencyRequest, type UpdateSubscriptionCurrencyResponse, type UpdateSubscriptionInvoiceCycleRequest, type UpdateSubscriptionInvoiceCycleResponse, type UpdateSubscriptionItemsRequest, type UpdateSubscriptionItemsResponse, type UpdateSubscriptionOriginRequest, type UpdateSubscriptionOriginResponse, type UpdateSubscriptionPaymentMethodRequest, type UpdateSubscriptionPaymentMethodResponse, type UpdateSubscriptionPlatformOriginRequest, type UpdateSubscriptionPlatformOriginResponse, type UpdateSubscriptionPoliciesRequest, type UpdateSubscriptionPoliciesResponse, type UpdateSubscriptionRequest, type UpdateSubscriptionResponse, type UpdateSubscriptionStartDateRequest, type UpdateSubscriptionStartDateResponse, type UpdatesApplied, type UpmActionSettings, type V1Duration, type V1Subscription, type V1SubscriptionActivated, type V1SubscriptionCanceled, type V1SubscriptionCreated, type V1SubscriptionEvent, type V1SubscriptionEventEventOneOf, type V1SubscriptionInitialPurchaseCompleted, type V1SubscriptionResumed, V1SubscriptionStatusEnumSubscriptionStatus, type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals, type V1SubscriptionUpdated, type V2Subscription, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, allowedActions, cancelSubscription, countSubscriptions, customerAllowedActions, customerCancelScheduledPause, customerCancelScheduledSkip, customerCancelSubscription, customerExtendSubscription, customerGetSubscription, customerInitiatePaymentMethodSetup, customerListUpcomingCharges, customerPauseSubscription, customerQuerySubscriptions, customerResumeSubscription, customerSkipCycle, customerTurnOffSubscriptionAutoRenewal, customerTurnOnSubscriptionAutoRenewal, customerUpdateBillingDate, customerUpdateSubscriptionPaymentMethod, extendSubscription, getSubscription, getSubscriptionsStats, initiatePaymentMethodSetup, listSubscriptionHistory, listUpcomingCharges, markBillingCycleAsPaid, markLatestInvoiceAsPaid, onSubscriptionAutoRenewalTurnedOff, onSubscriptionAutoRenewalTurnedOn, onSubscriptionBillingDateUpdated, onSubscriptionCanceled, onSubscriptionExtended, onSubscriptionLatestInvoiceMarkedAsPaid, onSubscriptionPauseScheduleCanceled, onSubscriptionPauseScheduled, onSubscriptionPaused, onSubscriptionResumeScheduleCanceled, onSubscriptionResumeScheduled, onSubscriptionResumed, onSubscriptionUpdated, pauseSubscription, payCycle, previewSubscriptionCharges, previewSubscriptionsCharges, querySubscriptions, resumeSubscription, reviseSubscription, searchSubscriptions, turnOffSubscriptionAutoRenewal, turnOnSubscriptionAutoRenewal, updateSubscriptionBillingDate, updateSubscriptionPaymentMethod };
6071
+ export { type AbsorbFeeConfig, type AbsorbFeeConfigValueOneOf, type AccountInfo, type AccountInfoMetadata, type Action, type ActionContext, type ActionDetails, type ActionEvent, ActionInitiator, type ActionInitiatorWithLiterals, ActionType, type ActionTypeWithLiterals, type AddPausePeriodRequest, type AddPausePeriodResponse, type AdditionalFee, AdditionalFeeTrigger, type AdditionalFeeTriggerWithLiterals, type Address, type AddressLocation, type AddressStreetOneOf, type AggregatedTaxBreakdown, type AllowedActionsOptions, type AllowedActionsRequest, type AllowedActionsResponse, type AmountByStatus, type ApplicationFee, type ApplicationFeeValueOneOf, type AttachInvoice, type AutomaticRetryData, type BaseEventMetadata, type BassToSapiPaypalMigrationRequest, type BassToSapiPaypalMigrationResponse, type BillingSettings, type BillingStatus, type BulkItemChange, type BulkUpdateSubscriptionItemsByFilterRequest, type BulkUpdateSubscriptionItemsByFilterResponse, type BusinessOrigin, type BusinessOriginData, type Cancel, type CancelActionConfiguration, type CancelActionSettings, type CancelPendingChangeRequest, type CancelPendingChangeResponse, type CancelSubscriptionApplicationErrors, type CancelSubscriptionBORequest, type CancelSubscriptionBOResponse, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CancelTimeCapsuleTaskRequest, type CancellationInfo, CancellationInitiator, type CancellationInitiatorWithLiterals, type CatalogReference, type ChangeContext, ChangeEffectiveTime, type ChangeEffectiveTimeWithLiterals, type ChangePaymentContext, type ChangeSubscriptionForOrderRequest, type ChangeSubscriptionForOrderResponse, type ChangeSubscriptionRequest, type ChangeSubscriptionResponse, ChangeType, type ChangeTypeWithLiterals, type Charge, CollectionMethod, CollectionMethodEnumCollectionMethod, type CollectionMethodEnumCollectionMethodWithLiterals, type CollectionMethodWithLiterals, type Complete, type ConvertSapiRequest, type ConvertSapiResponse, type CountByStatus, type CountSubscriptionFilter, type CountSubscriptionFilterStatusOneOf, type CountSubscriptionsOptions, type CountSubscriptionsRequest, type CountSubscriptionsResponse, type CreateRecurringInvoiceBORequest, type CreateRecurringInvoiceBOResponse, type CreateSubscriptionForOrderRequest, type CreateSubscriptionForOrderResponse, type CreateSubscriptionInStateRequest, type CreateSubscriptionInStateRequestModeOneOf, type CreateSubscriptionInStateResponse, type CreateSubscriptionRequest, type CreateSubscriptionResponse, CreationMode, type CreationModeWithLiterals, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomBillingSchedule, type CustomProration, type CustomProrationAmountOneOf, type Customer, type CustomerAction, type CustomerActionConfigurationOneOf, type CustomerActionCounters, type CustomerActionSettings, type CustomerAllowedActionsRequest, type CustomerAllowedActionsResponse, type CustomerCancelConfiguration, type CustomerCancelPendingChangeRequest, type CustomerCancelPendingChangeResponse, type CustomerCancelScheduledPauseApplicationErrors, type CustomerCancelScheduledPauseOptions, type CustomerCancelScheduledPauseRequest, type CustomerCancelScheduledPauseResponse, type CustomerCancelScheduledSkipApplicationErrors, type CustomerCancelScheduledSkipOptions, type CustomerCancelScheduledSkipRequest, type CustomerCancelScheduledSkipResponse, type CustomerCancelSubscriptionApplicationErrors, type CustomerCancelSubscriptionOptions, type CustomerCancelSubscriptionRequest, type CustomerCancelSubscriptionResponse, type CustomerChangeSubscriptionApplicationErrors, type CustomerChangeSubscriptionOptions, type CustomerChangeSubscriptionRequest, type CustomerChangeSubscriptionResponse, type CustomerExtendSubscriptionApplicationErrors, type CustomerExtendSubscriptionOptions, type CustomerExtendSubscriptionRequest, type CustomerExtendSubscriptionResponse, type CustomerIdOneOf, type CustomerInitiatePaymentMethodSetupOptions, type CustomerListUpcomingChargesRequest, type CustomerListUpcomingChargesResponse, type CustomerPauseResumeConfiguration, type CustomerPauseSubscriptionApplicationErrors, type CustomerPauseSubscriptionOptions, type CustomerPauseSubscriptionRequest, type CustomerPauseSubscriptionResponse, type CustomerPreviewChangeSubscriptionOptions, type CustomerPreviewChangeSubscriptionRequest, type CustomerPreviewChangeSubscriptionResponse, type CustomerQuerySubscriptionsOptions, type CustomerResumeSubscriptionApplicationErrors, type CustomerResumeSubscriptionOptions, type CustomerResumeSubscriptionRequest, type CustomerResumeSubscriptionResponse, type CustomerSkipConfiguration, type CustomerSkipCycleApplicationErrors, type CustomerSkipCycleOptions, type CustomerSkipCycleRequest, type CustomerSkipCycleResponse, type CustomerTurnOffAutoRenewalRequest, type CustomerTurnOffAutoRenewalResponse, type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors, type CustomerTurnOffSubscriptionAutoRenewalOptions, type CustomerTurnOnAutoRenewalRequest, type CustomerTurnOnAutoRenewalResponse, type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors, type CustomerTurnOnSubscriptionAutoRenewalOptions, type CustomerUpdateBillingDateApplicationErrors, type CustomerUpdateBillingDateConfiguration, type CustomerUpdateBillingDateOptions, type CustomerUpdateBillingDateRequest, type CustomerUpdateBillingDateResponse, type Cycles, type DeleteDraftSubscriptionRequest, type DeleteDraftSubscriptionResponse, type DeleteSubscriptionBORequest, type DeleteSubscriptionBOResponse, type DeleteSubscriptionRequest, type DeleteSubscriptionResponse, type DetachInvoice, type Discount, type DiscountCycles, type DiscountOrigin, type DiscountValueOneOf, type DomainEvent, type DomainEventBodyOneOf, type Duration, DurationUnit, type DurationUnitWithLiterals, type DynamicTax, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, ExtendPolicyType, type ExtendPolicyTypeWithLiterals, type ExtendSubscriptionApplicationErrors, type ExtendSubscriptionOptions, type ExtendSubscriptionOptionsExtendPolicyOneOf, type ExtendSubscriptionRequest, type ExtendSubscriptionRequestExtendPolicyOneOf, type ExtendSubscriptionResponse, type ExternalCollectionDetails, type ExternalPrice, type ExternalPriceConfig, type FinishFreeTrialNowRequest, type FinishFreeTrialNowResponse, type FixSubscriptionInvoicesConsistencyRequest, type FixSubscriptionInvoicesConsistencyResponse, type FixSubscriptionInvoicesRequest, type FixSubscriptionInvoicesRequestModeOneOf, type FixSubscriptionInvoicesResponse, type FixSubscriptionPaymentStatusRequest, type FixSubscriptionPaymentStatusResponse, type FixSubscriptionTimeCapsuleTasksRequest, type FixSubscriptionTimeCapsuleTasksResponse, type FixedAmountFee, type FixedPrice, type FixedPriceConfig, type FreeTrailEnded, type FreeTrailStarted, type FreeTrialData, type FullAddressContactDetails, type FullAddressDetails, type FuturePriceUpdatesRequested, type FutureUpdatesRequested, type GetFullSubscriptionDataRequest, type GetFullSubscriptionDataResponse, type GetSubscriptionAndInternalDataRequest, type GetSubscriptionAndInternalDataResponse, type GetSubscriptionInvoicesRequest, type GetSubscriptionInvoicesResponse, type GetSubscriptionRequest, type GetSubscriptionResponse, type GetSubscriptionsStatsRequest, type GetSubscriptionsStatsResponse, type GracePeriodData, type GracePeriodEnded, type GracePeriodStarted, type HandleSubscriptionAfterInvoiceMarkedAsPaidRequest, HistoryActionInitiator, type HistoryActionInitiatorWithLiterals, HistoryViewMode, type HistoryViewModeWithLiterals, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type InitiatePaymentMethodSetupOptions, type InitiatePaymentMethodSetupRequest, type InitiatePaymentMethodSetupResponse, type InitiatedPaymentMethodSetup, type InternalSubscriptionData, type Invoice, type InvoiceAction, type InvoiceActionActionTypeOneOf, type InvoiceApplicationFee, type InvoiceApplicationFeeValueOneOf, type InvoiceDiscount, type InvoiceDiscountValueOneOf, type InvoiceItem, type InvoiceItemPaymentTypeOneOf, type InvoiceItemPricingModelOneOf, type InvoicePlatformFee, type InvoicePlatformFeeFeeModelOneOf, type InvoiceShippingCharges, InvoiceStatus, type InvoiceStatusWithLiterals, type Item, ItemCategory, type ItemCategoryWithLiterals, type ItemChange, type ItemTaxData, type LatestInvoiceMarkedAsPaid, type LatestPaymentAttempt, type LineItemTaxSummary, type ListSubscriptionHistoryOptions, type ListSubscriptionHistoryRequest, type ListSubscriptionHistoryResponse, type ListUpcomingChargesOptions, type ListUpcomingChargesRequest, type ListUpcomingChargesResponse, type MarkBillingCycleAsPaidApplicationErrors, type MarkBillingCycleAsPaidOptions, type MarkBillingCycleAsPaidRequest, type MarkBillingCycleAsPaidResponse, type MarkLatestInvoiceAsPaidApplicationErrors, type MarkLatestInvoiceAsPaidRequest, type MarkLatestInvoiceAsPaidResponse, type MessageEnvelope, type MigrationDetails, MissingPreviousBillingDateResumeStrategy, type MissingPreviousBillingDateResumeStrategyWithLiterals, type Money, type MultipleSubscriptionsOnOrdersInvoice, type OneTime, OrderMethod, type OrderMethodWithLiterals, type Origin, type OriginOverride, type Paging, type PagingMetadataV2, type PassOnFeeConfig, type PassOnFeeConfigValueOneOf, type PatchSubscriptionRequest, type PatchSubscriptionResponse, PauseAt, type PauseAtWithLiterals, type PauseInfo, type PausePeriod, PausePolicy, type PausePolicyWithLiterals, type PauseResumeActionConfiguration, type PauseResumeActionSettings, type PauseSubscriptionApplicationErrors, type PauseSubscriptionBORequest, type PauseSubscriptionBOResponse, type PauseSubscriptionOptions, type PauseSubscriptionRequest, type PauseSubscriptionRequested, type PauseSubscriptionResponse, type PayCycleRequest, type PayCycleResponse, type PayRecurringInvoice, PaymentAttemptStatus, type PaymentAttemptStatusWithLiterals, type PaymentData, type PaymentMethod, type PaymentMethodUpdated, PaymentMode, type PaymentModeWithLiterals, type PaymentOrigin, type PaymentSettings, PaymentSettlementMethod, type PaymentSettlementMethodWithLiterals, PaymentStatus, PaymentStatusEnumPaymentStatus, type PaymentStatusEnumPaymentStatusWithLiterals, type PaymentStatusWithLiterals, type PaymentTaxData, PaymentTestMode, type PaymentTestModeWithLiterals, type PercentageFee, type PlatformOrigin, type PreviewChangeSubscriptionRequest, type PreviewChangeSubscriptionResponse, type PreviewSubscriptionChargesOptions, type PreviewSubscriptionChargesOptionsSubscriptionOneOf, type PreviewSubscriptionChargesRequest, type PreviewSubscriptionChargesRequestSubscriptionOneOf, type PreviewSubscriptionChargesResponse, type PreviewSubscriptionsChargesOptions, type PreviewSubscriptionsChargesRequest, type PreviewSubscriptionsChargesResponse, type PriceAdjustment, type PriceAdjustmentAdjustmentTypeOneOf, PriceAdjustmentReason, type PriceAdjustmentReasonWithLiterals, type PriceAdjustmentValue, type PriceAdjustmentValueAdjustmentValueTypeOneOf, type PriceDetails, type PricingModel, type PricingModelModelOneOf, type Proration, ProrationAction, type ProrationActionWithLiterals, ProrationBehavior, ProrationBehaviorEnumProrationBehavior, type ProrationBehaviorEnumProrationBehaviorWithLiterals, type ProrationBehaviorWithLiterals, type ProrationPreview, type ProrationResult, type ProrationTypeOneOf, type QuerySubscriptionsRequest, type QuerySubscriptionsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type Recurring, type RedirectUrls, type Refund, type RefundInfo, RefundReason, type RefundReasonWithLiterals, type RemoveCancellationInfoRequest, type RemoveCancellationInfoResponse, type RemovePauseInfoRequest, type RemovePauseInfoResponse, type RenewalPreview, RequestedFields, type RequestedFieldsWithLiterals, type Reschedule, type ResetPendingUpdates, type RestoreDraftSubscriptionRequest, type RestoreDraftSubscriptionResponse, type RestoreInfo, ResumeAt, type ResumeAtWithLiterals, type ResumeSubscriptionApplicationErrors, type ResumeSubscriptionOptions, type ResumeSubscriptionRequest, type ResumeSubscriptionRequested, type ResumeSubscriptionResponse, type ReviseSubscriptionOptions, type ReviseSubscriptionRequest, type ReviseSubscriptionResponse, RevivePolicy, type RevivePolicyWithLiterals, type ReviveSubscriptionRequest, type ReviveSubscriptionResponse, type RunTimeCapsuleTaskNowRequest, type ScheduleAdditionalInfo, type ScheduleAdditionalInfoParamOneOf, type ScheduleTimeCapsuleTaskRequest, type ScheduledPauseCanceled, type ScheduledResumeCanceled, type SearchSubscriptionRequest, type SearchSubscriptionResponse, type SearchSubscriptionsOptions, type SearchSubscriptionsOptionsPagingMethodOneOf, type SearchSubscriptionsRequest, type SearchSubscriptionsRequestPagingMethodOneOf, type SearchSubscriptionsResponse, type SendSubscriptionActionEventBORequest, type SendSubscriptionActionEventBORequestEventOneOf, type SendSubscriptionActionEventResponse, type SendTimeCapsuleTaskCanceledBIRequest, type SetIsMigratedEvent, type SetShiftingDataRequest, type SetShiftingDataResponse, type ShippingCharges, type SkipActionConfiguration, type SkipActionSettings, SortOrder, type SortOrderWithLiterals, type Sorting, type SortingClauses, type SpecificDateSubscriptionUpdateData, Status, type StatusWithLiterals, type StreetAddress, type Subscriber, type Subscription, type SubscriptionActivated, type SubscriptionAutoRenewalTurnedOff, type SubscriptionAutoRenewalTurnedOffEnvelope, type SubscriptionAutoRenewalTurnedOn, type SubscriptionAutoRenewalTurnedOnEnvelope, type SubscriptionBackOfficeAction, type SubscriptionBillingCyclePaid, type SubscriptionBillingCycleStarted, type SubscriptionBillingDateUpdated, type SubscriptionBillingDateUpdatedEnvelope, type SubscriptionBillingDetails, type SubscriptionCanceled, type SubscriptionCanceledEnvelope, type SubscriptionCancellationRequested, type SubscriptionChangeSummary, type SubscriptionCharge, type SubscriptionCharges, type SubscriptionCollectionMethodUpdated, type SubscriptionCreated, type SubscriptionCycleReadyToPay, type SubscriptionCycleTriggered, type SubscriptionDelayedSyncEvent, type SubscriptionDeleted, type SubscriptionDiff, type SubscriptionEnded, type SubscriptionEvent, type SubscriptionEventPayloadOneOf, type SubscriptionExpired, type SubscriptionExtended, type SubscriptionExtendedEnvelope, type SubscriptionExtendedExtendPolicyOneOf, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionHistoryEntry, type SubscriptionInfo, type SubscriptionInitialPurchaseCompleted, type SubscriptionInvoice, type SubscriptionItemChange, type SubscriptionLatestInvoiceMarkedAsPaidEnvelope, type SubscriptionMarkedAsPaid, type SubscriptionOfflinePurchaseCompleted, type SubscriptionPauseScheduleCanceledEnvelope, type SubscriptionPauseScheduledEnvelope, type SubscriptionPaused, type SubscriptionPausedEnvelope, type SubscriptionPolicies, type SubscriptionPolicy, type SubscriptionResumeScheduleCanceledEnvelope, type SubscriptionResumeScheduledEnvelope, type SubscriptionResumed, type SubscriptionResumedEnvelope, type SubscriptionRevived, type SubscriptionStatus, SubscriptionStatusEnumSubscriptionStatus, type SubscriptionStatusEnumSubscriptionStatusWithLiterals, SubscriptionStatusGroup, type SubscriptionStatusGroupWithLiterals, type SubscriptionSuspended, type SubscriptionTrialPeriod, SubscriptionType, type SubscriptionTypeWithLiterals, type SubscriptionUpdateData, type SubscriptionUpdated, type SubscriptionUpdatedEnvelope, type Suspension, type Task, type TaskAction, type TaskActionActionOneOf, type TaskKey, type Tax, type TaxBreakdown, type TaxData, type TaxSettings, type TaxSummary, type TaxValueOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TimeBasedProration, type Totals, type TurnOffSubscriptionAutoRenewalApplicationErrors, type TurnOffSubscriptionAutoRenewalRequest, type TurnOffSubscriptionAutoRenewalResponse, type TurnOnSubscriptionAutoRenewalApplicationErrors, type TurnOnSubscriptionAutoRenewalRequest, type TurnOnSubscriptionAutoRenewalResponse, type UnknownSubscriptionEvent, type UnsupportedAction, type UnsupportedReason, UpdateAction, type UpdateActionWithLiterals, type UpdateBillingDateActionConfiguration, type UpdateBillingDateActionSettings, type UpdateBillingDateData, type UpdateFullSubscriptionRequest, type UpdateFullSubscriptionResponse, type UpdatePausePaidDurationRequest, type UpdatePausePaidDurationResponse, type UpdatePaymentMethodBORequest, type UpdatePaymentMethodBOResponse, type UpdatePaymentStatusRequest, type UpdatePaymentStatusResponse, type UpdateStatusRequest, type UpdateStatusResponse, type UpdateSubscriptionBillingDateApplicationErrors, type UpdateSubscriptionBillingDateOptions, type UpdateSubscriptionBillingDateRequest, type UpdateSubscriptionBillingDateResponse, type UpdateSubscriptionCurrencyRequest, type UpdateSubscriptionCurrencyResponse, type UpdateSubscriptionInvoiceCycleRequest, type UpdateSubscriptionInvoiceCycleResponse, type UpdateSubscriptionItemsRequest, type UpdateSubscriptionItemsResponse, type UpdateSubscriptionOriginRequest, type UpdateSubscriptionOriginResponse, type UpdateSubscriptionPaymentMethodRequest, type UpdateSubscriptionPaymentMethodResponse, type UpdateSubscriptionPlatformOriginRequest, type UpdateSubscriptionPlatformOriginResponse, type UpdateSubscriptionPoliciesRequest, type UpdateSubscriptionPoliciesResponse, type UpdateSubscriptionRequest, type UpdateSubscriptionResponse, type UpdateSubscriptionStartDateRequest, type UpdateSubscriptionStartDateResponse, type UpdatesApplied, type UpmActionSettings, type V1Duration, type V1ProrationResult, type V1Subscription, type V1SubscriptionActivated, type V1SubscriptionCanceled, type V1SubscriptionCreated, type V1SubscriptionEvent, type V1SubscriptionEventEventOneOf, type V1SubscriptionInitialPurchaseCompleted, type V1SubscriptionResumed, V1SubscriptionStatusEnumSubscriptionStatus, type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals, type V1SubscriptionUpdated, type V2Subscription, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, allowedActions, cancelSubscription, countSubscriptions, customerAllowedActions, customerCancelPendingChange, customerCancelScheduledPause, customerCancelScheduledSkip, customerCancelSubscription, customerChangeSubscription, customerExtendSubscription, customerGetSubscription, customerInitiatePaymentMethodSetup, customerListUpcomingCharges, customerPauseSubscription, customerPreviewChangeSubscription, customerQuerySubscriptions, customerResumeSubscription, customerSkipCycle, customerTurnOffSubscriptionAutoRenewal, customerTurnOnSubscriptionAutoRenewal, customerUpdateBillingDate, customerUpdateSubscriptionPaymentMethod, extendSubscription, getSubscription, getSubscriptionsStats, initiatePaymentMethodSetup, listSubscriptionHistory, listUpcomingCharges, markBillingCycleAsPaid, markLatestInvoiceAsPaid, onSubscriptionAutoRenewalTurnedOff, onSubscriptionAutoRenewalTurnedOn, onSubscriptionBillingDateUpdated, onSubscriptionCanceled, onSubscriptionExtended, onSubscriptionLatestInvoiceMarkedAsPaid, onSubscriptionPauseScheduleCanceled, onSubscriptionPauseScheduled, onSubscriptionPaused, onSubscriptionResumeScheduleCanceled, onSubscriptionResumeScheduled, onSubscriptionResumed, onSubscriptionUpdated, pauseSubscription, previewSubscriptionCharges, previewSubscriptionsCharges, querySubscriptions, resumeSubscription, reviseSubscription, searchSubscriptions, turnOffSubscriptionAutoRenewal, turnOnSubscriptionAutoRenewal, updateSubscriptionBillingDate, updateSubscriptionPaymentMethod };