@wix/auto_sdk_subscription_subscriptions 1.0.46 → 1.0.48

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 +197 -222
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1962 -1734
  5. package/build/cjs/index.typings.js +153 -171
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +1933 -1722
  8. package/build/cjs/meta.js +143 -146
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +3 -11
  11. package/build/es/index.mjs +194 -221
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1962 -1734
  14. package/build/es/index.typings.mjs +150 -170
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +1933 -1722
  17. package/build/es/meta.mjs +140 -145
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +3 -11
  20. package/build/internal/cjs/index.typings.d.ts +2021 -1732
  21. package/build/internal/cjs/meta.d.ts +1875 -1552
  22. package/build/internal/es/index.d.mts +3 -11
  23. package/build/internal/es/index.typings.d.mts +2021 -1732
  24. package/build/internal/es/meta.d.mts +1875 -1552
  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
  }
@@ -2098,7 +2180,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
2098
2180
  /** If present, indicates the action that triggered the event. */
2099
2181
  originatedFrom?: string | null;
2100
2182
  /**
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.
2183
+ * 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
2184
  * 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
2185
  */
2104
2186
  entityEventSequence?: string | null;
@@ -2222,12 +2304,64 @@ interface AccountInfo {
2222
2304
  */
2223
2305
  siteId?: string | null;
2224
2306
  }
2225
- interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
2226
- activeSubscription?: CreateSubscriptionRequest;
2307
+ interface SetIsMigratedEvent {
2308
+ /** @format GUID */
2309
+ subscriptionId?: string;
2310
+ }
2311
+ interface SubscriptionDelayedSyncEvent {
2312
+ /** @format GUID */
2313
+ subscriptionId?: string;
2314
+ }
2315
+ interface InvoiceAction extends InvoiceActionActionTypeOneOf {
2316
+ payRecurring?: PayRecurringInvoice;
2227
2317
  }
2228
2318
  /** @oneof */
2229
- interface CreateSubscriptionInStateRequestModeOneOf {
2230
- activeSubscription?: CreateSubscriptionRequest;
2319
+ interface InvoiceActionActionTypeOneOf {
2320
+ payRecurring?: PayRecurringInvoice;
2321
+ }
2322
+ interface PayRecurringInvoice {
2323
+ /** @format GUID */
2324
+ invoiceId?: string;
2325
+ }
2326
+ /**
2327
+ * Sent each time a subscription status has been set to Active
2328
+ * Active shows that a subscription is live and operational.
2329
+ * For example:
2330
+ * * For subscription with free trial, free trial start date is also the activation date.
2331
+ * * For a subscription with future start date, the start date is also the activation date.
2332
+ * * When a subscription is resumed from a pause status, the resume date is also the activation date.
2333
+ */
2334
+ interface SubscriptionActivated {
2335
+ subscription?: Subscription;
2336
+ }
2337
+ /**
2338
+ * Sent each time a subscription status has been set to Ended
2339
+ * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
2340
+ * This is different from a Canceled subscription which ends the subscription before a designated end date.
2341
+ * Therefore, Ended and Canceled are mutually exclusive.
2342
+ */
2343
+ interface SubscriptionEnded {
2344
+ subscription?: Subscription;
2345
+ }
2346
+ interface SubscriptionInitialPurchaseCompleted {
2347
+ subscription?: Subscription;
2348
+ actionDetails?: ActionDetails;
2349
+ /** @format GUID */
2350
+ paymentTransactionId?: string | null;
2351
+ }
2352
+ interface SubscriptionCycleReadyToPay {
2353
+ subscription?: Subscription;
2354
+ }
2355
+ interface SubscriptionBillingCycleStarted {
2356
+ subscription?: Subscription;
2357
+ /**
2358
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2359
+ * @format GUID
2360
+ */
2361
+ paymentTransactionId?: string | null;
2362
+ }
2363
+ interface SubscriptionRevived {
2364
+ subscription?: Subscription;
2231
2365
  }
2232
2366
  interface CreateSubscriptionRequest {
2233
2367
  subscription?: Subscription;
@@ -2247,2118 +2381,2251 @@ interface OriginOverride {
2247
2381
  /** @format GUID */
2248
2382
  instanceId?: string;
2249
2383
  }
2250
- interface CreateSubscriptionInStateResponse {
2251
- /** @format GUID */
2252
- subscriptionId?: string;
2253
- }
2254
- interface PayCycleRequest {
2255
- /** @format GUID */
2256
- subscriptionId: string;
2257
- paymentTestMode?: PaymentTestModeWithLiterals;
2258
- /** @format GUID */
2259
- tenantId: string;
2260
- }
2261
- declare enum PaymentTestMode {
2262
- REGULAR = "REGULAR",
2263
- FAIL_TECHNICAL = "FAIL_TECHNICAL",
2264
- FAIL_DECLINE = "FAIL_DECLINE",
2265
- FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
2266
- }
2267
- /** @enumType */
2268
- type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE';
2269
- interface PayCycleResponse {
2270
- /** @format GUID */
2271
- invoiceId?: string;
2272
- /** @format GUID */
2273
- paymentOrderId?: string | null;
2384
+ interface CreateSubscriptionResponse {
2274
2385
  subscription?: Subscription;
2386
+ /**
2387
+ * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
2388
+ * @format GUID
2389
+ */
2390
+ paymentOrderId?: string | null;
2275
2391
  }
2276
- interface GetFullSubscriptionDataRequest {
2277
- /** @format GUID */
2278
- _id?: string;
2279
- }
2280
- interface GetFullSubscriptionDataResponse {
2392
+ interface UpdateSubscriptionRequest {
2393
+ /** Revision is validated if Subscription.revision is set */
2281
2394
  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[];
2395
+ /** Supported fields: customer, metadata */
2396
+ fieldMask?: string[];
2294
2397
  }
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;
2398
+ interface UpdateSubscriptionResponse {
2399
+ subscription?: Subscription;
2300
2400
  }
2301
- interface PausePeriod {
2401
+ interface UpdateSubscriptionStartDateRequest {
2402
+ /**
2403
+ * Subscription ID
2404
+ * @format GUID
2405
+ */
2406
+ _id?: string;
2407
+ /**
2408
+ * Can be updated only if Subscription is in Draft state
2409
+ * By setting start_date in the future, end_date will be recalculated for termed Subscriptions
2410
+ * cycles_to_pay_on_creation will be set to 1 if no free trial is set
2411
+ */
2302
2412
  startDate?: Date | null;
2303
- endDate?: Date | null;
2304
- }
2305
- interface GetSubscriptionAndInternalDataRequest {
2306
- /** @format GUID */
2307
- subscriptionId?: string;
2308
- /** @format GUID */
2309
- tenantId?: string;
2310
2413
  }
2311
- interface GetSubscriptionAndInternalDataResponse {
2414
+ interface UpdateSubscriptionStartDateResponse {
2312
2415
  subscription?: Subscription;
2313
- internalSubscriptionData?: InternalSubscriptionData;
2314
2416
  }
2315
- interface SearchSubscriptionRequest {
2316
- /** @format GUID */
2417
+ interface BassToSapiPaypalMigrationRequest {
2418
+ /**
2419
+ * Subscription ID
2420
+ * @format GUID
2421
+ */
2317
2422
  _id?: string;
2318
- /** @format GUID */
2319
- tenantId?: string;
2423
+ collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
2320
2424
  }
2321
- interface SearchSubscriptionResponse {
2425
+ interface BassToSapiPaypalMigrationResponse {
2322
2426
  subscription?: Subscription;
2323
2427
  }
2324
- interface UpdatePausePaidDurationRequest {
2325
- /** @format GUID */
2326
- subscriptionId?: string;
2428
+ interface UpdateSubscriptionPoliciesRequest {
2327
2429
  /**
2328
- * @min 1
2329
- * @max 10000000
2430
+ * Subscription ID
2431
+ * @format GUID
2330
2432
  */
2331
- pausePaidDurationSeconds?: string;
2332
- /** @format GUID */
2333
- tenantId?: string;
2433
+ _id?: string;
2434
+ cancellableByCustomer?: boolean | null;
2334
2435
  }
2335
- interface UpdatePausePaidDurationResponse {
2436
+ interface UpdateSubscriptionPoliciesResponse {
2437
+ /** Updated policies of the subscription */
2438
+ policies?: SubscriptionPolicies;
2336
2439
  }
2337
- interface UpdateStatusRequest {
2338
- /** @format GUID */
2339
- subscriptionId?: string;
2340
- /** @format GUID */
2341
- tenantId?: string;
2342
- status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
2440
+ interface UpdateSubscriptionBillingDateRequest {
2441
+ /**
2442
+ * ID of the subscription to update the billing date for.
2443
+ * @format GUID
2444
+ */
2445
+ _id: string;
2446
+ /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
2447
+ billingDate: Date | null;
2448
+ /**
2449
+ * Information about how BASS adjusts the total of the next invoice. Extending
2450
+ * the current billing cycle results in a higher payment, while shortening it
2451
+ * leads to a lower payment. BASS offers automatic calculation of the proration
2452
+ * amount based on the number of days added to or removed from the current billing
2453
+ * cycle. Alternatively, you can use your own custom method to calculate the
2454
+ * proration amount. The custom proration amount can't exceed the total of the
2455
+ * current billing cycle.
2456
+ */
2457
+ proration?: Proration;
2343
2458
  }
2344
- interface UpdateStatusResponse {
2459
+ interface UpdateSubscriptionBillingDateResponse {
2460
+ /** Updated subscription. */
2345
2461
  subscription?: Subscription;
2346
2462
  }
2347
- interface UpdatePaymentStatusRequest {
2348
- /** @format GUID */
2349
- subscriptionId?: string;
2350
- /** @format GUID */
2351
- tenantId?: string;
2352
- paymentStatus?: PaymentStatusWithLiterals;
2353
- }
2354
- interface UpdatePaymentStatusResponse {
2463
+ interface SubscriptionBillingDateUpdated {
2355
2464
  subscription?: Subscription;
2465
+ billingDate?: Date | null;
2466
+ proration?: Proration;
2356
2467
  }
2357
- interface RemoveCancellationInfoRequest {
2358
- /** @format GUID */
2359
- subscriptionId?: string;
2360
- /** @format GUID */
2361
- tenantId?: string;
2362
- }
2363
- interface RemoveCancellationInfoResponse {
2468
+ interface UpdateSubscriptionOriginRequest {
2469
+ /**
2470
+ * ID of the subscription to update origin.
2471
+ * @format GUID
2472
+ */
2473
+ _id?: string;
2474
+ /**
2475
+ * Origin entity ID of the subscription to update.
2476
+ * @format GUID
2477
+ */
2478
+ entityId?: string;
2479
+ }
2480
+ interface UpdateSubscriptionOriginResponse {
2481
+ /** Updated subscription. */
2364
2482
  subscription?: Subscription;
2365
2483
  }
2366
- interface RemovePauseInfoRequest {
2367
- /** @format GUID */
2368
- subscriptionId?: string;
2369
- /** @format GUID */
2370
- tenantId?: string;
2484
+ interface ReviseSubscriptionRequest {
2485
+ /**
2486
+ * Subscription ID
2487
+ * @format GUID
2488
+ */
2489
+ _id: string;
2490
+ /**
2491
+ * 0 for no revision, maxSize is 100
2492
+ * @maxSize 100
2493
+ */
2494
+ items?: Item[];
2371
2495
  }
2372
- interface RemovePauseInfoResponse {
2496
+ interface ReviseSubscriptionResponse {
2373
2497
  subscription?: Subscription;
2374
2498
  }
2375
- interface ReviveSubscriptionRequest {
2376
- /** @format GUID */
2377
- tenantId?: string;
2378
- /** @format GUID */
2379
- subscriptionId?: string;
2380
- revivePolicy?: RevivePolicyWithLiterals;
2381
- isTestRun?: boolean;
2499
+ interface UpdateSubscriptionItemsRequest {
2500
+ /**
2501
+ * Subscription ID
2502
+ * @format GUID
2503
+ */
2504
+ _id?: string;
2505
+ /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
2506
+ updateAction?: UpdateActionWithLiterals;
2507
+ /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
2508
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2509
+ /**
2510
+ * Existing items to update
2511
+ * @maxSize 100
2512
+ */
2513
+ itemsToUpdate?: ItemChange[];
2514
+ /**
2515
+ * Items to add
2516
+ * @maxSize 99
2517
+ */
2518
+ itemsToAdd?: Item[];
2519
+ /**
2520
+ * Existing items to delete
2521
+ * @format GUID
2522
+ * @maxSize 99
2523
+ */
2524
+ itemsToDelete?: string[] | null;
2382
2525
  }
2383
- declare enum RevivePolicy {
2384
- SIMPLE = "SIMPLE",
2385
- RESUME = "RESUME"
2526
+ declare enum UpdateAction {
2527
+ NONE = "NONE",
2528
+ /** Update subscription immediately, please note proration for updates changing price are not yet supported */
2529
+ IMMEDIATELY = "IMMEDIATELY",
2530
+ /** Request updates that will take affect only at the start of the next billing cycle. */
2531
+ NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
2532
+ /** Reset all pending updates */
2533
+ RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
2534
+ /** Request updates that will take affect only at a specific date. */
2535
+ SPECIFIC_DATE = "SPECIFIC_DATE"
2386
2536
  }
2387
2537
  /** @enumType */
2388
- type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';
2389
- interface ReviveSubscriptionResponse {
2538
+ type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
2539
+ interface UpdateSubscriptionItemsResponse {
2390
2540
  subscription?: Subscription;
2391
2541
  }
2392
- interface ConvertSapiRequest {
2393
- /** @format GUID */
2394
- subscriptionId?: string;
2542
+ interface BulkUpdateSubscriptionItemsByFilterRequest {
2543
+ /**
2544
+ * Filter to identify the subscriptions for which items are updated. For
2545
+ * supported fields see
2546
+ * [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).
2547
+ * Sending an empty subscription filter results in a validation error.
2548
+ * In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
2549
+ * `subscriptionId` field inside this filter. Passing any other filter results
2550
+ * in a failed validation error.
2551
+ */
2552
+ subscriptionFilter?: Record<string, any> | null;
2553
+ /**
2554
+ * Filter to specify which subscription items are updated. Make sure to use
2555
+ * the catalog item ID and not the item's unique ID. All subscription items
2556
+ * with matching `items.catalogReference.catalogItemId` are updated.
2557
+ *
2558
+ * Max: `100` reference catalog item IDs
2559
+ * @format GUID
2560
+ * @maxSize 100
2561
+ */
2562
+ catalogReferenceIds?: string[] | null;
2563
+ /**
2564
+ * Information about the update timing and update type.
2565
+ *
2566
+ * + `"IMMEDIATELY"`: The updates become effective immediately.
2567
+ * + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
2568
+ * + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
2569
+ * + `"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.
2570
+ */
2571
+ updateAction?: UpdateActionWithLiterals;
2572
+ /**
2573
+ * Additional information for updates. Currently, only supported for
2574
+ * `{"updateAction": "SPECIFIC_DATE"}`.
2575
+ */
2576
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2577
+ /**
2578
+ * Update details for the susbcription items that match the filtering.
2579
+ * Currently, you can update only the item price, quantity, and tax. Note
2580
+ * that all item properties are updated to the same values. In case you want set
2581
+ * different values for individual items, you must call
2582
+ * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
2583
+ */
2584
+ bulkItemUpdateData?: BulkItemChange;
2585
+ /**
2586
+ * __Not implemented yet__. Items to add to the subscriptions matching the filtering.
2587
+ * @maxSize 99
2588
+ */
2589
+ itemsToAdd?: Item[];
2395
2590
  }
2396
- interface ConvertSapiResponse {
2397
- subscription?: Subscription;
2591
+ interface BulkItemChange {
2592
+ /** Information about the new item price. */
2593
+ pricingModel?: PricingModel;
2594
+ /**
2595
+ * New item quantity.
2596
+ *
2597
+ * Min: `1`
2598
+ * @min 1
2599
+ */
2600
+ quantity?: number | null;
2601
+ /** Information about the new item tax. */
2602
+ tax?: Tax;
2398
2603
  }
2399
- interface GetSubscriptionInvoicesRequest {
2604
+ interface BulkUpdateSubscriptionItemsByFilterResponse {
2605
+ /**
2606
+ * ID of your bulk job. You can use
2607
+ * [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)
2608
+ * to retrieve information about the job status.
2609
+ */
2610
+ jobId?: string;
2611
+ }
2612
+ interface DeleteSubscriptionRequest {
2400
2613
  /** @format GUID */
2401
2614
  _id?: string;
2615
+ revision?: string;
2402
2616
  }
2403
- interface GetSubscriptionInvoicesResponse {
2404
- invoices?: SubscriptionInvoice[];
2617
+ interface DeleteSubscriptionResponse {
2405
2618
  }
2406
- interface SubscriptionInvoice {
2619
+ interface CancelSubscriptionRequest {
2407
2620
  /** @format GUID */
2408
- _id?: string;
2409
- subscriptionCycle?: number;
2410
- _createdDate?: Date | null;
2621
+ _id: string;
2622
+ actionContext: ActionContext;
2411
2623
  }
2412
- interface FinishFreeTrialNowRequest {
2413
- /** @format GUID */
2414
- subscriptionId?: string;
2415
- /** @format GUID */
2416
- tenantId?: string;
2624
+ interface ActionContext {
2625
+ initiator?: ActionInitiatorWithLiterals;
2626
+ /** Optional action reason message */
2627
+ reason?: string | null;
2417
2628
  }
2418
- interface FinishFreeTrialNowResponse {
2629
+ declare enum ActionInitiator {
2630
+ UNDEFINED = "UNDEFINED",
2631
+ BUSINESS = "BUSINESS",
2632
+ CUSTOMER = "CUSTOMER",
2633
+ SYSTEM = "SYSTEM"
2634
+ }
2635
+ /** @enumType */
2636
+ type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
2637
+ interface CancelSubscriptionResponse {
2419
2638
  subscription?: Subscription;
2420
2639
  }
2421
- interface FixSubscriptionTimeCapsuleTasksRequest {
2422
- /** @format GUID */
2423
- subscriptionId?: string;
2640
+ interface PauseSubscriptionRequest {
2424
2641
  /** @format GUID */
2425
- tenantId?: string;
2642
+ _id: string;
2643
+ pausePolicy?: PausePolicyWithLiterals;
2644
+ pauseAt?: PauseAtWithLiterals;
2645
+ /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
2646
+ pauseAtSchedule?: ScheduleAdditionalInfo;
2647
+ /** contains additional scheduling information for certain auto_resume_at either specific date */
2648
+ autoResumeAtSchedule?: ScheduleAdditionalInfo;
2649
+ actionContext: ActionContext;
2426
2650
  }
2427
- interface FixSubscriptionTimeCapsuleTasksResponse {
2651
+ interface PauseSubscriptionResponse {
2652
+ subscription?: Subscription;
2428
2653
  }
2429
- interface SendTimeCapsuleTaskCanceledBIRequest {
2430
- /** @format GUID */
2431
- tenantId?: string;
2432
- /** @format GUID */
2433
- subscriptionId?: string;
2434
- /** @minLength 1 */
2435
- taskType?: string;
2654
+ interface SubscriptionPaused {
2655
+ subscription?: Subscription;
2656
+ pausePolicy?: PausePolicyWithLiterals;
2657
+ actionDetails?: ActionDetails;
2436
2658
  }
2437
- interface Empty {
2659
+ interface PauseSubscriptionRequested {
2660
+ subscription?: Subscription;
2661
+ pauseAt?: PauseAtWithLiterals;
2662
+ pausePolicy?: PausePolicyWithLiterals;
2663
+ actionDetails?: ActionDetails;
2438
2664
  }
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;
2665
+ interface ScheduledPauseCanceled {
2666
+ subscription?: Subscription;
2667
+ actionDetails?: ActionDetails;
2447
2668
  }
2448
- interface CancelTimeCapsuleTaskRequest {
2449
- /** @format GUID */
2450
- tenantId?: string;
2669
+ interface ResumeSubscriptionRequest {
2451
2670
  /** @format GUID */
2452
- subscriptionId?: string;
2453
- /** @minLength 1 */
2454
- taskType?: string;
2671
+ _id: string;
2672
+ resumeAt?: ResumeAtWithLiterals;
2673
+ /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
2674
+ resumeAtSchedule?: ScheduleAdditionalInfo;
2675
+ actionContext: ActionContext;
2676
+ /** Strategy for resuming a migrated paused subscription when the previous billing date is missing. */
2677
+ missingPreviousBillingDateResumeStrategy?: MissingPreviousBillingDateResumeStrategyWithLiterals;
2455
2678
  }
2456
- interface UpdateFullSubscriptionRequest {
2457
- /** @format GUID */
2458
- tenantId?: string;
2679
+ declare enum MissingPreviousBillingDateResumeStrategy {
2680
+ UNKNOWN = "UNKNOWN",
2681
+ /** Use a fallback that makes the next billing date resolve to now. */
2682
+ START_BILLING_IMMEDIATELY = "START_BILLING_IMMEDIATELY",
2683
+ /** Use a fallback that makes the next billing date resolve to one full cycle from now. */
2684
+ START_BILLING_AFTER_ONE_FULL_CYCLE = "START_BILLING_AFTER_ONE_FULL_CYCLE"
2685
+ }
2686
+ /** @enumType */
2687
+ type MissingPreviousBillingDateResumeStrategyWithLiterals = MissingPreviousBillingDateResumeStrategy | 'UNKNOWN' | 'START_BILLING_IMMEDIATELY' | 'START_BILLING_AFTER_ONE_FULL_CYCLE';
2688
+ interface ResumeSubscriptionResponse {
2459
2689
  subscription?: Subscription;
2460
2690
  }
2461
- interface UpdateFullSubscriptionResponse {
2691
+ interface SubscriptionResumed {
2462
2692
  subscription?: Subscription;
2693
+ actionDetails?: ActionDetails;
2694
+ pauseInfo?: PauseInfo;
2463
2695
  }
2464
- interface PatchSubscriptionRequest {
2465
- /**
2466
- * Tenant ID (instance ID) of the subscription
2467
- * @format GUID
2468
- */
2469
- tenantId?: string;
2470
- /**
2471
- * Subscription ID to patch
2472
- * @format GUID
2473
- */
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 {
2696
+ interface ResumeSubscriptionRequested {
2505
2697
  subscription?: Subscription;
2698
+ resumeAt?: ResumeAtWithLiterals;
2699
+ actionDetails?: ActionDetails;
2506
2700
  }
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;
2525
- }
2526
- interface SetShiftingDataRequest {
2527
- /** @format GUID */
2528
- subscriptionId?: string;
2529
- /** @format GUID */
2530
- tenantId?: string;
2531
- isBassManaged?: boolean;
2532
- shiftManagementDate?: Date | null;
2533
- }
2534
- interface SetShiftingDataResponse {
2701
+ interface ScheduledResumeCanceled {
2535
2702
  subscription?: Subscription;
2703
+ actionDetails?: ActionDetails;
2536
2704
  }
2537
- interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
2538
- attachInvoice?: AttachInvoice;
2539
- detachInvoice?: DetachInvoice;
2540
- /** @format GUID */
2541
- tenantId?: string;
2542
- /** @format GUID */
2543
- subscriptionId?: string;
2705
+ interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
2706
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2707
+ paging?: Paging;
2708
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2709
+ cursor?: CursorPaging;
2710
+ /** A filter object */
2711
+ filter?: any;
2712
+ /** A Sorting option by field name and order. */
2713
+ sorting?: SortingClauses;
2544
2714
  }
2545
2715
  /** @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;
2716
+ interface SearchSubscriptionsRequestPagingMethodOneOf {
2717
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2718
+ paging?: Paging;
2719
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2720
+ cursor?: CursorPaging;
2557
2721
  }
2558
- interface FixSubscriptionInvoicesResponse {
2559
- invoices?: SubscriptionInvoice[];
2722
+ interface SortingClauses {
2723
+ sorting?: Sorting[];
2560
2724
  }
2561
- interface RestoreDraftSubscriptionRequest {
2562
- /** @format GUID */
2563
- tenantId?: string;
2564
- /** @format GUID */
2565
- subscriptionId?: string;
2725
+ interface SearchSubscriptionsResponse {
2726
+ subscriptions?: Subscription[];
2727
+ cursor?: CursorPaging;
2728
+ pagingMetadata?: CursorPagingMetadata;
2566
2729
  }
2567
- interface RestoreDraftSubscriptionResponse {
2568
- subscription?: Subscription;
2730
+ interface CursorPagingMetadata {
2731
+ /** Total number of items matching the filter. Available only on the first page of *Search* */
2732
+ total?: number | null;
2569
2733
  }
2570
- interface DeleteDraftSubscriptionRequest {
2571
- /** @format GUID */
2572
- tenantId?: string;
2734
+ interface TurnOnSubscriptionAutoRenewalRequest {
2573
2735
  /** @format GUID */
2574
- subscriptionId?: string;
2736
+ _id: string;
2737
+ actionContext: ActionContext;
2575
2738
  }
2576
- interface DeleteDraftSubscriptionResponse {
2739
+ interface TurnOnSubscriptionAutoRenewalResponse {
2577
2740
  subscription?: Subscription;
2578
2741
  }
2579
- interface DeleteSubscriptionBORequest {
2580
- /** @format GUID */
2581
- tenantId?: string;
2582
- /** @format GUID */
2583
- subscriptionId?: string;
2584
- }
2585
- interface DeleteSubscriptionBOResponse {
2742
+ interface SubscriptionAutoRenewalTurnedOn {
2586
2743
  subscription?: Subscription;
2744
+ actionDetails?: ActionDetails;
2587
2745
  }
2588
- interface CancelSubscriptionBORequest {
2589
- /** @format GUID */
2590
- tenantId?: string;
2746
+ interface TurnOffSubscriptionAutoRenewalRequest {
2591
2747
  /** @format GUID */
2592
- subscriptionId?: string;
2593
- initiator?: ActionInitiatorWithLiterals;
2594
- reason?: string | null;
2595
- }
2596
- declare enum ActionInitiator {
2597
- UNDEFINED = "UNDEFINED",
2598
- BUSINESS = "BUSINESS",
2599
- CUSTOMER = "CUSTOMER",
2600
- SYSTEM = "SYSTEM"
2748
+ _id: string;
2749
+ actionContext: ActionContext;
2601
2750
  }
2602
- /** @enumType */
2603
- type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
2604
- interface CancelSubscriptionBOResponse {
2751
+ interface TurnOffSubscriptionAutoRenewalResponse {
2605
2752
  subscription?: Subscription;
2606
2753
  }
2607
- interface UpdatePaymentMethodBORequest {
2608
- /** @format GUID */
2609
- tenantId?: string;
2610
- /** @format GUID */
2611
- subscriptionId?: string;
2612
- /** @format GUID */
2613
- paymentMethodId?: string;
2614
- }
2615
- interface UpdatePaymentMethodBOResponse {
2754
+ interface SubscriptionAutoRenewalTurnedOff {
2616
2755
  subscription?: Subscription;
2756
+ actionDetails?: ActionDetails;
2617
2757
  }
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 {
2630
- subscription?: Subscription;
2758
+ interface MarkLatestInvoiceAsPaidRequest {
2631
2759
  /**
2632
- * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2760
+ * The ID of the offline subscription to mark as paid its latest invoice
2633
2761
  * @format GUID
2634
2762
  */
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
- pausePolicy?: PausePolicyWithLiterals;
2652
- pauseAt?: PauseAtWithLiterals;
2653
- initiator?: ActionInitiatorWithLiterals;
2654
- /** @maxLength 500 */
2655
- reason?: string | null;
2763
+ subscriptionId: string;
2656
2764
  }
2657
- interface PauseSubscriptionBOResponse {
2765
+ interface MarkLatestInvoiceAsPaidResponse {
2658
2766
  subscription?: Subscription;
2659
2767
  }
2660
- interface FixSubscriptionInvoicesConsistencyRequest {
2661
- /** @format GUID */
2662
- tenantId?: string;
2663
- /** @format GUID */
2664
- subscriptionId?: string;
2665
- }
2666
- interface FixSubscriptionInvoicesConsistencyResponse {
2768
+ interface LatestInvoiceMarkedAsPaid {
2769
+ subscription?: Subscription;
2667
2770
  }
2668
- interface UpdateSubscriptionCurrencyRequest {
2771
+ interface MultipleSubscriptionsOnOrdersInvoice {
2669
2772
  /**
2670
- * Tenant ID (instance ID) of the subscription
2773
+ * the invoice id of the affected subscription
2671
2774
  * @format GUID
2672
2775
  */
2673
- tenantId?: string;
2776
+ invoiceId?: string;
2674
2777
  /**
2675
- * Subscription ID to update currency for
2778
+ * the order id of the affected subscription
2676
2779
  * @format GUID
2677
2780
  */
2678
- subscriptionId?: string;
2781
+ orderId?: string;
2782
+ }
2783
+ interface MarkBillingCycleAsPaidRequest {
2679
2784
  /**
2680
- * New currency code (e.g., "USD", "EUR") - ISO 4217 format
2681
- * @format CURRENCY
2785
+ * The ID of the subscription to mark as paid its invoice.
2786
+ * @format GUID
2682
2787
  */
2683
- newCurrency?: string;
2788
+ subscriptionId: string;
2684
2789
  /**
2685
- * Exchange rate from current currency to new currency (newAmount = oldAmount * exchangeRate)
2686
- * @decimalValue options { gt:0.00, maxScale:6 }
2790
+ * The subscription cycle for which the invoice is to be marked as paid.
2791
+ * If left empty, the most recent cycle will be selected.
2792
+ * @min 1
2687
2793
  */
2688
- exchangeRate?: string;
2794
+ paidCycle?: number | null;
2689
2795
  }
2690
- interface UpdateSubscriptionCurrencyResponse {
2691
- /** The updated subscription with new currency and converted amounts */
2796
+ interface MarkBillingCycleAsPaidResponse {
2692
2797
  subscription?: Subscription;
2693
2798
  }
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;
2707
- }
2708
- interface UpdateSubscriptionPlatformOriginResponse {
2709
- /** The updated subscription with new platform origin */
2710
- subscription?: Subscription;
2799
+ interface GetSubscriptionsStatsRequest {
2711
2800
  }
2712
- interface SetIsMigratedEvent {
2713
- /** @format GUID */
2714
- subscriptionId?: string;
2801
+ interface GetSubscriptionsStatsResponse {
2802
+ amountByStatuses?: AmountByStatus[];
2803
+ total?: number;
2715
2804
  }
2716
- interface SubscriptionDelayedSyncEvent {
2717
- /** @format GUID */
2718
- subscriptionId?: string;
2805
+ interface AmountByStatus {
2806
+ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
2807
+ amount?: number;
2719
2808
  }
2720
- interface InvoiceAction extends InvoiceActionActionTypeOneOf {
2721
- payRecurring?: PayRecurringInvoice;
2809
+ interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
2810
+ /** User won't be charged for additional period added on top of subscription end date. */
2811
+ extensionPeriod?: Duration;
2812
+ /**
2813
+ * user will be charged for billing cycles added
2814
+ * @min 1
2815
+ */
2816
+ extensionBillingCycles?: number;
2817
+ /**
2818
+ * The ID of the subscription to be extended
2819
+ * @format GUID
2820
+ */
2821
+ _id: string;
2822
+ actionContext: ActionContext;
2722
2823
  }
2723
2824
  /** @oneof */
2724
- interface InvoiceActionActionTypeOneOf {
2725
- payRecurring?: PayRecurringInvoice;
2726
- }
2727
- interface PayRecurringInvoice {
2728
- /** @format GUID */
2729
- invoiceId?: string;
2730
- }
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;
2825
+ interface ExtendSubscriptionRequestExtendPolicyOneOf {
2826
+ /** User won't be charged for additional period added on top of subscription end date. */
2827
+ extensionPeriod?: Duration;
2828
+ /**
2829
+ * user will be charged for billing cycles added
2830
+ * @min 1
2831
+ */
2832
+ extensionBillingCycles?: number;
2741
2833
  }
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 {
2834
+ interface ExtendSubscriptionResponse {
2835
+ /** The now extended subscription */
2749
2836
  subscription?: Subscription;
2750
2837
  }
2751
- interface SubscriptionInitialPurchaseCompleted {
2752
- subscription?: Subscription;
2753
- actionDetails?: ActionDetails;
2838
+ interface AllowedActionsRequest {
2754
2839
  /** @format GUID */
2755
- paymentTransactionId?: string | null;
2756
- }
2757
- interface SubscriptionCycleReadyToPay {
2758
- subscription?: Subscription;
2840
+ _id: string;
2841
+ /**
2842
+ * List of additional fields to be included in the response.
2843
+ * @maxSize 1
2844
+ */
2845
+ fields?: RequestedFieldsWithLiterals[];
2759
2846
  }
2760
- interface SubscriptionRevived {
2761
- subscription?: Subscription;
2847
+ declare enum RequestedFields {
2848
+ /** Include unsupported action list, including the reasons for the lack of support */
2849
+ UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
2762
2850
  }
2763
- interface CreateSubscriptionResponse {
2764
- subscription?: Subscription;
2851
+ /** @enumType */
2852
+ type RequestedFieldsWithLiterals = RequestedFields | 'UNSUPPORTED_ACTION';
2853
+ interface AllowedActionsResponse {
2854
+ /** List of actions that are allowed. */
2855
+ actions?: Action[];
2765
2856
  /**
2766
- * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
2767
- * @format GUID
2857
+ * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
2858
+ * @maxSize 20
2768
2859
  */
2769
- paymentOrderId?: string | null;
2860
+ unsupportedActions?: UnsupportedAction[];
2770
2861
  }
2771
- interface UpdateSubscriptionRequest {
2772
- /** Revision is validated if Subscription.revision is set */
2773
- subscription?: Subscription;
2862
+ interface UnsupportedAction {
2863
+ actionType?: ActionTypeWithLiterals;
2774
2864
  /**
2775
- * Supported field: start_date
2776
- * Can be updated only if Subscription is in Draft state
2865
+ * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
2866
+ * @maxSize 20
2777
2867
  */
2778
- fieldMask?: string[];
2868
+ reasons?: UnsupportedReason[];
2779
2869
  }
2780
- interface UpdateSubscriptionResponse {
2781
- subscription?: Subscription;
2870
+ interface UnsupportedReason {
2871
+ code?: string;
2872
+ description?: string | null;
2782
2873
  }
2783
- interface UpdateSubscriptionStartDateRequest {
2874
+ interface ListUpcomingChargesRequest {
2784
2875
  /**
2785
- * Subscription ID
2876
+ * Subscription id charges to be previewed for
2786
2877
  * @format GUID
2787
2878
  */
2788
- _id?: string;
2879
+ subscriptionId: string;
2880
+ /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
2881
+ customDuration?: Duration;
2789
2882
  /**
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
2883
+ * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
2884
+ * If not provided, the upcoming charges will be calculated according to the existing next billing date.
2793
2885
  */
2794
- startDate?: Date | null;
2886
+ nextBillingDate?: Date | null;
2795
2887
  }
2796
- interface UpdateSubscriptionStartDateResponse {
2797
- subscription?: Subscription;
2888
+ interface ListUpcomingChargesResponse {
2889
+ upcomingCharges?: SubscriptionCharge[];
2798
2890
  }
2799
- interface BassToSapiPaypalMigrationRequest {
2800
- /**
2801
- * Subscription ID
2802
- * @format GUID
2803
- */
2804
- _id?: string;
2805
- collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
2891
+ interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
2892
+ /** Information about a non-existing subscription. */
2893
+ subscriptionInfo?: SubscriptionInfo;
2806
2894
  }
2807
- interface BassToSapiPaypalMigrationResponse {
2808
- subscription?: Subscription;
2895
+ /** @oneof */
2896
+ interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
2897
+ /** Information about a non-existing subscription. */
2898
+ subscriptionInfo?: SubscriptionInfo;
2809
2899
  }
2810
- interface UpdateSubscriptionPoliciesRequest {
2900
+ /** Subscription information to use for calculating the preview of charges for a subscription. */
2901
+ interface SubscriptionInfo {
2902
+ billingSettings?: BillingSettings;
2903
+ items?: Item[];
2904
+ startDate?: Date | null;
2811
2905
  /**
2812
- * Subscription ID
2813
- * @format GUID
2906
+ * Customer the subscription belongs to. When provided, used for accurate tax calculation.
2907
+ * Optional for backward compatibility; if omitted, a synthetic id is used (legacy behavior)
2908
+ * and customer-specific tax rules (VAT exemptions, tax IDs) will not apply.
2814
2909
  */
2815
- _id?: string;
2816
- cancellableByCustomer?: boolean | null;
2910
+ customer?: Customer;
2817
2911
  }
2818
- interface UpdateSubscriptionPoliciesResponse {
2819
- /** Updated policies of the subscription */
2820
- policies?: SubscriptionPolicies;
2912
+ interface PreviewSubscriptionChargesResponse {
2913
+ /** Charges for subscription. */
2914
+ charges?: Charge[];
2821
2915
  }
2822
- interface UpdateSubscriptionBillingDateRequest {
2916
+ /** Represents a charge applicable to a subscription. */
2917
+ interface Charge {
2918
+ /** The cycle number from which the charge starts. */
2919
+ cycleFrom?: number;
2920
+ /** The number of cycles for which the charge is applicable. */
2921
+ cycleCount?: number | null;
2922
+ /** The breakdown of the charge */
2923
+ totals?: Totals;
2924
+ /** The billing date from which the charge starts */
2925
+ cycleBillingDate?: Date | null;
2926
+ }
2927
+ interface PreviewSubscriptionsChargesRequest {
2823
2928
  /**
2824
- * ID of the subscription to update the billing date for.
2825
- * @format GUID
2929
+ * Information required to calculate the preview charges for the subscriptions, including an identifier.
2930
+ * @minSize 1
2931
+ * @maxSize 10
2826
2932
  */
2827
- _id: string;
2828
- /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
2829
- billingDate: Date | null;
2933
+ subscriptionsBillingDetails?: SubscriptionBillingDetails[];
2830
2934
  /**
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.
2935
+ * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
2936
+ * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
2937
+ * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
2938
+ * - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
2939
+ * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
2940
+ * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
2941
+ * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
2942
+ * in this case, charges for cycle 1 through 3.
2943
+ * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
2944
+ * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
2945
+ * @min 1
2946
+ * @max 10
2838
2947
  */
2839
- proration?: Proration;
2840
- }
2841
- interface UpdateSubscriptionBillingDateResponse {
2842
- /** Updated subscription. */
2843
- subscription?: Subscription;
2844
- }
2845
- interface SubscriptionBillingDateUpdated {
2846
- subscription?: Subscription;
2847
- billingDate?: Date | null;
2848
- proration?: Proration;
2948
+ numberOfNextRecurringCharges?: number | null;
2849
2949
  }
2850
- interface UpdateSubscriptionOriginRequest {
2950
+ interface SubscriptionBillingDetails {
2851
2951
  /**
2852
- * ID of the subscription to update origin.
2952
+ * External identifier of the subscription
2853
2953
  * @format GUID
2854
2954
  */
2855
- _id?: string;
2955
+ externalId?: string | null;
2956
+ /** Billing details parameters including schedule, currency, etc. */
2957
+ billingSettings?: BillingSettings;
2856
2958
  /**
2857
- * Origin entity ID of the subscription to update.
2858
- * @format GUID
2959
+ * Items, minSize is 1, maxSize is 100
2960
+ * @minSize 1
2961
+ * @maxSize 100
2859
2962
  */
2860
- entityId?: string;
2963
+ items?: Item[];
2964
+ /** Subscription start date, now if not set */
2965
+ startDate?: Date | null;
2966
+ /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
2967
+ shippingAddress?: FullAddressDetails;
2968
+ /**
2969
+ * Customer the subscription belongs to. When provided, used for accurate tax calculation.
2970
+ * Optional for backward compatibility; if omitted, a synthetic id is used (legacy behavior).
2971
+ */
2972
+ customer?: Customer;
2861
2973
  }
2862
- interface UpdateSubscriptionOriginResponse {
2863
- /** Updated subscription. */
2864
- subscription?: Subscription;
2974
+ interface PreviewSubscriptionsChargesResponse {
2975
+ /** Charges for the subscriptions, including an identifier. */
2976
+ subscriptionsCharges?: SubscriptionCharges[];
2865
2977
  }
2866
- interface ReviseSubscriptionRequest {
2978
+ interface SubscriptionCharges {
2867
2979
  /**
2868
- * Subscription ID
2980
+ * External identifier of the subscription
2869
2981
  * @format GUID
2870
2982
  */
2871
- _id: string;
2872
- /**
2873
- * 0 for no revision, maxSize is 100
2874
- * @maxSize 100
2983
+ externalId?: string | null;
2984
+ /** Charges for subscription. */
2985
+ charges?: Charge[];
2986
+ }
2987
+ interface CreateSubscriptionForOrderRequest {
2988
+ /** Subscription needs to be created */
2989
+ subscription?: Subscription;
2990
+ /**
2991
+ * Optional unique identifier for this request in order to prevent subscription duplications
2992
+ * @format GUID
2875
2993
  */
2876
- items?: Item[];
2994
+ idempotencyKey?: string | null;
2877
2995
  }
2878
- interface ReviseSubscriptionResponse {
2996
+ interface CreateSubscriptionForOrderResponse {
2997
+ /** Created subscription */
2879
2998
  subscription?: Subscription;
2999
+ /** Non-persistent invoice */
3000
+ invoice?: Invoice;
2880
3001
  }
2881
- interface UpdateSubscriptionItemsRequest {
3002
+ /** An invoice includes information about the subscription and the customer. */
3003
+ interface Invoice {
2882
3004
  /**
2883
- * Subscription ID
3005
+ * Invoice ID.
2884
3006
  * @format GUID
3007
+ * @readonly
2885
3008
  */
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;
3009
+ _id?: string | null;
2891
3010
  /**
2892
- * Existing items to update
2893
- * @maxSize 100
3011
+ * Date and time the invoice was created.
3012
+ * @readonly
2894
3013
  */
2895
- itemsToUpdate?: ItemChange[];
3014
+ _createdDate?: Date | null;
2896
3015
  /**
2897
- * Items to add
2898
- * @maxSize 99
3016
+ * Date and time the invoice was last updated.
3017
+ * @readonly
2899
3018
  */
2900
- itemsToAdd?: Item[];
3019
+ _updatedDate?: Date | null;
2901
3020
  /**
2902
- * Existing items to delete
2903
- * @format GUID
2904
- * @maxSize 99
3021
+ * Revision number, which increments by 1 each time the invoice is updated.
3022
+ * To prevent conflicting changes,
3023
+ * the current revision must be passed when updating the invoice.
3024
+ *
3025
+ * Ignored when creating a invoice.
3026
+ * @readonly
2905
3027
  */
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"
2918
- }
2919
- /** @enumType */
2920
- type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
2921
- interface UpdateSubscriptionItemsResponse {
2922
- subscription?: Subscription;
2923
- }
2924
- interface BulkUpdateSubscriptionItemsByFilterRequest {
3028
+ revision?: string | null;
2925
3029
  /**
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.
3030
+ * Source of the invoice.
3031
+ * @internal
2933
3032
  */
2934
- subscriptionFilter?: Record<string, any> | null;
3033
+ source?: string | null;
3034
+ /** Information about the invoice origin. */
3035
+ origin?: BusinessOriginData;
2935
3036
  /**
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.
3037
+ * Invoice status.
2939
3038
  *
2940
- * Max: `100` reference catalog item IDs
2941
- * @format GUID
2942
- * @maxSize 100
3039
+ * + `"UNKNOWN"`: There is no information about the invoice status.
3040
+ * + `"OPEN"`: BASS has created the invoice but hasn't initiated the payment process.
3041
+ * + `"PAID"`: The customer has successfully paid for the invoice.
3042
+ * + `"ATTEMPT_FAILED"`: The payment process has started and there has been at least one unsuccessful payment attempt.
3043
+ * + `"FAILED"`: The payment process has failed and there are no more retries.
3044
+ * + `"CANCELED"`: The payment process has been stopped because the related subscription has been canceled.
3045
+ * @readonly
2943
3046
  */
2944
- catalogReferenceIds?: string[] | null;
3047
+ status?: InvoiceStatusWithLiterals;
2945
3048
  /**
2946
- * Information about the update timing and update type.
3049
+ * 3-letter currency code of the invoice in
3050
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
3051
+ * @format CURRENCY
3052
+ */
3053
+ currency?: string;
3054
+ /** Information about the customer. */
3055
+ customer?: Customer;
3056
+ /**
3057
+ * Whether the payment is processed through Wix and whether the customer must provide some input.
2947
3058
  *
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.
3059
+ * + `"UNKNOWN"`: There is no information about the collection method.
3060
+ * + `"AUTO_CHARGE"`: The customer pays automatically through Wix.
3061
+ * + `"SEND_INVOICE"`: The customer pays through Wix, but some manual input is required.
3062
+ * + `"OFFLINE"`: The customer pays outside of Wix.
2952
3063
  */
2953
- updateAction?: UpdateActionWithLiterals;
3064
+ collectionMethod?: CollectionMethodWithLiterals;
2954
3065
  /**
2955
- * Additional information for updates. Currently, only supported for
2956
- * `{"updateAction": "SPECIFIC_DATE"}`.
3066
+ * ID of the
3067
+ * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
3068
+ * Not available for the first payment of a subscription and all offline
3069
+ * payments.
3070
+ * @format GUID
2957
3071
  */
2958
- scheduleAdditionalInfo?: ScheduleAdditionalInfo;
3072
+ paymentMethodId?: string | null;
2959
3073
  /**
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.
3074
+ * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
3075
+ * for the corresponding payment.
3076
+ * @format GUID
3077
+ * @readonly
2965
3078
  */
2966
- bulkItemUpdateData?: BulkItemChange;
3079
+ paymentOrderId?: string | null;
3080
+ /** Information about a discount. Available only for invoices that include a discount. */
3081
+ discount?: InvoiceDiscount;
3082
+ /** Billing address. */
3083
+ billingAddress?: FullAddressDetails;
3084
+ /** Shipping address. Available only for `"PHYSICAL"` line items. */
3085
+ shippingAddress?: FullAddressDetails;
2967
3086
  /**
2968
- * __Not implemented yet__. Items to add to the subscriptions matching the filtering.
2969
- * @maxSize 99
3087
+ * Shipping fee in `0.00` format.
3088
+ * @format DECIMAL_VALUE
2970
3089
  */
2971
- itemsToAdd?: Item[];
2972
- }
2973
- interface BulkItemChange {
2974
- /** Information about the new item price. */
2975
- pricingModel?: PricingModel;
3090
+ shippingFee?: string | null;
2976
3091
  /**
2977
- * New item quantity.
3092
+ * Information about the invoice's totals.
3093
+ * @readonly
3094
+ */
3095
+ totals?: Totals;
3096
+ /** Line items belonging to the invoice. */
3097
+ invoiceItems?: InvoiceItem[];
3098
+ /**
3099
+ * Whether the invoice is used to validate payment details.
2978
3100
  *
2979
- * Min: `1`
2980
- * @min 1
3101
+ * + `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.
3102
+ * + `false`: Standard invoice.
2981
3103
  */
2982
- quantity?: number | null;
2983
- /** Information about the new item tax. */
2984
- tax?: Tax;
2985
- }
2986
- interface BulkUpdateSubscriptionItemsByFilterResponse {
3104
+ isAuthorization?: boolean | null;
3105
+ /** Whether the invoice's `totals.totalPrice` includes tax. */
3106
+ isTaxInclusive?: boolean | null;
2987
3107
  /**
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.
3108
+ * Information about the invoice creation process.
3109
+ *
3110
+ * + `"UNKNOWN"`: There is no information about how BASS created the invoice.
3111
+ * + `"SYSTEM"`: BASS automatically created the invoice.
3112
+ * + `"MANUAL"`: A BASS system admin manually created the invoice.
3113
+ * @internal
2991
3114
  */
2992
- jobId?: string;
2993
- }
2994
- interface DeleteSubscriptionRequest {
2995
- /** @format GUID */
2996
- _id?: string;
2997
- revision?: string;
3115
+ creationMode?: CreationModeWithLiterals;
3116
+ /** Details of the latest payment attempt. */
3117
+ latestPaymentAttempt?: LatestPaymentAttempt;
3118
+ /** List of charges and credits that adjust the invoice's `totals.totalPrice`. */
3119
+ adjustments?: PriceAdjustment[];
3120
+ /**
3121
+ * Invoice Number.
3122
+ * @maxLength 10
3123
+ * @readonly
3124
+ */
3125
+ invoiceNumber?: string | null;
3126
+ /**
3127
+ * Shipping charges for the invoice.
3128
+ * Supports only one discount without cycles.
3129
+ * Discounts with cycles (repeated discounts across different billing cycles) are not supported for shipping
3130
+ */
3131
+ shippingCharges?: InvoiceShippingCharges;
3132
+ /** Information about the invoice tax */
3133
+ taxData?: TaxData;
3134
+ /** Business address. */
3135
+ businessAddress?: Address;
3136
+ /**
3137
+ * ID of the billing order that created this invoice.
3138
+ * @format GUID
3139
+ */
3140
+ orderId?: string | null;
3141
+ /**
3142
+ * Platform origin the invoice is originated from.
3143
+ * @format GUID
3144
+ */
3145
+ platformOriginAppId?: string | null;
3146
+ /**
3147
+ * Refund information, provided that there are refunds for this invoice.
3148
+ * @readonly
3149
+ */
3150
+ refundInfo?: RefundInfo;
2998
3151
  }
2999
- interface DeleteSubscriptionResponse {
3152
+ interface BusinessOriginData {
3153
+ /**
3154
+ * ID of the app for which BASS has created the invoice. For example,
3155
+ * `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
3156
+ * @format GUID
3157
+ */
3158
+ appId?: string;
3159
+ /**
3160
+ * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)
3161
+ * of the app for which BASS has created the invoice.
3162
+ * @format GUID
3163
+ */
3164
+ instanceId?: string;
3165
+ /**
3166
+ * ID of the entity that triggered the invoice creation. For example, the ID of a
3167
+ * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).
3168
+ * @format GUID
3169
+ */
3170
+ entityId?: string;
3000
3171
  }
3001
- interface CancelSubscriptionRequest {
3002
- /** @format GUID */
3003
- _id: string;
3004
- actionContext: ActionContext;
3172
+ declare enum InvoiceStatus {
3173
+ UNKNOWN = "UNKNOWN",
3174
+ OPEN = "OPEN",
3175
+ PAID = "PAID",
3176
+ FAILED = "FAILED",
3177
+ ATTEMPT_FAILED = "ATTEMPT_FAILED",
3178
+ CANCELED = "CANCELED",
3179
+ REFUNDED = "REFUNDED",
3180
+ CHARGEBACKED = "CHARGEBACKED"
3005
3181
  }
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;
3182
+ /** @enumType */
3183
+ type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN' | 'OPEN' | 'PAID' | 'FAILED' | 'ATTEMPT_FAILED' | 'CANCELED' | 'REFUNDED' | 'CHARGEBACKED';
3184
+ declare enum CollectionMethod {
3185
+ UNKNOWN = "UNKNOWN",
3186
+ AUTO_CHARGE = "AUTO_CHARGE",
3187
+ OFFLINE = "OFFLINE",
3188
+ SEND_INVOICE = "SEND_INVOICE"
3116
3189
  }
3117
- interface SubscriptionAutoRenewalTurnedOff {
3118
- subscription?: Subscription;
3119
- actionDetails?: ActionDetails;
3190
+ /** @enumType */
3191
+ type CollectionMethodWithLiterals = CollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE';
3192
+ declare enum CreationMode {
3193
+ UNKNOWN = "UNKNOWN",
3194
+ SYSTEM = "SYSTEM",
3195
+ MANUAL = "MANUAL"
3120
3196
  }
3121
- interface MarkLatestInvoiceAsPaidRequest {
3197
+ /** @enumType */
3198
+ type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL';
3199
+ interface LatestPaymentAttempt {
3122
3200
  /**
3123
- * The ID of the offline subscription to mark as paid its latest invoice
3201
+ * ID of the latest payment attempt.
3124
3202
  * @format GUID
3203
+ * @readonly
3125
3204
  */
3126
- subscriptionId: string;
3127
- }
3128
- interface MarkLatestInvoiceAsPaidResponse {
3129
- subscription?: Subscription;
3130
- }
3131
- interface LatestInvoiceMarkedAsPaid {
3132
- subscription?: Subscription;
3133
- }
3134
- interface MultipleSubscriptionsOnOrdersInvoice {
3205
+ paymentAttemptId?: string;
3135
3206
  /**
3136
- * the invoice id of the affected subscription
3137
- * @format GUID
3207
+ * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.
3208
+ * @readonly
3138
3209
  */
3139
- invoiceId?: string;
3210
+ dateAttempt?: Date | null;
3211
+ /** Number of the latest payment attempt. */
3212
+ attemptNumber?: number;
3140
3213
  /**
3141
- * the order id of the affected subscription
3142
- * @format GUID
3214
+ * Status of the latest payment attempt.
3215
+ *
3216
+ * + `"UNKNOWN"`: There is no information about the status of the latest payment attempt.
3217
+ * + `"SCHEDULED"`: The latest payment attempt is scheduled but hasn't started yet.
3218
+ * + `"IN_PROGRESS"`: The latest payment attempt is in progress.
3219
+ * + `"PAID"`: The latest payment attempt resulted in a successful payment.
3220
+ * + `"DECLINED"`: The latest payment attempt has been declined.
3221
+ * + `"TECHNICAL_FAILURE"`: The latest payment attempt couldn't be process due to a technical failure.
3222
+ * + `"CANCELED"`: The latest payment attempt has been canceled by BASS.
3223
+ * @readonly
3143
3224
  */
3144
- orderId?: string;
3145
- }
3146
- interface MarkBillingCycleAsPaidRequest {
3225
+ status?: PaymentAttemptStatusWithLiterals;
3147
3226
  /**
3148
- * The ID of the subscription to mark as paid its invoice.
3149
- * @format GUID
3227
+ * Whether BASS tries to collect the payment another time. Available only when
3228
+ * `latestPaymentAttempt.status` is set to `"DECLINED"`.
3150
3229
  */
3151
- subscriptionId: string;
3230
+ retryable?: boolean;
3152
3231
  /**
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
3232
+ * Platform fee that was collected on this transaction.
3233
+ * @format DECIMAL_VALUE
3234
+ * @decimalValue options { gte:0.00, maxScale:2 }
3235
+ * @readonly
3156
3236
  */
3157
- paidCycle?: number | null;
3158
- }
3159
- interface MarkBillingCycleAsPaidResponse {
3160
- subscription?: Subscription;
3237
+ appliedPlatformFee?: string | null;
3161
3238
  }
3162
- interface GetSubscriptionsStatsRequest {
3239
+ declare enum PaymentAttemptStatus {
3240
+ UNKNOWN = "UNKNOWN",
3241
+ SCHEDULED = "SCHEDULED",
3242
+ IN_PROGRESS = "IN_PROGRESS",
3243
+ PAID = "PAID",
3244
+ DECLINED = "DECLINED",
3245
+ TECHNICAL_FAILURE = "TECHNICAL_FAILURE",
3246
+ CANCELED = "CANCELED",
3247
+ PENDING = "PENDING",
3248
+ REFUNDED = "REFUNDED",
3249
+ CHARGEBACKED = "CHARGEBACKED"
3163
3250
  }
3164
- interface GetSubscriptionsStatsResponse {
3165
- amountByStatuses?: AmountByStatus[];
3166
- total?: number;
3251
+ /** @enumType */
3252
+ type PaymentAttemptStatusWithLiterals = PaymentAttemptStatus | 'UNKNOWN' | 'SCHEDULED' | 'IN_PROGRESS' | 'PAID' | 'DECLINED' | 'TECHNICAL_FAILURE' | 'CANCELED' | 'PENDING' | 'REFUNDED' | 'CHARGEBACKED';
3253
+ interface PriceAdjustment extends PriceAdjustmentAdjustmentTypeOneOf {
3254
+ /** Adjustment that increases the price. */
3255
+ charge?: PriceAdjustmentValue;
3256
+ /** Adjustment that lowers the price. */
3257
+ credit?: PriceAdjustmentValue;
3258
+ /** Reason for this price adjustment. Used to categorize proration adjustments. */
3259
+ reason?: PriceAdjustmentReasonWithLiterals;
3167
3260
  }
3168
- interface AmountByStatus {
3169
- status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
3170
- amount?: number;
3261
+ /** @oneof */
3262
+ interface PriceAdjustmentAdjustmentTypeOneOf {
3263
+ /** Adjustment that increases the price. */
3264
+ charge?: PriceAdjustmentValue;
3265
+ /** Adjustment that lowers the price. */
3266
+ credit?: PriceAdjustmentValue;
3171
3267
  }
3172
- interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
3173
- /** User won't be charged for additional period added on top of subscription end date. */
3174
- extensionPeriod?: Duration;
3268
+ interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValueTypeOneOf {
3175
3269
  /**
3176
- * user will be charged for billing cycles added
3177
- * @min 1
3270
+ * Absolute amount that adjusts the price.
3271
+ *
3272
+ * Min: `0.01`
3273
+ * @decimalValue options { gt:0.00 }
3178
3274
  */
3179
- extensionBillingCycles?: number;
3275
+ amount?: string;
3180
3276
  /**
3181
- * The ID of the subscription to be extended
3182
- * @format GUID
3277
+ * Relative factor that adjusts the price. For example, setting
3278
+ * `multiplier` to:
3279
+ * - `0.50` results in a price adjustment of 50% of the original value.
3280
+ * - `0.75` results in a price adjustment of 75% of the original value.
3281
+ * - `1.00` results in a price adjustment of 100% of the original value.
3282
+ *
3283
+ * Min: `0.01`
3284
+ * Max: `1.00`
3285
+ * @decimalValue options { gt:0.00, lte:1 }
3183
3286
  */
3184
- _id: string;
3185
- actionContext: ActionContext;
3287
+ multiplier?: string;
3186
3288
  }
3187
3289
  /** @oneof */
3188
- interface ExtendSubscriptionRequestExtendPolicyOneOf {
3189
- /** User won't be charged for additional period added on top of subscription end date. */
3190
- extensionPeriod?: Duration;
3290
+ interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
3191
3291
  /**
3192
- * user will be charged for billing cycles added
3193
- * @min 1
3292
+ * Absolute amount that adjusts the price.
3293
+ *
3294
+ * Min: `0.01`
3295
+ * @decimalValue options { gt:0.00 }
3194
3296
  */
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;
3297
+ amount?: string;
3204
3298
  /**
3205
- * List of additional fields to be included in the response.
3206
- * @maxSize 1
3299
+ * Relative factor that adjusts the price. For example, setting
3300
+ * `multiplier` to:
3301
+ * - `0.50` results in a price adjustment of 50% of the original value.
3302
+ * - `0.75` results in a price adjustment of 75% of the original value.
3303
+ * - `1.00` results in a price adjustment of 100% of the original value.
3304
+ *
3305
+ * Min: `0.01`
3306
+ * Max: `1.00`
3307
+ * @decimalValue options { gt:0.00, lte:1 }
3207
3308
  */
3208
- fields?: RequestedFieldsWithLiterals[];
3309
+ multiplier?: string;
3209
3310
  }
3210
- declare enum RequestedFields {
3211
- /** Include unsupported action list, including the reasons for the lack of support */
3212
- UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
3311
+ /** Reason for a price adjustment. Categorizes different types of proration adjustments. */
3312
+ declare enum PriceAdjustmentReason {
3313
+ /** Default value. Used for adjustments without a specific categorization. */
3314
+ PRICE_ADJUSTMENT_REASON_UNSPECIFIED = "PRICE_ADJUSTMENT_REASON_UNSPECIFIED",
3315
+ /** Adjustment due to a billing date change. */
3316
+ BILLING_DATE_CHANGE = "BILLING_DATE_CHANGE",
3317
+ /** Proration adjustment from changing the subscription plan. */
3318
+ PLAN_CHANGE_PRORATION = "PLAN_CHANGE_PRORATION",
3319
+ /** Proration adjustment from changing the billing cycle (e.g., monthly to yearly). */
3320
+ CYCLE_CHANGE_PRORATION = "CYCLE_CHANGE_PRORATION",
3321
+ /** Proration adjustment from changing the subscription quantity. */
3322
+ QUANTITY_CHANGE_PRORATION = "QUANTITY_CHANGE_PRORATION",
3323
+ /** Custom adjustment provided by the caller. */
3324
+ CUSTOM_PRICE_ADJUSTMENT = "CUSTOM_PRICE_ADJUSTMENT"
3213
3325
  }
3214
3326
  /** @enumType */
3215
- type RequestedFieldsWithLiterals = RequestedFields | 'UNSUPPORTED_ACTION';
3216
- interface AllowedActionsResponse {
3217
- /** List of actions that are allowed. */
3218
- actions?: Action[];
3327
+ type PriceAdjustmentReasonWithLiterals = PriceAdjustmentReason | 'PRICE_ADJUSTMENT_REASON_UNSPECIFIED' | 'BILLING_DATE_CHANGE' | 'PLAN_CHANGE_PRORATION' | 'CYCLE_CHANGE_PRORATION' | 'QUANTITY_CHANGE_PRORATION' | 'CUSTOM_PRICE_ADJUSTMENT';
3328
+ interface InvoiceShippingCharges {
3219
3329
  /**
3220
- * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
3221
- * @maxSize 20
3330
+ * Amount of the shipping fee in `0.00` format.
3331
+ *
3332
+ * Min: `0.01`
3333
+ * @decimalValue options { gte:0.00, maxScale:2 }
3222
3334
  */
3223
- unsupportedActions?: UnsupportedAction[];
3335
+ amount?: string;
3336
+ /** Tax of the shipping fee */
3337
+ tax?: Tax;
3338
+ /** Information about the shipping charges tax data */
3339
+ taxData?: ItemTaxData;
3340
+ discount?: Discount;
3224
3341
  }
3225
- interface UnsupportedAction {
3226
- actionType?: ActionTypeWithLiterals;
3342
+ /** Tax data from all items */
3343
+ interface TaxData {
3344
+ /** Aggregated tax data from all items */
3345
+ taxSummary?: TaxSummary;
3346
+ }
3347
+ interface TaxSummary {
3227
3348
  /**
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
3349
+ * Aggregated from tax_breakdowns with exemptions excluded from amount
3350
+ * @format DECIMAL_VALUE
3230
3351
  */
3231
- reasons?: UnsupportedReason[];
3232
- }
3233
- interface UnsupportedReason {
3234
- code?: string;
3235
- description?: string | null;
3236
- }
3237
- interface ListUpcomingChargesRequest {
3352
+ aggregatedTaxAmount?: string;
3238
3353
  /**
3239
- * Subscription id charges to be previewed for
3240
- * @format GUID
3354
+ * Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`.
3355
+ * @maxSize 50
3241
3356
  */
3242
- subscriptionId: string;
3243
- /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
3244
- customDuration?: Duration;
3357
+ aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
3245
3358
  /**
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.
3359
+ * 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.
3360
+ * @format DECIMAL_VALUE
3361
+ * @decimalValue options { maxScale:4 }
3248
3362
  */
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[];
3363
+ exemptAmount?: string | null;
3272
3364
  }
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 {
3365
+ interface AggregatedTaxBreakdown {
3285
3366
  /**
3286
- * Information required to calculate the preview charges for the subscriptions, including an identifier.
3287
- * @minSize 1
3288
- * @maxSize 10
3367
+ * Name of the tax that was calculated.
3368
+ * @maxLength 200
3289
3369
  */
3290
- subscriptionsBillingDetails?: SubscriptionBillingDetails[];
3370
+ taxName?: string;
3291
3371
  /**
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
3372
+ * Type of tax that was calculated.
3373
+ * @maxLength 200
3304
3374
  */
3305
- numberOfNextRecurringCharges?: number | null;
3306
- }
3307
- interface SubscriptionBillingDetails {
3375
+ taxType?: string;
3308
3376
  /**
3309
- * External identifier of the subscription
3310
- * @format GUID
3377
+ * Jurisdiction that taxes were calculated for.
3378
+ * @maxLength 200
3311
3379
  */
3312
- externalId?: string | null;
3313
- /** Billing details parameters including schedule, currency, etc. */
3314
- billingSettings?: BillingSettings;
3380
+ jurisdiction?: string;
3381
+ /** Type of jurisdiction that taxes were calculated for. */
3382
+ jurisdictionType?: string;
3315
3383
  /**
3316
- * Items, minSize is 1, maxSize is 100
3317
- * @minSize 1
3318
- * @maxSize 100
3384
+ * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
3385
+ * @decimalValue options { gte:0, maxScale:6 }
3319
3386
  */
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[];
3387
+ rate?: string;
3388
+ /**
3389
+ * Total amount of this tax for this jurisdiction.
3390
+ * @format DECIMAL_VALUE
3391
+ * @decimalValue options { maxScale:4 }
3392
+ */
3393
+ aggregatedTaxAmount?: string;
3394
+ /**
3395
+ * Total taxable amount of this tax
3396
+ * @internal
3397
+ * @format DECIMAL_VALUE
3398
+ * @decimalValue options { maxScale:4 }
3399
+ */
3400
+ aggregatedTaxableAmount?: string;
3329
3401
  }
3330
- interface SubscriptionCharges {
3402
+ interface RefundInfo {
3331
3403
  /**
3332
- * External identifier of the subscription
3333
- * @format GUID
3404
+ * If refunds are present, this will include the total amount refunded.
3405
+ * @format DECIMAL_VALUE
3406
+ * @decimalValue options { gte:0.00, maxScale:2 }
3334
3407
  */
3335
- externalId?: string | null;
3336
- /** Charges for subscription. */
3337
- charges?: Charge[];
3408
+ totalRefundAmount?: string | null;
3409
+ /**
3410
+ * The refunds that have been applied to this invoice
3411
+ * @maxSize 20
3412
+ */
3413
+ refunds?: Refund[];
3338
3414
  }
3339
- interface CreateSubscriptionForOrderRequest {
3340
- /** Subscription needs to be created */
3341
- subscription?: Subscription;
3415
+ interface Refund {
3342
3416
  /**
3343
- * Optional unique identifier for this request in order to prevent subscription duplications
3417
+ * refund amount
3418
+ * @format DECIMAL_VALUE
3419
+ * @decimalValue options { gt:0.00, maxScale:2 }
3420
+ */
3421
+ amount?: string;
3422
+ /** the date of the refund transaction */
3423
+ transactionDate?: Date | null;
3424
+ /**
3425
+ * the transaction id associated with this refund
3344
3426
  * @format GUID
3345
3427
  */
3346
- idempotencyKey?: string | null;
3428
+ transactionId?: string;
3429
+ /** a reason for the refund */
3430
+ reason?: RefundReasonWithLiterals;
3431
+ /**
3432
+ * a description of the refund - this is a free text field for the initiator
3433
+ * @maxLength 255
3434
+ */
3435
+ description?: string | null;
3347
3436
  }
3348
- interface CreateSubscriptionForOrderResponse {
3349
- /** Created subscription */
3350
- subscription?: Subscription;
3351
- /** Non-persistent invoice */
3352
- invoice?: Invoice;
3437
+ declare enum RefundReason {
3438
+ DUPLICATE_CHARGE = "DUPLICATE_CHARGE",
3439
+ FRAUDULENT = "FRAUDULENT",
3440
+ CUSTOMER_REQUEST = "CUSTOMER_REQUEST",
3441
+ PROVISION_FAILED = "PROVISION_FAILED",
3442
+ OTHER = "OTHER"
3353
3443
  }
3354
- /** An invoice includes information about the subscription and the customer. */
3355
- interface Invoice {
3444
+ /** @enumType */
3445
+ type RefundReasonWithLiterals = RefundReason | 'DUPLICATE_CHARGE' | 'FRAUDULENT' | 'CUSTOMER_REQUEST' | 'PROVISION_FAILED' | 'OTHER';
3446
+ interface ChangeSubscriptionRequest {
3356
3447
  /**
3357
- * Invoice ID.
3448
+ * ID of the subscription to change
3358
3449
  * @format GUID
3359
- * @readonly
3360
3450
  */
3361
- _id?: string | null;
3451
+ subscriptionId?: string;
3362
3452
  /**
3363
- * Date and time the invoice was created.
3364
- * @readonly
3453
+ * Item-level changes. Each entry targets one existing item by ID.
3454
+ * Caller passes CONCRETE new values (price, quantity, name) — BASS does not resolve pricing.
3455
+ * BASS uses these for proration: old values (from subscription) vs new values (from here).
3365
3456
  */
3366
- _createdDate?: Date | null;
3457
+ itemChanges?: SubscriptionItemChange[];
3367
3458
  /**
3368
- * Date and time the invoice was last updated.
3369
- * @readonly
3459
+ * Subscription-level: new billing cycle (e.g., monthly to yearly).
3460
+ * Affects the billing period for ALL items.
3461
+ * When changing cycle, caller MUST also pass new prices in item_changes.
3370
3462
  */
3371
- _updatedDate?: Date | null;
3372
- /**
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
3463
+ newCycle?: Duration;
3464
+ /** When the change takes effect. */
3465
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
3466
+ /** How to handle proration for immediate changes. Ignored for AT_NEXT_RENEWAL. */
3467
+ prorationBehavior?: ProrationBehaviorEnumProrationBehaviorWithLiterals;
3468
+ /** Payment context for immediate changes without checkout flow. */
3469
+ paymentContext?: ChangePaymentContext;
3470
+ }
3471
+ /**
3472
+ * Describes a change to a single subscription item.
3473
+ * The caller (BG/CVS) resolves pricing from their catalog and passes concrete values.
3474
+ */
3475
+ interface SubscriptionItemChange {
3476
+ /**
3477
+ * Which item to change. Must match an existing item ID in the subscription.
3478
+ * @format GUID
3379
3479
  */
3380
- revision?: string | null;
3381
- /** Information about the invoice origin. */
3382
- origin?: BusinessOriginData;
3480
+ itemId?: string;
3383
3481
  /**
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
3482
+ * New price per unit. Caller resolves this from their product catalog.
3483
+ * Required when changing product/plan. Optional for quantity-only changes (uses current price).
3484
+ * @decimalValue options { gte:0.00, maxScale:2 }
3393
3485
  */
3394
- status?: InvoiceStatusWithLiterals;
3486
+ newPrice?: string | null;
3395
3487
  /**
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
3488
+ * New quantity (seats/licenses). Optional unchanged if not set.
3489
+ * @min 1
3399
3490
  */
3400
- currency?: string;
3401
- /** Information about the customer. */
3402
- customer?: Customer;
3491
+ newQuantity?: number | null;
3403
3492
  /**
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.
3493
+ * New catalog reference. Optional set when changing to a different product.
3494
+ * This is metadata for the caller's tracking; BASS does not use it for pricing.
3410
3495
  */
3411
- collectionMethod?: CollectionMethodWithLiterals;
3496
+ newCatalogReference?: CatalogReference;
3412
3497
  /**
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
3498
+ * New item name. Optional — set when changing to a different product.
3499
+ * @maxLength 200
3418
3500
  */
3419
- paymentMethodId?: string | null;
3501
+ newName?: string | null;
3502
+ }
3503
+ declare enum ChangeEffectiveTime {
3504
+ UNKNOWN = "UNKNOWN",
3505
+ /** Apply change immediately with proration */
3506
+ IMMEDIATELY = "IMMEDIATELY",
3507
+ /** Schedule change for the next billing cycle */
3508
+ AT_NEXT_RENEWAL = "AT_NEXT_RENEWAL"
3509
+ }
3510
+ /** @enumType */
3511
+ type ChangeEffectiveTimeWithLiterals = ChangeEffectiveTime | 'UNKNOWN' | 'IMMEDIATELY' | 'AT_NEXT_RENEWAL';
3512
+ declare enum ProrationBehaviorEnumProrationBehavior {
3513
+ UNKNOWN = "UNKNOWN",
3514
+ /** Credit unused time + charge new prorated price (default for upgrades) */
3515
+ PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
3516
+ /** Credit unused time + refund to payment method (downgrades) */
3517
+ PRORATE_AND_REFUND = "PRORATE_AND_REFUND",
3518
+ /** Convert unused value to extra days, no financial transaction */
3519
+ PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND",
3520
+ /** Immediate switch with no financial adjustment */
3521
+ NO_PRORATION = "NO_PRORATION"
3522
+ }
3523
+ /** @enumType */
3524
+ type ProrationBehaviorEnumProrationBehaviorWithLiterals = ProrationBehaviorEnumProrationBehavior | 'UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3525
+ /** Payment context for immediate subscription changes without the checkout flow. */
3526
+ interface ChangePaymentContext {
3527
+ /** Payment settings override for this change */
3528
+ paymentSettings?: PaymentSettings;
3529
+ }
3530
+ interface ChangeSubscriptionResponse {
3531
+ /** Updated subscription */
3532
+ subscription?: Subscription;
3533
+ /** Proration calculation result. Present for immediate changes with proration. */
3534
+ prorationResult?: V1ProrationResult;
3420
3535
  /**
3421
- * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
3422
- * for the corresponding payment.
3536
+ * ID of the adjustment invoice created for the proration charge or refund.
3423
3537
  * @format GUID
3424
- * @readonly
3425
3538
  */
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;
3539
+ adjustmentInvoiceId?: string | null;
3540
+ }
3541
+ /** Result of a proration calculation applied during a subscription change. */
3542
+ interface V1ProrationResult {
3433
3543
  /**
3434
- * Shipping fee in `0.00` format.
3544
+ * Credit amount for unused time on the current plan
3435
3545
  * @format DECIMAL_VALUE
3436
3546
  */
3437
- shippingFee?: string | null;
3547
+ creditAmount?: string;
3438
3548
  /**
3439
- * Information about the invoice's totals.
3440
- * @readonly
3549
+ * Charge amount for the new plan's prorated price
3550
+ * @format DECIMAL_VALUE
3441
3551
  */
3442
- totals?: Totals;
3443
- /** Line items belonging to the invoice. */
3444
- invoiceItems?: InvoiceItem[];
3552
+ chargeAmount?: string;
3445
3553
  /**
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.
3554
+ * Net amount (charge minus credit). Positive means customer pays, negative means refund.
3555
+ * @format DECIMAL_VALUE
3450
3556
  */
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[];
3557
+ netAmount?: string;
3558
+ /** Date when the proration was calculated */
3559
+ prorationDate?: Date | null;
3560
+ /** Remaining seconds in the current billing period at time of change */
3561
+ remainingSeconds?: string;
3562
+ /** Total seconds in the current billing cycle */
3563
+ totalCycleSeconds?: string;
3564
+ }
3565
+ interface PreviewChangeSubscriptionRequest {
3458
3566
  /**
3459
- * Invoice Number.
3460
- * @maxLength 10
3461
- * @readonly
3567
+ * ID of the subscription to preview the change for
3568
+ * @format GUID
3462
3569
  */
3463
- invoiceNumber?: string | null;
3570
+ subscriptionId?: string;
3571
+ /** Item-level changes to preview. Same structure as ChangeSubscriptionRequest. */
3572
+ itemChanges?: SubscriptionItemChange[];
3573
+ /** Subscription-level: preview a cycle change. */
3574
+ newCycle?: Duration;
3575
+ /** When the change would take effect. */
3576
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
3577
+ /** How proration would be handled for immediate changes. */
3578
+ prorationBehavior?: ProrationBehaviorEnumProrationBehaviorWithLiterals;
3579
+ }
3580
+ interface PreviewChangeSubscriptionResponse {
3581
+ /** Summary of the current subscription state */
3582
+ current?: SubscriptionChangeSummary;
3583
+ /** Summary of the proposed subscription state after the change */
3584
+ proposed?: SubscriptionChangeSummary;
3585
+ /** Proration preview details. Present only for immediate changes. */
3586
+ proration?: ProrationPreview;
3587
+ /** Renewal preview. Present only for changes at next renewal. */
3588
+ renewalPreview?: RenewalPreview;
3589
+ }
3590
+ /** Summary of a subscription's state, used in change previews. */
3591
+ interface SubscriptionChangeSummary {
3592
+ /** Product ID */
3593
+ productId?: string;
3594
+ /** Product name */
3595
+ productName?: string;
3596
+ /** Billing cycle duration */
3597
+ cycle?: Duration;
3598
+ /** Number of units */
3599
+ quantity?: number;
3464
3600
  /**
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
3601
+ * Price per unit
3602
+ * @format DECIMAL_VALUE
3468
3603
  */
3469
- shippingCharges?: InvoiceShippingCharges;
3470
- /** Information about the invoice tax */
3471
- taxData?: TaxData;
3472
- /** Business address. */
3473
- businessAddress?: Address;
3604
+ pricePerUnit?: string;
3474
3605
  /**
3475
- * ID of the billing order that created this invoice.
3476
- * @format GUID
3606
+ * Total price (price_per_unit * quantity)
3607
+ * @format DECIMAL_VALUE
3477
3608
  */
3478
- orderId?: string | null;
3609
+ totalPrice?: string;
3479
3610
  /**
3480
- * Platform origin the invoice is originated from.
3481
- * @format GUID
3611
+ * Currency code (ISO 4217)
3612
+ * @format CURRENCY
3482
3613
  */
3483
- platformOriginAppId?: string | null;
3614
+ currency?: string;
3615
+ /** Current billing period start */
3616
+ periodStart?: Date | null;
3617
+ /** Current billing period end */
3618
+ periodEnd?: Date | null;
3619
+ }
3620
+ /** Preview of proration amounts for a proposed subscription change. */
3621
+ interface ProrationPreview {
3484
3622
  /**
3485
- * Refund information, provided that there are refunds for this invoice.
3486
- * @readonly
3623
+ * Credit amount for unused time on the current plan
3624
+ * @format DECIMAL_VALUE
3487
3625
  */
3488
- refundInfo?: RefundInfo;
3489
- }
3490
- interface BusinessOriginData {
3626
+ creditAmount?: string;
3491
3627
  /**
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
3628
+ * Charge amount for the new plan's prorated price
3629
+ * @format DECIMAL_VALUE
3495
3630
  */
3496
- appId?: string;
3631
+ chargeAmount?: string;
3497
3632
  /**
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
3633
+ * Net amount (charge minus credit)
3634
+ * @format DECIMAL_VALUE
3501
3635
  */
3502
- instanceId?: string;
3636
+ netAmount?: string;
3503
3637
  /**
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
3638
+ * Tax amount on the net proration
3639
+ * @format DECIMAL_VALUE
3507
3640
  */
3508
- entityId?: string;
3641
+ taxAmount?: string;
3642
+ /**
3643
+ * Total amount including tax
3644
+ * @format DECIMAL_VALUE
3645
+ */
3646
+ totalAmount?: string;
3647
+ /** Remaining seconds in the current billing period */
3648
+ remainingSeconds?: string;
3649
+ /** Total seconds in the current billing cycle */
3650
+ totalCycleSeconds?: string;
3651
+ /** New period end date. Present when proration_behavior is PRORATE_AND_EXTEND. */
3652
+ newPeriodEnd?: Date | null;
3653
+ /** Number of days added to the billing period. Present when proration_behavior is PRORATE_AND_EXTEND. */
3654
+ daysAdded?: number;
3655
+ /** The proration action that would be taken */
3656
+ action?: ProrationActionWithLiterals;
3509
3657
  }
3510
- declare enum InvoiceStatus {
3658
+ declare enum ProrationAction {
3511
3659
  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"
3660
+ /** Net charge to customer */
3661
+ CHARGE = "CHARGE",
3662
+ /** Net refund to customer */
3663
+ REFUND = "REFUND",
3664
+ /** Extend billing period instead of refund */
3665
+ EXTEND_PERIOD = "EXTEND_PERIOD",
3666
+ /** No financial change needed */
3667
+ NO_CHANGE = "NO_CHANGE"
3519
3668
  }
3520
3669
  /** @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"
3670
+ type ProrationActionWithLiterals = ProrationAction | 'UNKNOWN' | 'CHARGE' | 'REFUND' | 'EXTEND_PERIOD' | 'NO_CHANGE';
3671
+ /** Preview of what the next renewal will look like after a change. */
3672
+ interface RenewalPreview {
3673
+ /**
3674
+ * New price per unit at next renewal
3675
+ * @format DECIMAL_VALUE
3676
+ */
3677
+ newPrice?: string;
3678
+ /**
3679
+ * New total at next renewal (price * quantity)
3680
+ * @format DECIMAL_VALUE
3681
+ */
3682
+ newTotal?: string;
3683
+ /** Date of the next renewal */
3684
+ nextRenewalDate?: Date | null;
3527
3685
  }
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"
3686
+ interface CancelPendingChangeRequest {
3687
+ /**
3688
+ * ID of the subscription to cancel the pending change for
3689
+ * @format GUID
3690
+ */
3691
+ subscriptionId?: string;
3534
3692
  }
3535
- /** @enumType */
3536
- type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL';
3537
- interface LatestPaymentAttempt {
3693
+ interface CancelPendingChangeResponse {
3694
+ /** Updated subscription with cleared pending data */
3695
+ subscription?: Subscription;
3696
+ }
3697
+ interface ChangeSubscriptionForOrderRequest {
3698
+ /** The new subscription definition from the order (items, billing settings). */
3699
+ subscription?: Subscription;
3700
+ /** Context of the change: source subscription, change type, proration behavior. */
3701
+ changeContext?: ChangeContext;
3702
+ }
3703
+ /**
3704
+ * Context for subscription changes within the order/checkout flow.
3705
+ * Carries the source subscription reference and change parameters.
3706
+ * Present on an OrderSubscription when it represents a modification of an
3707
+ * existing subscription rather than a new purchase.
3708
+ */
3709
+ interface ChangeContext {
3538
3710
  /**
3539
- * ID of the latest payment attempt.
3711
+ * ID of the existing subscription being changed.
3540
3712
  * @format GUID
3541
- * @readonly
3542
3713
  */
3543
- paymentAttemptId?: string;
3714
+ sourceSubscriptionId?: string;
3715
+ /** Type of change being performed. */
3716
+ changeType?: ChangeTypeWithLiterals;
3717
+ /** How proration should be handled. */
3718
+ prorationBehavior?: ProrationBehaviorWithLiterals;
3544
3719
  /**
3545
- * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.
3546
- * @readonly
3720
+ * System-populated: proration result after calculation.
3721
+ * Populated by billing-subscriptions during order processing.
3547
3722
  */
3548
- dateAttempt?: Date | null;
3549
- /** Number of the latest payment attempt. */
3550
- attemptNumber?: number;
3723
+ prorationResult?: ProrationResult;
3724
+ }
3725
+ declare enum ChangeType {
3726
+ CHANGE_TYPE_UNKNOWN = "CHANGE_TYPE_UNKNOWN",
3727
+ UPGRADE = "UPGRADE",
3728
+ DOWNGRADE = "DOWNGRADE",
3729
+ CYCLE_CHANGE = "CYCLE_CHANGE",
3730
+ QUANTITY_CHANGE = "QUANTITY_CHANGE"
3731
+ }
3732
+ /** @enumType */
3733
+ type ChangeTypeWithLiterals = ChangeType | 'CHANGE_TYPE_UNKNOWN' | 'UPGRADE' | 'DOWNGRADE' | 'CYCLE_CHANGE' | 'QUANTITY_CHANGE';
3734
+ declare enum ProrationBehavior {
3735
+ PRORATION_BEHAVIOR_UNKNOWN = "PRORATION_BEHAVIOR_UNKNOWN",
3736
+ /** Credit unused time + charge new prorated price (default for upgrades) */
3737
+ PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
3738
+ /** Credit unused time + refund to payment method (downgrades) */
3739
+ PRORATE_AND_REFUND = "PRORATE_AND_REFUND",
3740
+ /** Convert unused value to extra days, no financial transaction */
3741
+ PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND",
3742
+ /** Immediate switch with no financial adjustment */
3743
+ NO_PRORATION = "NO_PRORATION"
3744
+ }
3745
+ /** @enumType */
3746
+ type ProrationBehaviorWithLiterals = ProrationBehavior | 'PRORATION_BEHAVIOR_UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3747
+ /**
3748
+ * Result of a proration calculation. Contains the credit, charge, and net amounts
3749
+ * computed during a subscription change.
3750
+ */
3751
+ interface ProrationResult {
3551
3752
  /**
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
3753
+ * Credit amount for unused time on the current plan
3754
+ * @format DECIMAL_VALUE
3562
3755
  */
3563
- status?: PaymentAttemptStatusWithLiterals;
3756
+ creditAmount?: string;
3564
3757
  /**
3565
- * Whether BASS tries to collect the payment another time. Available only when
3566
- * `latestPaymentAttempt.status` is set to `"DECLINED"`.
3758
+ * Charge amount for the new plan's prorated price
3759
+ * @format DECIMAL_VALUE
3567
3760
  */
3568
- retryable?: boolean;
3761
+ chargeAmount?: string;
3569
3762
  /**
3570
- * Platform fee that was collected on this transaction.
3763
+ * Net amount (charge minus credit). Positive means customer pays, negative means refund.
3571
3764
  * @format DECIMAL_VALUE
3572
- * @decimalValue options { gte:0.00, maxScale:2 }
3573
- * @readonly
3574
3765
  */
3575
- appliedPlatformFee?: string | null;
3766
+ netAmount?: string;
3767
+ /** Date when the proration was calculated */
3768
+ prorationDate?: Date | null;
3769
+ /** Remaining seconds in the current billing period at time of change */
3770
+ remainingSeconds?: string;
3771
+ /** Total seconds in the current billing cycle */
3772
+ totalCycleSeconds?: string;
3576
3773
  }
3577
- declare enum PaymentAttemptStatus {
3578
- UNKNOWN = "UNKNOWN",
3579
- SCHEDULED = "SCHEDULED",
3580
- IN_PROGRESS = "IN_PROGRESS",
3581
- PAID = "PAID",
3582
- DECLINED = "DECLINED",
3583
- TECHNICAL_FAILURE = "TECHNICAL_FAILURE",
3584
- CANCELED = "CANCELED",
3585
- PENDING = "PENDING",
3586
- REFUNDED = "REFUNDED",
3587
- CHARGEBACKED = "CHARGEBACKED"
3774
+ interface ChangeSubscriptionForOrderResponse {
3775
+ /** The source subscription (unchanged, for reference). */
3776
+ subscription?: Subscription;
3777
+ /** Non-persistent invoice with proration adjustments. */
3778
+ invoice?: Invoice;
3779
+ /** Calculated proration result. */
3780
+ prorationResult?: ProrationResult;
3588
3781
  }
3589
- /** @enumType */
3590
- type PaymentAttemptStatusWithLiterals = PaymentAttemptStatus | 'UNKNOWN' | 'SCHEDULED' | 'IN_PROGRESS' | 'PAID' | 'DECLINED' | 'TECHNICAL_FAILURE' | 'CANCELED' | 'PENDING' | 'REFUNDED' | 'CHARGEBACKED';
3591
- interface PriceAdjustment extends PriceAdjustmentAdjustmentTypeOneOf {
3592
- /** Adjustment that increases the price. */
3593
- charge?: PriceAdjustmentValue;
3594
- /** Adjustment that lowers the price. */
3595
- credit?: PriceAdjustmentValue;
3596
- /** Reason for this price adjustment. Used to categorize proration adjustments. */
3597
- reason?: PriceAdjustmentReasonWithLiterals;
3782
+ interface Task {
3783
+ key?: TaskKey;
3784
+ executeAt?: Date | null;
3785
+ payload?: string | null;
3786
+ }
3787
+ interface TaskKey {
3788
+ appId?: string;
3789
+ instanceId?: string;
3790
+ subjectId?: string | null;
3791
+ }
3792
+ interface TaskAction extends TaskActionActionOneOf {
3793
+ complete?: Complete;
3794
+ cancel?: Cancel;
3795
+ reschedule?: Reschedule;
3598
3796
  }
3599
3797
  /** @oneof */
3600
- interface PriceAdjustmentAdjustmentTypeOneOf {
3601
- /** Adjustment that increases the price. */
3602
- charge?: PriceAdjustmentValue;
3603
- /** Adjustment that lowers the price. */
3604
- credit?: PriceAdjustmentValue;
3798
+ interface TaskActionActionOneOf {
3799
+ complete?: Complete;
3800
+ cancel?: Cancel;
3801
+ reschedule?: Reschedule;
3605
3802
  }
3606
- interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValueTypeOneOf {
3803
+ interface Complete {
3804
+ }
3805
+ interface Cancel {
3806
+ }
3807
+ interface Reschedule {
3808
+ executeAt?: Date | null;
3809
+ payload?: string | null;
3810
+ }
3811
+ interface Empty {
3812
+ }
3813
+ interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
3814
+ /** A subscriptions was created */
3815
+ created?: V1SubscriptionCreated;
3816
+ /** Subscription is considered active and will be visible to site owners and members */
3817
+ activated?: V1SubscriptionActivated;
3607
3818
  /**
3608
- * Absolute amount that adjusts the price.
3609
- *
3610
- * Min: `0.01`
3611
- * @decimalValue options { gt:0.00 }
3819
+ * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
3820
+ * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
3612
3821
  */
3613
- amount?: string;
3822
+ canceled?: V1SubscriptionCanceled;
3823
+ /** Subscription was updated. Currently the only possible change is valid_until date */
3824
+ updated?: V1SubscriptionUpdated;
3825
+ /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
3826
+ cycleTriggered?: SubscriptionCycleTriggered;
3827
+ /** Offline subscription was marked as paid */
3828
+ markedAsPaid?: SubscriptionMarkedAsPaid;
3614
3829
  /**
3615
- * Relative factor that adjusts the price. For example, setting
3616
- * `multiplier` to:
3617
- * - `0.50` results in a price adjustment of 50% of the original value.
3618
- * - `0.75` results in a price adjustment of 75% of the original value.
3619
- * - `1.00` results in a price adjustment of 100% of the original value.
3620
- *
3621
- * Min: `0.01`
3622
- * Max: `1.00`
3623
- * @decimalValue options { gt:0.00, lte:1 }
3830
+ * Subscription cancellation for the future date was requested.
3831
+ * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
3624
3832
  */
3625
- multiplier?: string;
3833
+ cancellationRequested?: SubscriptionCancellationRequested;
3834
+ /** Subscription and it's payment schedule (for recurring) was suspended */
3835
+ suspended?: SubscriptionSuspended;
3836
+ /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
3837
+ resumed?: V1SubscriptionResumed;
3838
+ /** Subscription expired according to valid_until expiration date. */
3839
+ expired?: SubscriptionExpired;
3840
+ /** Subscription initial purchase completed */
3841
+ initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
3626
3842
  }
3627
3843
  /** @oneof */
3628
- interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
3844
+ interface V1SubscriptionEventEventOneOf {
3845
+ /** A subscriptions was created */
3846
+ created?: V1SubscriptionCreated;
3847
+ /** Subscription is considered active and will be visible to site owners and members */
3848
+ activated?: V1SubscriptionActivated;
3629
3849
  /**
3630
- * Absolute amount that adjusts the price.
3631
- *
3632
- * Min: `0.01`
3633
- * @decimalValue options { gt:0.00 }
3850
+ * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
3851
+ * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
3634
3852
  */
3635
- amount?: string;
3853
+ canceled?: V1SubscriptionCanceled;
3854
+ /** Subscription was updated. Currently the only possible change is valid_until date */
3855
+ updated?: V1SubscriptionUpdated;
3856
+ /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
3857
+ cycleTriggered?: SubscriptionCycleTriggered;
3858
+ /** Offline subscription was marked as paid */
3859
+ markedAsPaid?: SubscriptionMarkedAsPaid;
3636
3860
  /**
3637
- * Relative factor that adjusts the price. For example, setting
3638
- * `multiplier` to:
3639
- * - `0.50` results in a price adjustment of 50% of the original value.
3640
- * - `0.75` results in a price adjustment of 75% of the original value.
3641
- * - `1.00` results in a price adjustment of 100% of the original value.
3642
- *
3643
- * Min: `0.01`
3644
- * Max: `1.00`
3645
- * @decimalValue options { gt:0.00, lte:1 }
3861
+ * Subscription cancellation for the future date was requested.
3862
+ * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
3646
3863
  */
3647
- multiplier?: string;
3864
+ cancellationRequested?: SubscriptionCancellationRequested;
3865
+ /** Subscription and it's payment schedule (for recurring) was suspended */
3866
+ suspended?: SubscriptionSuspended;
3867
+ /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
3868
+ resumed?: V1SubscriptionResumed;
3869
+ /** Subscription expired according to valid_until expiration date. */
3870
+ expired?: SubscriptionExpired;
3871
+ /** Subscription initial purchase completed */
3872
+ initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
3648
3873
  }
3649
- /** Reason for a price adjustment. Categorizes different types of proration adjustments. */
3650
- declare enum PriceAdjustmentReason {
3651
- /** Default value. Used for adjustments without a specific categorization. */
3652
- PRICE_ADJUSTMENT_REASON_UNSPECIFIED = "PRICE_ADJUSTMENT_REASON_UNSPECIFIED",
3653
- /** Adjustment due to a billing date change. */
3654
- BILLING_DATE_CHANGE = "BILLING_DATE_CHANGE",
3655
- /** Proration adjustment from changing the subscription plan. */
3656
- PLAN_CHANGE_PRORATION = "PLAN_CHANGE_PRORATION",
3657
- /** Proration adjustment from changing the billing cycle (e.g., monthly to yearly). */
3658
- CYCLE_CHANGE_PRORATION = "CYCLE_CHANGE_PRORATION",
3659
- /** Proration adjustment from changing the subscription quantity. */
3660
- QUANTITY_CHANGE_PRORATION = "QUANTITY_CHANGE_PRORATION",
3661
- /** Custom adjustment provided by the caller. */
3662
- CUSTOM_PRICE_ADJUSTMENT = "CUSTOM_PRICE_ADJUSTMENT"
3874
+ interface V1SubscriptionCreated {
3875
+ subscription?: V1Subscription;
3663
3876
  }
3664
- /** @enumType */
3665
- type PriceAdjustmentReasonWithLiterals = PriceAdjustmentReason | 'PRICE_ADJUSTMENT_REASON_UNSPECIFIED' | 'BILLING_DATE_CHANGE' | 'PLAN_CHANGE_PRORATION' | 'CYCLE_CHANGE_PRORATION' | 'QUANTITY_CHANGE_PRORATION' | 'CUSTOM_PRICE_ADJUSTMENT';
3666
- interface InvoiceShippingCharges {
3877
+ interface V1Subscription {
3667
3878
  /**
3668
- * Amount of the shipping fee in `0.00` format.
3669
- *
3670
- * Min: `0.01`
3671
- * @decimalValue options { gte:0.00, maxScale:2 }
3672
- */
3673
- amount?: string;
3674
- /** Tax of the shipping fee */
3675
- tax?: Tax;
3676
- /** Information about the shipping charges tax data */
3677
- taxData?: ItemTaxData;
3678
- discount?: Discount;
3679
- }
3680
- /** Tax data from all items */
3681
- interface TaxData {
3682
- /** Aggregated tax data from all items */
3683
- taxSummary?: TaxSummary;
3684
- }
3685
- interface TaxSummary {
3686
- /**
3687
- * Aggregated from tax_breakdowns with exemptions excluded from amount
3688
- * @format DECIMAL_VALUE
3879
+ * ID of the subscription
3880
+ * @format GUID
3881
+ * @readonly
3689
3882
  */
3690
- aggregatedTaxAmount?: string;
3883
+ _id?: string;
3691
3884
  /**
3692
- * Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`.
3693
- * @maxSize 50
3885
+ * ID of the app which created the subscription
3886
+ * @format GUID
3694
3887
  */
3695
- aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
3696
- }
3697
- interface AggregatedTaxBreakdown {
3888
+ wixAppId?: string;
3698
3889
  /**
3699
- * Name of the tax that was calculated.
3700
- * @maxLength 200
3890
+ * Instance ID of the Subscriptions app
3891
+ * @format GUID
3701
3892
  */
3702
- taxName?: string;
3893
+ tenantId?: string;
3703
3894
  /**
3704
- * Type of tax that was calculated.
3705
- * @maxLength 200
3895
+ * ID of entity in app (e.g. a cart in stores/order in paid plans)
3896
+ * @format GUID
3706
3897
  */
3707
- taxType?: string;
3898
+ originEntityId?: string;
3899
+ /** Site member or a contact who bought the subscription */
3900
+ subscriber?: Subscriber;
3708
3901
  /**
3709
- * Jurisdiction that taxes were calculated for.
3710
- * @maxLength 200
3902
+ * Wix Pay order ID, is empty for free subscriptions
3903
+ * @format GUID
3711
3904
  */
3712
- jurisdiction?: string;
3713
- /** Type of jurisdiction that taxes were calculated for. */
3714
- jurisdictionType?: string;
3905
+ wixPayOrderId?: string | null;
3715
3906
  /**
3716
- * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
3717
- * @decimalValue options { gte:0, maxScale:6 }
3907
+ * Subscription name (e.g. a product or subscription package name)
3908
+ * @maxLength 150
3718
3909
  */
3719
- rate?: string;
3910
+ name?: string;
3720
3911
  /**
3721
- * Total amount of this tax for this jurisdiction.
3722
- * @format DECIMAL_VALUE
3723
- * @decimalValue options { maxScale:4 }
3912
+ * Optional additional subscription description
3913
+ * @maxLength 500
3724
3914
  */
3725
- aggregatedTaxAmount?: string;
3915
+ description?: string;
3916
+ /** Amount to be paid for a single scheduled payment */
3917
+ price?: Money;
3918
+ /** True if the subscription is recurring, false for a single payment subscription */
3919
+ recurring?: boolean;
3920
+ /** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */
3921
+ subscriptionType?: SubscriptionTypeWithLiterals;
3922
+ /** Active, expired, canceled, etc. */
3923
+ subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals;
3924
+ /** Subscription start date (may differ from creation date) */
3925
+ validFrom?: Date | null;
3926
+ /** Subscription expiration date */
3927
+ validUntil?: Date | null;
3928
+ /** Status of last payment associated with this subscription */
3929
+ lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals;
3930
+ /** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */
3931
+ billingProfile?: V2Subscription;
3932
+ /** Owner, member, etc. - present if subscription is canceled */
3933
+ cancellationInitiator?: CancellationInitiatorWithLiterals;
3934
+ /** Optional, present if subscription is canceled */
3935
+ cancellationReason?: string | null;
3936
+ /** Can be used for arbitrary app-specific map<string, string> data */
3937
+ externalData?: Record<string, string>;
3938
+ /** Date when subscription was created (not related to payment dates) */
3939
+ dateCreated?: Date | null;
3940
+ /** Restrictions on possible subscription actions. Default policy has all restrictions enabled. */
3941
+ policy?: SubscriptionPolicy;
3942
+ /** List of subscription suspension periods */
3943
+ suspensions?: Suspension[];
3944
+ /** Initial subscription expiration date that was calculated on the subscription purchase plus duration of suspensions */
3945
+ validUntilDateWithSuspensions?: Date | null;
3946
+ /** Duration of single payment subscription (instead of billing_profile) */
3947
+ singlePaymentDuration?: V1Duration;
3948
+ /** @format GUID */
3949
+ originInstanceId?: string | null;
3726
3950
  }
3727
- interface RefundInfo {
3728
- /**
3729
- * If refunds are present, this will include the total amount refunded.
3730
- * @format DECIMAL_VALUE
3731
- * @decimalValue options { gte:0.00, maxScale:2 }
3732
- */
3733
- totalRefundAmount?: string | null;
3951
+ interface Subscriber {
3734
3952
  /**
3735
- * The refunds that have been applied to this invoice
3736
- * @maxSize 20
3953
+ * Member or contact ID
3954
+ * @format GUID
3737
3955
  */
3738
- refunds?: Refund[];
3956
+ _id?: string;
3957
+ /** Member or contact */
3958
+ identityType?: IdentityTypeWithLiterals;
3739
3959
  }
3740
- interface Refund {
3960
+ declare enum IdentityType {
3961
+ /** Identity type undefined */
3962
+ UNDEFINED = "UNDEFINED",
3963
+ /** Subscription is associated with a member ID */
3964
+ MEMBER = "MEMBER",
3965
+ /** Subscriptions is associated with a contact ID */
3966
+ CONTACT = "CONTACT"
3967
+ }
3968
+ /** @enumType */
3969
+ type IdentityTypeWithLiterals = IdentityType | 'UNDEFINED' | 'MEMBER' | 'CONTACT';
3970
+ /** Price of a payment. Includes amount and currency. */
3971
+ interface Money {
3741
3972
  /**
3742
- * refund amount
3973
+ * Monetary amount i.e. 3.99.
3743
3974
  * @format DECIMAL_VALUE
3744
- * @decimalValue options { gt:0.00, maxScale:2 }
3745
3975
  */
3746
3976
  amount?: string;
3747
- /** the date of the refund transaction */
3748
- transactionDate?: Date | null;
3749
- /**
3750
- * the transaction id associated with this refund
3751
- * @format GUID
3752
- */
3753
- transactionId?: string;
3754
- /** a reason for the refund */
3755
- reason?: RefundReasonWithLiterals;
3756
3977
  /**
3757
- * a description of the refund - this is a free text field for the initiator
3758
- * @maxLength 255
3978
+ * Currency in ISO 4217 format i.e. USD.
3979
+ * @minLength 3
3980
+ * @maxLength 3
3759
3981
  */
3760
- description?: string | null;
3982
+ currency?: string;
3761
3983
  }
3762
- declare enum RefundReason {
3763
- DUPLICATE_CHARGE = "DUPLICATE_CHARGE",
3764
- FRAUDULENT = "FRAUDULENT",
3765
- CUSTOMER_REQUEST = "CUSTOMER_REQUEST",
3766
- PROVISION_FAILED = "PROVISION_FAILED",
3767
- OTHER = "OTHER"
3984
+ declare enum SubscriptionType {
3985
+ UNDEFINED = "UNDEFINED",
3986
+ /** Payments made by the subscriber */
3987
+ ONLINE = "ONLINE",
3988
+ /** Payments managed manually by the site owner */
3989
+ OFFLINE = "OFFLINE"
3768
3990
  }
3769
3991
  /** @enumType */
3770
- type RefundReasonWithLiterals = RefundReason | 'DUPLICATE_CHARGE' | 'FRAUDULENT' | 'CUSTOMER_REQUEST' | 'PROVISION_FAILED' | 'OTHER';
3771
- interface ChangeSubscriptionRequest {
3992
+ type SubscriptionTypeWithLiterals = SubscriptionType | 'UNDEFINED' | 'ONLINE' | 'OFFLINE';
3993
+ declare enum V1SubscriptionStatusEnumSubscriptionStatus {
3994
+ /** Subscription status undefined */
3995
+ UNDEFINED = "UNDEFINED",
3996
+ /** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */
3997
+ DRAFT = "DRAFT",
3998
+ /** Subscription has been paid for, but the start date is in the future */
3999
+ PENDING = "PENDING",
4000
+ /** Subscription is active */
4001
+ ACTIVE = "ACTIVE",
4002
+ /** Subscription has expired */
4003
+ EXPIRED = "EXPIRED",
4004
+ /** Subscription has been canceled */
4005
+ CANCELED = "CANCELED",
4006
+ /** Subscription has been set to be canceled at a future date */
4007
+ PENDING_CANCELLATION = "PENDING_CANCELLATION",
4008
+ /** Subscription is suspended */
4009
+ SUSPENDED = "SUSPENDED"
4010
+ }
4011
+ /** @enumType */
4012
+ type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED';
4013
+ declare enum PaymentStatusEnumPaymentStatus {
4014
+ /** Payment status undefined */
4015
+ UNDEFINED = "UNDEFINED",
4016
+ /** Payment has been paid */
4017
+ PAID = "PAID",
4018
+ /** Payment has been refunded */
4019
+ REFUNDED = "REFUNDED",
4020
+ /** Recurring payment has failed */
4021
+ FAILED = "FAILED",
4022
+ /** Payment has not been paid */
4023
+ UNPAID = "UNPAID",
4024
+ /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
4025
+ PENDING = "PENDING"
4026
+ }
4027
+ /** @enumType */
4028
+ type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING';
4029
+ /**
4030
+ * Recurring payment is described by `frequency` (day, week, month) and `interval`.
4031
+ *
4032
+ * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
4033
+ *
4034
+ * In some cases there should be a trial period for the order, after which payments start to occur.
4035
+ * Trial period is also defined as `frequency` and `interval` pair.
4036
+ *
4037
+ * So one can define a monthly 'subscription' with a 14 days trial period.
4038
+ */
4039
+ interface V2Subscription {
4040
+ /** frequency of recurring payment (required) */
4041
+ frequency?: SubscriptionFrequencyWithLiterals;
4042
+ /** interval of recurring payment (required) */
4043
+ interval?: number;
4044
+ /** trial period for recurring payment (optional) */
4045
+ trial?: SubscriptionTrialPeriod;
3772
4046
  /**
3773
- * ID of the subscription to change
3774
- * @format GUID
4047
+ * how many billing cycles should be done before subscription finishes
4048
+ * (optional, 0 by default means endless subscription)
3775
4049
  */
3776
- subscriptionId?: string;
3777
- /** New product ID. Set to change the subscription plan. */
3778
- newProductId?: string | null;
3779
- /** New billing cycle duration. Set to change the billing cycle (e.g., monthly to yearly). */
3780
- newCycle?: Duration;
4050
+ billingCycles?: number;
3781
4051
  /**
3782
- * New quantity. Set to change the number of units (seats/licenses).
3783
- * @min 1
4052
+ * date in the future or in the past when the first billing cycle begins
4053
+ * (the first off-session payment is performed when it ends)
3784
4054
  */
3785
- newQuantity?: number | null;
3786
- /** When the change takes effect. */
3787
- effectiveTime?: ChangeEffectiveTimeWithLiterals;
3788
- /** How to handle proration for immediate changes. Ignored for AT_NEXT_RENEWAL. */
3789
- prorationBehavior?: ProrationBehaviorWithLiterals;
3790
- /** Payment context for immediate changes without checkout flow. */
3791
- paymentContext?: ChangePaymentContext;
4055
+ firstCycleStartDate?: Date | null;
3792
4056
  }
3793
- declare enum ChangeEffectiveTime {
3794
- UNKNOWN = "UNKNOWN",
3795
- /** Apply change immediately with proration */
3796
- IMMEDIATELY = "IMMEDIATELY",
3797
- /** Schedule change for the next billing cycle */
3798
- AT_NEXT_RENEWAL = "AT_NEXT_RENEWAL"
4057
+ /** Frequency unit of recurring payment */
4058
+ declare enum SubscriptionFrequency {
4059
+ UNDEFINED = "UNDEFINED",
4060
+ DAY = "DAY",
4061
+ WEEK = "WEEK",
4062
+ MONTH = "MONTH",
4063
+ YEAR = "YEAR"
3799
4064
  }
3800
4065
  /** @enumType */
3801
- type ChangeEffectiveTimeWithLiterals = ChangeEffectiveTime | 'UNKNOWN' | 'IMMEDIATELY' | 'AT_NEXT_RENEWAL';
3802
- declare enum ProrationBehavior {
3803
- UNKNOWN = "UNKNOWN",
3804
- /** Credit unused time + charge new prorated price (default for upgrades) */
3805
- PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
3806
- /** Credit unused time + refund to payment method (downgrades) */
3807
- PRORATE_AND_REFUND = "PRORATE_AND_REFUND",
3808
- /** Convert unused value to extra days, no financial transaction */
3809
- PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND",
3810
- /** Immediate switch with no financial adjustment */
3811
- NO_PRORATION = "NO_PRORATION"
4066
+ type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
4067
+ /** Trial period of subscription */
4068
+ interface SubscriptionTrialPeriod {
4069
+ /** trial period in units (required) */
4070
+ period?: number;
4071
+ /** units in which trial period is described (optional, default DAY) */
4072
+ unit?: SubscriptionFrequencyWithLiterals;
4073
+ }
4074
+ declare enum CancellationInitiator {
4075
+ /** Cancellation initiator undefined */
4076
+ UNDEFINED = "UNDEFINED",
4077
+ /** Subscription was canceled by site owner (default if canceled by user or service identity) */
4078
+ OWNER = "OWNER",
4079
+ /** Subscription was canceled by member (default if canceled by member identity) */
4080
+ MEMBER = "MEMBER",
4081
+ /** Subscription was canceled because of payment failure */
4082
+ PAYMENT_FAILURE = "PAYMENT_FAILURE",
4083
+ /** Subscription was canceled because of payment setup failure */
4084
+ SETUP_FAILURE = "SETUP_FAILURE"
3812
4085
  }
3813
4086
  /** @enumType */
3814
- type ProrationBehaviorWithLiterals = ProrationBehavior | 'UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3815
- /** Payment context for immediate subscription changes without the checkout flow. */
3816
- interface ChangePaymentContext {
3817
- /** Payment settings override for this change */
3818
- paymentSettings?: PaymentSettings;
4087
+ type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE';
4088
+ interface SubscriptionPolicy {
4089
+ /** Subscription expiration date can be updated */
4090
+ expiryDateChangeable?: boolean;
4091
+ /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
4092
+ cancellableByMember?: boolean;
4093
+ /** Subscription expiration date on cancellation can be set to next payment date */
4094
+ cancellableAtNextPaymentCycle?: boolean;
3819
4095
  }
3820
- interface ChangeSubscriptionResponse {
3821
- /** Updated subscription */
3822
- subscription?: Subscription;
3823
- /** Proration calculation result. Present for immediate changes with proration. */
3824
- prorationResult?: ProrationResult;
3825
- /**
3826
- * ID of the adjustment invoice created for the proration charge or refund.
3827
- * @format GUID
3828
- */
3829
- adjustmentInvoiceId?: string | null;
4096
+ interface Suspension {
4097
+ status?: StatusWithLiterals;
4098
+ /** Beginning of the suspended period */
4099
+ startsAt?: Date | null;
4100
+ /** End of the suspended period */
4101
+ endsAt?: Date | null;
3830
4102
  }
3831
- /** Result of a proration calculation applied during a subscription change. */
3832
- interface ProrationResult {
3833
- /**
3834
- * Credit amount for unused time on the current plan
3835
- * @format DECIMAL_VALUE
3836
- */
3837
- creditAmount?: string;
3838
- /**
3839
- * Charge amount for the new plan's prorated price
3840
- * @format DECIMAL_VALUE
3841
- */
3842
- chargeAmount?: string;
3843
- /**
3844
- * Net amount (charge minus credit). Positive means customer pays, negative means refund.
3845
- * @format DECIMAL_VALUE
3846
- */
3847
- netAmount?: string;
3848
- /** Date when the proration was calculated */
3849
- prorationDate?: Date | null;
3850
- /** Remaining seconds in the current billing period at time of change */
3851
- remainingSeconds?: string;
3852
- /** Total seconds in the current billing cycle */
3853
- totalCycleSeconds?: string;
4103
+ declare enum Status {
4104
+ UNDEFINED = "UNDEFINED",
4105
+ ACTIVE = "ACTIVE",
4106
+ ENDED = "ENDED"
3854
4107
  }
3855
- interface PreviewChangeSubscriptionRequest {
4108
+ /** @enumType */
4109
+ type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';
4110
+ /** A duration expressed in amount of time units. */
4111
+ interface V1Duration {
4112
+ /** Amount of the unit */
4113
+ amount?: number;
4114
+ /** Day, Week, Month, Year. */
4115
+ unit?: SubscriptionFrequencyWithLiterals;
4116
+ }
4117
+ interface V1SubscriptionActivated {
4118
+ subscription?: V1Subscription;
4119
+ }
4120
+ interface V1SubscriptionCanceled {
4121
+ subscription?: V1Subscription;
4122
+ }
4123
+ interface V1SubscriptionUpdated {
4124
+ subscription?: V1Subscription;
4125
+ }
4126
+ interface SubscriptionCycleTriggered {
4127
+ subscription?: V1Subscription;
4128
+ billingCycle?: number;
3856
4129
  /**
3857
- * ID of the subscription to preview the change for
4130
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
3858
4131
  * @format GUID
3859
4132
  */
4133
+ transactionId?: string | null;
4134
+ }
4135
+ interface SubscriptionMarkedAsPaid {
4136
+ subscription?: V1Subscription;
4137
+ /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
4138
+ billingCycle?: number | null;
4139
+ }
4140
+ interface SubscriptionCancellationRequested {
4141
+ subscription?: V1Subscription;
4142
+ }
4143
+ interface SubscriptionSuspended {
4144
+ subscription?: V1Subscription;
4145
+ }
4146
+ interface V1SubscriptionResumed {
4147
+ subscription?: V1Subscription;
4148
+ }
4149
+ interface SubscriptionExpired {
4150
+ subscription?: V1Subscription;
4151
+ }
4152
+ interface V1SubscriptionInitialPurchaseCompleted {
4153
+ subscription?: V1Subscription;
4154
+ }
4155
+ interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
4156
+ activeSubscription?: CreateSubscriptionRequest;
4157
+ }
4158
+ /** @oneof */
4159
+ interface CreateSubscriptionInStateRequestModeOneOf {
4160
+ activeSubscription?: CreateSubscriptionRequest;
4161
+ }
4162
+ interface CreateSubscriptionInStateResponse {
4163
+ /** @format GUID */
4164
+ subscriptionId?: string;
4165
+ }
4166
+ interface PayCycleRequest {
4167
+ /** @format GUID */
4168
+ subscriptionId?: string;
4169
+ paymentTestMode?: PaymentTestModeWithLiterals;
4170
+ /** @format GUID */
4171
+ tenantId?: string;
4172
+ }
4173
+ declare enum PaymentTestMode {
4174
+ REGULAR = "REGULAR",
4175
+ FAIL_TECHNICAL = "FAIL_TECHNICAL",
4176
+ FAIL_DECLINE = "FAIL_DECLINE",
4177
+ FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
4178
+ }
4179
+ /** @enumType */
4180
+ type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE';
4181
+ interface PayCycleResponse {
4182
+ /** @format GUID */
4183
+ invoiceId?: string;
4184
+ /** @format GUID */
4185
+ paymentOrderId?: string | null;
4186
+ subscription?: Subscription;
4187
+ }
4188
+ interface GetFullSubscriptionDataRequest {
4189
+ /** @format GUID */
4190
+ _id?: string;
4191
+ }
4192
+ interface GetFullSubscriptionDataResponse {
4193
+ subscription?: Subscription;
4194
+ internalSubscriptionData?: InternalSubscriptionData;
4195
+ }
4196
+ interface InternalSubscriptionData {
4197
+ /** @format GUID */
4198
+ originInstanceId?: string;
4199
+ source?: string | null;
4200
+ billingType?: string;
4201
+ isOneTime?: boolean;
4202
+ migrationDetails?: MigrationDetails;
4203
+ pausePaidDuration?: string | null;
4204
+ authorizationPaymentData?: PaymentData;
4205
+ currentCyclePausePeriods?: PausePeriod[];
4206
+ }
4207
+ interface MigrationDetails {
4208
+ /** system (application) where the Subscription has been created */
4209
+ originSystem?: string;
4210
+ /** date when the Subscription started to be managed in BASS */
4211
+ shiftManagementDate?: Date | null;
4212
+ }
4213
+ interface PausePeriod {
4214
+ startDate?: Date | null;
4215
+ endDate?: Date | null;
4216
+ }
4217
+ interface GetSubscriptionAndInternalDataRequest {
4218
+ /** @format GUID */
4219
+ subscriptionId?: string;
4220
+ /** @format GUID */
4221
+ tenantId?: string;
4222
+ }
4223
+ interface GetSubscriptionAndInternalDataResponse {
4224
+ subscription?: Subscription;
4225
+ internalSubscriptionData?: InternalSubscriptionData;
4226
+ }
4227
+ interface SearchSubscriptionRequest {
4228
+ /** @format GUID */
4229
+ _id?: string;
4230
+ /** @format GUID */
4231
+ tenantId?: string;
4232
+ }
4233
+ interface SearchSubscriptionResponse {
4234
+ subscription?: Subscription;
4235
+ }
4236
+ interface UpdatePausePaidDurationRequest {
4237
+ /** @format GUID */
3860
4238
  subscriptionId?: string;
3861
- /** New product ID. Set to preview a plan change. */
3862
- newProductId?: string | null;
3863
- /** New billing cycle duration. Set to preview a cycle change. */
3864
- newCycle?: Duration;
3865
4239
  /**
3866
- * New quantity. Set to preview a quantity change.
3867
4240
  * @min 1
4241
+ * @max 10000000
3868
4242
  */
3869
- newQuantity?: number | null;
3870
- /** When the change would take effect. */
3871
- effectiveTime?: ChangeEffectiveTimeWithLiterals;
3872
- /** How proration would be handled for immediate changes. */
3873
- prorationBehavior?: ProrationBehaviorWithLiterals;
4243
+ pausePaidDurationSeconds?: string;
4244
+ /** @format GUID */
4245
+ tenantId?: string;
3874
4246
  }
3875
- interface PreviewChangeSubscriptionResponse {
3876
- /** Summary of the current subscription state */
3877
- current?: SubscriptionChangeSummary;
3878
- /** Summary of the proposed subscription state after the change */
3879
- proposed?: SubscriptionChangeSummary;
3880
- /** Proration preview details. Present only for immediate changes. */
3881
- proration?: ProrationPreview;
3882
- /** Renewal preview. Present only for changes at next renewal. */
3883
- renewalPreview?: RenewalPreview;
4247
+ interface UpdatePausePaidDurationResponse {
3884
4248
  }
3885
- /** Summary of a subscription's state, used in change previews. */
3886
- interface SubscriptionChangeSummary {
3887
- /** Product ID */
3888
- productId?: string;
3889
- /** Product name */
3890
- productName?: string;
3891
- /** Billing cycle duration */
3892
- cycle?: Duration;
3893
- /** Number of units */
3894
- quantity?: number;
3895
- /**
3896
- * Price per unit
3897
- * @format DECIMAL_VALUE
3898
- */
3899
- pricePerUnit?: string;
3900
- /**
3901
- * Total price (price_per_unit * quantity)
3902
- * @format DECIMAL_VALUE
3903
- */
3904
- totalPrice?: string;
3905
- /**
3906
- * Currency code (ISO 4217)
3907
- * @format CURRENCY
3908
- */
3909
- currency?: string;
3910
- /** Current billing period start */
3911
- periodStart?: Date | null;
3912
- /** Current billing period end */
3913
- periodEnd?: Date | null;
4249
+ interface UpdateStatusRequest {
4250
+ /** @format GUID */
4251
+ subscriptionId?: string;
4252
+ /** @format GUID */
4253
+ tenantId?: string;
4254
+ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
3914
4255
  }
3915
- /** Preview of proration amounts for a proposed subscription change. */
3916
- interface ProrationPreview {
3917
- /**
3918
- * Credit amount for unused time on the current plan
3919
- * @format DECIMAL_VALUE
3920
- */
3921
- creditAmount?: string;
3922
- /**
3923
- * Charge amount for the new plan's prorated price
3924
- * @format DECIMAL_VALUE
3925
- */
3926
- chargeAmount?: string;
3927
- /**
3928
- * Net amount (charge minus credit)
3929
- * @format DECIMAL_VALUE
3930
- */
3931
- netAmount?: string;
3932
- /**
3933
- * Tax amount on the net proration
3934
- * @format DECIMAL_VALUE
3935
- */
3936
- taxAmount?: string;
3937
- /**
3938
- * Total amount including tax
3939
- * @format DECIMAL_VALUE
3940
- */
3941
- totalAmount?: string;
3942
- /** Remaining seconds in the current billing period */
3943
- remainingSeconds?: string;
3944
- /** Total seconds in the current billing cycle */
3945
- totalCycleSeconds?: string;
3946
- /** New period end date. Present when proration_behavior is PRORATE_AND_EXTEND. */
3947
- newPeriodEnd?: Date | null;
3948
- /** Number of days added to the billing period. Present when proration_behavior is PRORATE_AND_EXTEND. */
3949
- daysAdded?: number;
3950
- /** The proration action that would be taken */
3951
- action?: ProrationActionWithLiterals;
4256
+ interface UpdateStatusResponse {
4257
+ subscription?: Subscription;
3952
4258
  }
3953
- declare enum ProrationAction {
3954
- UNKNOWN = "UNKNOWN",
3955
- /** Net charge to customer */
3956
- CHARGE = "CHARGE",
3957
- /** Net refund to customer */
3958
- REFUND = "REFUND",
3959
- /** Extend billing period instead of refund */
3960
- EXTEND_PERIOD = "EXTEND_PERIOD",
3961
- /** No financial change needed */
3962
- NO_CHANGE = "NO_CHANGE"
4259
+ interface UpdatePaymentStatusRequest {
4260
+ /** @format GUID */
4261
+ subscriptionId?: string;
4262
+ /** @format GUID */
4263
+ tenantId?: string;
4264
+ paymentStatus?: PaymentStatusWithLiterals;
4265
+ }
4266
+ interface UpdatePaymentStatusResponse {
4267
+ subscription?: Subscription;
4268
+ }
4269
+ interface RemoveCancellationInfoRequest {
4270
+ /** @format GUID */
4271
+ subscriptionId?: string;
4272
+ /** @format GUID */
4273
+ tenantId?: string;
4274
+ }
4275
+ interface RemoveCancellationInfoResponse {
4276
+ subscription?: Subscription;
4277
+ }
4278
+ interface RemovePauseInfoRequest {
4279
+ /** @format GUID */
4280
+ subscriptionId?: string;
4281
+ /** @format GUID */
4282
+ tenantId?: string;
4283
+ }
4284
+ interface RemovePauseInfoResponse {
4285
+ subscription?: Subscription;
4286
+ }
4287
+ interface ReviveSubscriptionRequest {
4288
+ /** @format GUID */
4289
+ tenantId?: string;
4290
+ /** @format GUID */
4291
+ subscriptionId?: string;
4292
+ revivePolicy?: RevivePolicyWithLiterals;
4293
+ isTestRun?: boolean;
4294
+ }
4295
+ declare enum RevivePolicy {
4296
+ SIMPLE = "SIMPLE",
4297
+ RESUME = "RESUME"
3963
4298
  }
3964
4299
  /** @enumType */
3965
- type ProrationActionWithLiterals = ProrationAction | 'UNKNOWN' | 'CHARGE' | 'REFUND' | 'EXTEND_PERIOD' | 'NO_CHANGE';
3966
- /** Preview of what the next renewal will look like after a change. */
3967
- interface RenewalPreview {
4300
+ type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';
4301
+ interface ReviveSubscriptionResponse {
4302
+ subscription?: Subscription;
4303
+ }
4304
+ interface ConvertSapiRequest {
4305
+ /** @format GUID */
4306
+ subscriptionId?: string;
4307
+ }
4308
+ interface ConvertSapiResponse {
4309
+ subscription?: Subscription;
4310
+ }
4311
+ interface GetSubscriptionInvoicesRequest {
4312
+ /** @format GUID */
4313
+ _id?: string;
4314
+ }
4315
+ interface GetSubscriptionInvoicesResponse {
4316
+ invoices?: SubscriptionInvoice[];
4317
+ }
4318
+ interface SubscriptionInvoice {
4319
+ /** @format GUID */
4320
+ _id?: string;
4321
+ subscriptionCycle?: number;
4322
+ _createdDate?: Date | null;
4323
+ }
4324
+ interface FinishFreeTrialNowRequest {
4325
+ /** @format GUID */
4326
+ subscriptionId?: string;
4327
+ /** @format GUID */
4328
+ tenantId?: string;
4329
+ }
4330
+ interface FinishFreeTrialNowResponse {
4331
+ subscription?: Subscription;
4332
+ }
4333
+ interface FixSubscriptionTimeCapsuleTasksRequest {
4334
+ /** @format GUID */
4335
+ subscriptionId?: string;
4336
+ /** @format GUID */
4337
+ tenantId?: string;
4338
+ }
4339
+ interface FixSubscriptionTimeCapsuleTasksResponse {
4340
+ }
4341
+ interface SendTimeCapsuleTaskCanceledBIRequest {
4342
+ /** @format GUID */
4343
+ tenantId?: string;
4344
+ /** @format GUID */
4345
+ subscriptionId?: string;
4346
+ /** @minLength 1 */
4347
+ taskType?: string;
4348
+ }
4349
+ interface ScheduleTimeCapsuleTaskRequest {
4350
+ /** @format GUID */
4351
+ subscriptionId?: string;
4352
+ /** @minLength 1 */
4353
+ taskType?: string;
4354
+ executionTime?: Date | null;
4355
+ /** @format GUID */
4356
+ tenantId?: string;
4357
+ }
4358
+ interface CancelTimeCapsuleTaskRequest {
4359
+ /** @format GUID */
4360
+ tenantId?: string;
4361
+ /** @format GUID */
4362
+ subscriptionId?: string;
4363
+ /** @minLength 1 */
4364
+ taskType?: string;
4365
+ }
4366
+ interface UpdateFullSubscriptionRequest {
4367
+ /** @format GUID */
4368
+ tenantId?: string;
4369
+ subscription?: Subscription;
4370
+ }
4371
+ interface UpdateFullSubscriptionResponse {
4372
+ subscription?: Subscription;
4373
+ }
4374
+ interface PatchSubscriptionRequest {
3968
4375
  /**
3969
- * New price per unit at next renewal
3970
- * @format DECIMAL_VALUE
4376
+ * Tenant ID (instance ID) of the subscription
4377
+ * @format GUID
3971
4378
  */
3972
- newPrice?: string;
4379
+ tenantId?: string;
3973
4380
  /**
3974
- * New total at next renewal (price * quantity)
3975
- * @format DECIMAL_VALUE
4381
+ * Subscription ID to patch
4382
+ * @format GUID
3976
4383
  */
3977
- newTotal?: string;
3978
- /** Date of the next renewal */
3979
- nextRenewalDate?: Date | null;
4384
+ subscriptionId?: string;
4385
+ /** Partial subscription with updated values */
4386
+ subscription?: Subscription;
4387
+ /** Fields to update (e.g., "name", "billing_settings.collection_method") */
4388
+ fieldMask?: string[];
4389
+ }
4390
+ interface PatchSubscriptionResponse {
4391
+ /** The updated subscription */
4392
+ subscription?: Subscription;
4393
+ }
4394
+ interface UpdateSubscriptionInvoiceCycleRequest {
4395
+ /** @format GUID */
4396
+ subscriptionId?: string;
4397
+ /** @format GUID */
4398
+ tenantId?: string;
4399
+ /** @format GUID */
4400
+ invoiceId?: string;
4401
+ subscriptionCycle?: number;
4402
+ }
4403
+ interface UpdateSubscriptionInvoiceCycleResponse {
4404
+ subscriptionInvoice?: SubscriptionInvoice;
4405
+ }
4406
+ interface AddPausePeriodRequest {
4407
+ /** @format GUID */
4408
+ tenantId?: string;
4409
+ /** @format GUID */
4410
+ subscriptionId?: string;
4411
+ pauseStartDate?: Date | null;
4412
+ pauseEndDate?: Date | null;
4413
+ }
4414
+ interface AddPausePeriodResponse {
4415
+ subscription?: Subscription;
4416
+ }
4417
+ interface RunTimeCapsuleTaskNowRequest {
4418
+ /** @format GUID */
4419
+ tenantId?: string;
4420
+ /** @format GUID */
4421
+ subscriptionId?: string;
4422
+ /** @minLength 1 */
4423
+ taskType?: string;
3980
4424
  }
3981
- interface CancelPendingChangeRequest {
3982
- /**
3983
- * ID of the subscription to cancel the pending change for
3984
- * @format GUID
3985
- */
4425
+ interface CreateRecurringInvoiceBORequest {
4426
+ /** @format GUID */
3986
4427
  subscriptionId?: string;
4428
+ /** @format GUID */
4429
+ tenantId?: string;
4430
+ /** @min 2 */
4431
+ cycleNumber?: number;
3987
4432
  }
3988
- interface CancelPendingChangeResponse {
3989
- /** Updated subscription with cleared pending data */
3990
- subscription?: Subscription;
4433
+ interface CreateRecurringInvoiceBOResponse {
4434
+ invoiceId?: string;
3991
4435
  }
3992
- interface Task {
3993
- key?: TaskKey;
3994
- executeAt?: Date | null;
3995
- payload?: string | null;
4436
+ interface SetShiftingDataRequest {
4437
+ /** @format GUID */
4438
+ subscriptionId?: string;
4439
+ /** @format GUID */
4440
+ tenantId?: string;
4441
+ isBassManaged?: boolean;
4442
+ shiftManagementDate?: Date | null;
3996
4443
  }
3997
- interface TaskKey {
3998
- appId?: string;
3999
- instanceId?: string;
4000
- subjectId?: string | null;
4444
+ interface SetShiftingDataResponse {
4445
+ subscription?: Subscription;
4001
4446
  }
4002
- interface TaskAction extends TaskActionActionOneOf {
4003
- complete?: Complete;
4004
- cancel?: Cancel;
4005
- reschedule?: Reschedule;
4447
+ interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
4448
+ attachInvoice?: AttachInvoice;
4449
+ detachInvoice?: DetachInvoice;
4450
+ /** @format GUID */
4451
+ tenantId?: string;
4452
+ /** @format GUID */
4453
+ subscriptionId?: string;
4006
4454
  }
4007
4455
  /** @oneof */
4008
- interface TaskActionActionOneOf {
4009
- complete?: Complete;
4010
- cancel?: Cancel;
4011
- reschedule?: Reschedule;
4012
- }
4013
- interface Complete {
4456
+ interface FixSubscriptionInvoicesRequestModeOneOf {
4457
+ attachInvoice?: AttachInvoice;
4458
+ detachInvoice?: DetachInvoice;
4014
4459
  }
4015
- interface Cancel {
4460
+ interface AttachInvoice {
4461
+ /** @format GUID */
4462
+ invoiceId?: string;
4016
4463
  }
4017
- interface Reschedule {
4018
- executeAt?: Date | null;
4019
- payload?: string | null;
4464
+ interface DetachInvoice {
4465
+ /** @format GUID */
4466
+ invoiceId?: string;
4020
4467
  }
4021
- interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
4022
- /** A subscriptions was created */
4023
- created?: V1SubscriptionCreated;
4024
- /** Subscription is considered active and will be visible to site owners and members */
4025
- activated?: V1SubscriptionActivated;
4026
- /**
4027
- * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
4028
- * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
4029
- */
4030
- canceled?: V1SubscriptionCanceled;
4031
- /** Subscription was updated. Currently the only possible change is valid_until date */
4032
- updated?: V1SubscriptionUpdated;
4033
- /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
4034
- cycleTriggered?: SubscriptionCycleTriggered;
4035
- /** Offline subscription was marked as paid */
4036
- markedAsPaid?: SubscriptionMarkedAsPaid;
4037
- /**
4038
- * Subscription cancellation for the future date was requested.
4039
- * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
4040
- */
4041
- cancellationRequested?: SubscriptionCancellationRequested;
4042
- /** Subscription and it's payment schedule (for recurring) was suspended */
4043
- suspended?: SubscriptionSuspended;
4044
- /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
4045
- resumed?: V1SubscriptionResumed;
4046
- /** Subscription expired according to valid_until expiration date. */
4047
- expired?: SubscriptionExpired;
4048
- /** Subscription initial purchase completed */
4049
- initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
4468
+ interface FixSubscriptionInvoicesResponse {
4469
+ invoices?: SubscriptionInvoice[];
4050
4470
  }
4051
- /** @oneof */
4052
- interface V1SubscriptionEventEventOneOf {
4053
- /** A subscriptions was created */
4054
- created?: V1SubscriptionCreated;
4055
- /** Subscription is considered active and will be visible to site owners and members */
4056
- activated?: V1SubscriptionActivated;
4057
- /**
4058
- * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
4059
- * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
4060
- */
4061
- canceled?: V1SubscriptionCanceled;
4062
- /** Subscription was updated. Currently the only possible change is valid_until date */
4063
- updated?: V1SubscriptionUpdated;
4064
- /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
4065
- cycleTriggered?: SubscriptionCycleTriggered;
4066
- /** Offline subscription was marked as paid */
4067
- markedAsPaid?: SubscriptionMarkedAsPaid;
4068
- /**
4069
- * Subscription cancellation for the future date was requested.
4070
- * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
4071
- */
4072
- cancellationRequested?: SubscriptionCancellationRequested;
4073
- /** Subscription and it's payment schedule (for recurring) was suspended */
4074
- suspended?: SubscriptionSuspended;
4075
- /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
4076
- resumed?: V1SubscriptionResumed;
4077
- /** Subscription expired according to valid_until expiration date. */
4078
- expired?: SubscriptionExpired;
4079
- /** Subscription initial purchase completed */
4080
- initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
4471
+ interface RestoreDraftSubscriptionRequest {
4472
+ /** @format GUID */
4473
+ tenantId?: string;
4474
+ /** @format GUID */
4475
+ subscriptionId?: string;
4081
4476
  }
4082
- interface V1SubscriptionCreated {
4083
- subscription?: V1Subscription;
4477
+ interface RestoreDraftSubscriptionResponse {
4478
+ subscription?: Subscription;
4084
4479
  }
4085
- interface V1Subscription {
4086
- /**
4087
- * ID of the subscription
4088
- * @format GUID
4089
- * @readonly
4090
- */
4091
- _id?: string;
4092
- /**
4093
- * ID of the app which created the subscription
4094
- * @format GUID
4095
- */
4096
- wixAppId?: string;
4097
- /**
4098
- * Instance ID of the Subscriptions app
4099
- * @format GUID
4100
- */
4480
+ interface DeleteDraftSubscriptionRequest {
4481
+ /** @format GUID */
4101
4482
  tenantId?: string;
4102
- /**
4103
- * ID of entity in app (e.g. a cart in stores/order in paid plans)
4104
- * @format GUID
4105
- */
4106
- originEntityId?: string;
4107
- /** Site member or a contact who bought the subscription */
4108
- subscriber?: Subscriber;
4109
- /**
4110
- * Wix Pay order ID, is empty for free subscriptions
4111
- * @format GUID
4112
- */
4113
- wixPayOrderId?: string | null;
4114
- /**
4115
- * Subscription name (e.g. a product or subscription package name)
4116
- * @maxLength 150
4117
- */
4118
- name?: string;
4119
- /**
4120
- * Optional additional subscription description
4121
- * @maxLength 500
4122
- */
4123
- description?: string;
4124
- /** Amount to be paid for a single scheduled payment */
4125
- price?: Money;
4126
- /** True if the subscription is recurring, false for a single payment subscription */
4127
- recurring?: boolean;
4128
- /** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */
4129
- subscriptionType?: SubscriptionTypeWithLiterals;
4130
- /** Active, expired, canceled, etc. */
4131
- subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals;
4132
- /** Subscription start date (may differ from creation date) */
4133
- validFrom?: Date | null;
4134
- /** Subscription expiration date */
4135
- validUntil?: Date | null;
4136
- /** Status of last payment associated with this subscription */
4137
- lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals;
4138
- /** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */
4139
- billingProfile?: V2Subscription;
4140
- /** Owner, member, etc. - present if subscription is canceled */
4141
- cancellationInitiator?: CancellationInitiatorWithLiterals;
4142
- /** Optional, present if subscription is canceled */
4143
- cancellationReason?: string | null;
4144
- /** Can be used for arbitrary app-specific map<string, string> data */
4145
- externalData?: Record<string, string>;
4146
- /** Date when subscription was created (not related to payment dates) */
4147
- dateCreated?: Date | null;
4148
- /** Restrictions on possible subscription actions. Default policy has all restrictions enabled. */
4149
- policy?: SubscriptionPolicy;
4150
- /** List of subscription suspension periods */
4151
- suspensions?: Suspension[];
4152
- /** Initial subscription expiration date that was calculated on the subscription purchase plus duration of suspensions */
4153
- validUntilDateWithSuspensions?: Date | null;
4154
- /** Duration of single payment subscription (instead of billing_profile) */
4155
- singlePaymentDuration?: V1Duration;
4156
4483
  /** @format GUID */
4157
- originInstanceId?: string | null;
4158
- }
4159
- interface Subscriber {
4160
- /**
4161
- * Member or contact ID
4162
- * @format GUID
4163
- */
4164
- _id?: string;
4165
- /** Member or contact */
4166
- identityType?: IdentityTypeWithLiterals;
4484
+ subscriptionId?: string;
4167
4485
  }
4168
- declare enum IdentityType {
4169
- /** Identity type undefined */
4170
- UNDEFINED = "UNDEFINED",
4171
- /** Subscription is associated with a member ID */
4172
- MEMBER = "MEMBER",
4173
- /** Subscriptions is associated with a contact ID */
4174
- CONTACT = "CONTACT"
4486
+ interface DeleteDraftSubscriptionResponse {
4487
+ subscription?: Subscription;
4175
4488
  }
4176
- /** @enumType */
4177
- type IdentityTypeWithLiterals = IdentityType | 'UNDEFINED' | 'MEMBER' | 'CONTACT';
4178
- /** Price of a payment. Includes amount and currency. */
4179
- interface Money {
4180
- /**
4181
- * Monetary amount i.e. 3.99.
4182
- * @format DECIMAL_VALUE
4183
- */
4184
- amount?: string;
4185
- /**
4186
- * Currency in ISO 4217 format i.e. USD.
4187
- * @minLength 3
4188
- * @maxLength 3
4189
- */
4190
- currency?: string;
4489
+ interface DeleteSubscriptionBORequest {
4490
+ /** @format GUID */
4491
+ tenantId?: string;
4492
+ /** @format GUID */
4493
+ subscriptionId?: string;
4191
4494
  }
4192
- declare enum SubscriptionType {
4193
- UNDEFINED = "UNDEFINED",
4194
- /** Payments made by the subscriber */
4195
- ONLINE = "ONLINE",
4196
- /** Payments managed manually by the site owner */
4197
- OFFLINE = "OFFLINE"
4495
+ interface DeleteSubscriptionBOResponse {
4496
+ subscription?: Subscription;
4198
4497
  }
4199
- /** @enumType */
4200
- type SubscriptionTypeWithLiterals = SubscriptionType | 'UNDEFINED' | 'ONLINE' | 'OFFLINE';
4201
- declare enum V1SubscriptionStatusEnumSubscriptionStatus {
4202
- /** Subscription status undefined */
4203
- UNDEFINED = "UNDEFINED",
4204
- /** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */
4205
- DRAFT = "DRAFT",
4206
- /** Subscription has been paid for, but the start date is in the future */
4207
- PENDING = "PENDING",
4208
- /** Subscription is active */
4209
- ACTIVE = "ACTIVE",
4210
- /** Subscription has expired */
4211
- EXPIRED = "EXPIRED",
4212
- /** Subscription has been canceled */
4213
- CANCELED = "CANCELED",
4214
- /** Subscription has been set to be canceled at a future date */
4215
- PENDING_CANCELLATION = "PENDING_CANCELLATION",
4216
- /** Subscription is suspended */
4217
- SUSPENDED = "SUSPENDED"
4498
+ interface CancelSubscriptionBORequest {
4499
+ /** @format GUID */
4500
+ tenantId?: string;
4501
+ /** @format GUID */
4502
+ subscriptionId?: string;
4503
+ initiator?: ActionInitiatorWithLiterals;
4504
+ reason?: string | null;
4218
4505
  }
4219
- /** @enumType */
4220
- type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED';
4221
- declare enum PaymentStatusEnumPaymentStatus {
4222
- /** Payment status undefined */
4223
- UNDEFINED = "UNDEFINED",
4224
- /** Payment has been paid */
4225
- PAID = "PAID",
4226
- /** Payment has been refunded */
4227
- REFUNDED = "REFUNDED",
4228
- /** Recurring payment has failed */
4229
- FAILED = "FAILED",
4230
- /** Payment has not been paid */
4231
- UNPAID = "UNPAID",
4232
- /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
4233
- PENDING = "PENDING"
4506
+ interface CancelSubscriptionBOResponse {
4507
+ subscription?: Subscription;
4234
4508
  }
4235
- /** @enumType */
4236
- type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING';
4237
- /**
4238
- * Recurring payment is described by `frequency` (day, week, month) and `interval`.
4239
- *
4240
- * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
4241
- *
4242
- * In some cases there should be a trial period for the order, after which payments start to occur.
4243
- * Trial period is also defined as `frequency` and `interval` pair.
4244
- *
4245
- * So one can define a monthly 'subscription' with a 14 days trial period.
4246
- */
4247
- interface V2Subscription {
4248
- /** frequency of recurring payment (required) */
4249
- frequency?: SubscriptionFrequencyWithLiterals;
4250
- /** interval of recurring payment (required) */
4251
- interval?: number;
4252
- /** trial period for recurring payment (optional) */
4253
- trial?: SubscriptionTrialPeriod;
4254
- /**
4255
- * how many billing cycles should be done before subscription finishes
4256
- * (optional, 0 by default means endless subscription)
4257
- */
4258
- billingCycles?: number;
4259
- /**
4260
- * date in the future or in the past when the first billing cycle begins
4261
- * (the first off-session payment is performed when it ends)
4262
- */
4263
- firstCycleStartDate?: Date | null;
4509
+ interface UpdatePaymentMethodBORequest {
4510
+ /** @format GUID */
4511
+ tenantId?: string;
4512
+ /** @format GUID */
4513
+ subscriptionId?: string;
4514
+ /** @format GUID */
4515
+ paymentMethodId?: string;
4264
4516
  }
4265
- /** Frequency unit of recurring payment */
4266
- declare enum SubscriptionFrequency {
4267
- UNDEFINED = "UNDEFINED",
4268
- DAY = "DAY",
4269
- WEEK = "WEEK",
4270
- MONTH = "MONTH",
4271
- YEAR = "YEAR"
4517
+ interface UpdatePaymentMethodBOResponse {
4518
+ subscription?: Subscription;
4272
4519
  }
4273
- /** @enumType */
4274
- type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
4275
- /** Trial period of subscription */
4276
- interface SubscriptionTrialPeriod {
4277
- /** trial period in units (required) */
4278
- period?: number;
4279
- /** units in which trial period is described (optional, default DAY) */
4280
- unit?: SubscriptionFrequencyWithLiterals;
4520
+ interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
4521
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
4522
+ /** @format GUID */
4523
+ tenantId?: string;
4524
+ /** @format GUID */
4525
+ subscriptionId?: string;
4281
4526
  }
4282
- declare enum CancellationInitiator {
4283
- /** Cancellation initiator undefined */
4284
- UNDEFINED = "UNDEFINED",
4285
- /** Subscription was canceled by site owner (default if canceled by user or service identity) */
4286
- OWNER = "OWNER",
4287
- /** Subscription was canceled by member (default if canceled by member identity) */
4288
- MEMBER = "MEMBER",
4289
- /** Subscription was canceled because of payment failure */
4290
- PAYMENT_FAILURE = "PAYMENT_FAILURE",
4291
- /** Subscription was canceled because of payment setup failure */
4292
- SETUP_FAILURE = "SETUP_FAILURE"
4527
+ /** @oneof */
4528
+ interface SendSubscriptionActionEventBORequestEventOneOf {
4529
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
4293
4530
  }
4294
- /** @enumType */
4295
- type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE';
4296
- interface SubscriptionPolicy {
4297
- /** Subscription expiration date can be updated */
4298
- expiryDateChangeable?: boolean;
4299
- /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
4300
- cancellableByMember?: boolean;
4301
- /** Subscription expiration date on cancellation can be set to next payment date */
4302
- cancellableAtNextPaymentCycle?: boolean;
4531
+ interface SendSubscriptionActionEventResponse {
4303
4532
  }
4304
- interface Suspension {
4305
- status?: StatusWithLiterals;
4306
- /** Beginning of the suspended period */
4307
- startsAt?: Date | null;
4308
- /** End of the suspended period */
4309
- endsAt?: Date | null;
4533
+ interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
4534
+ /** @format GUID */
4535
+ tenantId?: string;
4536
+ /** @format GUID */
4537
+ subscriptionId?: string;
4538
+ transactionId?: string;
4310
4539
  }
4311
- declare enum Status {
4312
- UNDEFINED = "UNDEFINED",
4313
- ACTIVE = "ACTIVE",
4314
- ENDED = "ENDED"
4540
+ interface PauseSubscriptionBORequest {
4541
+ /** @format GUID */
4542
+ tenantId?: string;
4543
+ /** @format GUID */
4544
+ subscriptionId?: string;
4545
+ pausePolicy?: PausePolicyWithLiterals;
4546
+ pauseAt?: PauseAtWithLiterals;
4547
+ initiator?: ActionInitiatorWithLiterals;
4548
+ /** @maxLength 500 */
4549
+ reason?: string | null;
4315
4550
  }
4316
- /** @enumType */
4317
- type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';
4318
- /** A duration expressed in amount of time units. */
4319
- interface V1Duration {
4320
- /** Amount of the unit */
4321
- amount?: number;
4322
- /** Day, Week, Month, Year. */
4323
- unit?: SubscriptionFrequencyWithLiterals;
4551
+ interface PauseSubscriptionBOResponse {
4552
+ subscription?: Subscription;
4324
4553
  }
4325
- interface V1SubscriptionActivated {
4326
- subscription?: V1Subscription;
4554
+ interface FixSubscriptionInvoicesConsistencyRequest {
4555
+ /** @format GUID */
4556
+ tenantId?: string;
4557
+ /** @format GUID */
4558
+ subscriptionId?: string;
4327
4559
  }
4328
- interface V1SubscriptionCanceled {
4329
- subscription?: V1Subscription;
4560
+ interface FixSubscriptionInvoicesConsistencyResponse {
4330
4561
  }
4331
- interface V1SubscriptionUpdated {
4332
- subscription?: V1Subscription;
4562
+ interface FixSubscriptionPaymentStatusRequest {
4563
+ /** @format GUID */
4564
+ tenantId?: string;
4565
+ /** @format GUID */
4566
+ subscriptionId?: string;
4567
+ /** When true, verify and report the would-be fix without mutating anything. */
4568
+ dryRun?: boolean;
4333
4569
  }
4334
- interface SubscriptionCycleTriggered {
4335
- subscription?: V1Subscription;
4336
- billingCycle?: number;
4570
+ interface FixSubscriptionPaymentStatusResponse {
4571
+ /** The invoice is PAID but the (DRAFT) subscription never processed the paid event. */
4572
+ mismatchDetected?: boolean;
4573
+ /** A real mismatch was found and the invoice-paid activation was re-driven (always false in dry-run). */
4574
+ fixed?: boolean;
4337
4575
  /**
4338
- * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
4339
- * @format GUID
4576
+ * Subscription status after the re-drive (ACTIVE / PENDING); in dry-run, the predicted status; "" when no fix ran.
4577
+ * @maxLength 50
4340
4578
  */
4341
- transactionId?: string | null;
4342
- }
4343
- interface SubscriptionMarkedAsPaid {
4344
- subscription?: V1Subscription;
4345
- /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
4346
- billingCycle?: number | null;
4347
- }
4348
- interface SubscriptionCancellationRequested {
4349
- subscription?: V1Subscription;
4579
+ resultingStatus?: string;
4580
+ /**
4581
+ * Human-readable summary of the decision and action.
4582
+ * @maxLength 500
4583
+ */
4584
+ detail?: string;
4350
4585
  }
4351
- interface SubscriptionSuspended {
4352
- subscription?: V1Subscription;
4586
+ interface UpdateSubscriptionCurrencyRequest {
4587
+ /**
4588
+ * Tenant ID (instance ID) of the subscription
4589
+ * @format GUID
4590
+ */
4591
+ tenantId?: string;
4592
+ /**
4593
+ * Subscription ID to update currency for
4594
+ * @format GUID
4595
+ */
4596
+ subscriptionId?: string;
4597
+ /**
4598
+ * New currency code (e.g., "USD", "EUR") - ISO 4217 format
4599
+ * @format CURRENCY
4600
+ */
4601
+ newCurrency?: string;
4602
+ /**
4603
+ * Exchange rate from current currency to new currency (newAmount = oldAmount * exchangeRate)
4604
+ * @decimalValue options { gt:0.00, maxScale:6 }
4605
+ */
4606
+ exchangeRate?: string;
4353
4607
  }
4354
- interface V1SubscriptionResumed {
4355
- subscription?: V1Subscription;
4608
+ interface UpdateSubscriptionCurrencyResponse {
4609
+ /** The updated subscription with new currency and converted amounts */
4610
+ subscription?: Subscription;
4356
4611
  }
4357
- interface SubscriptionExpired {
4358
- subscription?: V1Subscription;
4612
+ interface UpdateSubscriptionPlatformOriginRequest {
4613
+ /**
4614
+ * Subscription ID to update platform origin for
4615
+ * @format GUID
4616
+ */
4617
+ subscriptionId?: string;
4618
+ /**
4619
+ * Tenant ID (instance ID) of the subscription
4620
+ * @format GUID
4621
+ */
4622
+ tenantId?: string;
4623
+ /** New platform origin (appId and entityId) */
4624
+ platformOrigin?: PlatformOrigin;
4359
4625
  }
4360
- interface V1SubscriptionInitialPurchaseCompleted {
4361
- subscription?: V1Subscription;
4626
+ interface UpdateSubscriptionPlatformOriginResponse {
4627
+ /** The updated subscription with new platform origin */
4628
+ subscription?: Subscription;
4362
4629
  }
4363
4630
  interface ListSubscriptionHistoryRequest {
4364
4631
  /** @format GUID */
@@ -4425,6 +4692,8 @@ interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
4425
4692
  billingCyclePaid?: SubscriptionBillingCyclePaid;
4426
4693
  initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
4427
4694
  futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;
4695
+ /** Fired once when an offline subscription purchase is completed (BILL-534). */
4696
+ offlinePurchaseCompleted?: SubscriptionOfflinePurchaseCompleted;
4428
4697
  subscriptionBoAction?: SubscriptionBackOfficeAction;
4429
4698
  unknown?: UnknownSubscriptionEvent;
4430
4699
  }
@@ -4463,6 +4732,8 @@ interface SubscriptionEventPayloadOneOf {
4463
4732
  billingCyclePaid?: SubscriptionBillingCyclePaid;
4464
4733
  initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
4465
4734
  futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;
4735
+ /** Fired once when an offline subscription purchase is completed (BILL-534). */
4736
+ offlinePurchaseCompleted?: SubscriptionOfflinePurchaseCompleted;
4466
4737
  subscriptionBoAction?: SubscriptionBackOfficeAction;
4467
4738
  unknown?: UnknownSubscriptionEvent;
4468
4739
  }
@@ -4536,6 +4807,10 @@ interface FuturePriceUpdatesRequested {
4536
4807
  subscription?: Subscription;
4537
4808
  requestedUpdateData?: SubscriptionUpdateData;
4538
4809
  }
4810
+ interface SubscriptionOfflinePurchaseCompleted {
4811
+ subscription?: Subscription;
4812
+ actionDetails?: ActionDetails;
4813
+ }
4539
4814
  interface SubscriptionBackOfficeAction {
4540
4815
  subscription?: Subscription;
4541
4816
  /** The backoffice method name */
@@ -4766,7 +5041,7 @@ interface EventMetadata extends BaseEventMetadata {
4766
5041
  /** If present, indicates the action that triggered the event. */
4767
5042
  originatedFrom?: string | null;
4768
5043
  /**
4769
- * 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.
5044
+ * 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.
4770
5045
  * 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.
4771
5046
  */
4772
5047
  entityEventSequence?: string | null;
@@ -4786,6 +5061,8 @@ interface SubscriptionCanceledEnvelope {
4786
5061
  }
4787
5062
  /**
4788
5063
  * Triggered when a subscription is canceled.
5064
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5065
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4789
5066
  * @permissionScope Manage Stores
4790
5067
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4791
5068
  * @permissionScope Manage Events
@@ -4804,6 +5081,8 @@ interface SubscriptionExtendedEnvelope {
4804
5081
  }
4805
5082
  /**
4806
5083
  * Triggered when subscription has been extended
5084
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5085
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4807
5086
  * @permissionScope Manage Stores
4808
5087
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4809
5088
  * @permissionScope Manage Events
@@ -4822,6 +5101,8 @@ interface SubscriptionUpdatedEnvelope {
4822
5101
  }
4823
5102
  /**
4824
5103
  * Triggered when a subscription is updated.
5104
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5105
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4825
5106
  * @permissionScope Manage Stores
4826
5107
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4827
5108
  * @permissionScope Manage Events
@@ -4840,6 +5121,8 @@ interface SubscriptionAutoRenewalTurnedOffEnvelope {
4840
5121
  }
4841
5122
  /**
4842
5123
  * Triggered when a subscription cycleAutoRenew was turned off.
5124
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5125
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4843
5126
  * @permissionScope Manage Stores
4844
5127
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4845
5128
  * @permissionScope Manage Events
@@ -4858,6 +5141,8 @@ interface SubscriptionAutoRenewalTurnedOnEnvelope {
4858
5141
  }
4859
5142
  /**
4860
5143
  * Triggered when a subscription cycleAutoRenew was turned on.
5144
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5145
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4861
5146
  * @permissionScope Manage Stores
4862
5147
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4863
5148
  * @permissionScope Manage Events
@@ -4876,6 +5161,8 @@ interface SubscriptionBillingDateUpdatedEnvelope {
4876
5161
  }
4877
5162
  /**
4878
5163
  * Triggered when subscription has been extended
5164
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5165
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4879
5166
  * @permissionScope Manage Stores
4880
5167
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4881
5168
  * @permissionScope Manage Events
@@ -4892,7 +5179,9 @@ interface SubscriptionLatestInvoiceMarkedAsPaidEnvelope {
4892
5179
  data: LatestInvoiceMarkedAsPaid;
4893
5180
  metadata: EventMetadata;
4894
5181
  }
4895
- /** @permissionScope Manage Stores
5182
+ /** @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5183
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
5184
+ * @permissionScope Manage Stores
4896
5185
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4897
5186
  * @permissionScope Manage Events
4898
5187
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
@@ -4910,6 +5199,8 @@ interface SubscriptionPauseScheduleCanceledEnvelope {
4910
5199
  }
4911
5200
  /**
4912
5201
  * Triggered when scheduled pause canceled
5202
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5203
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4913
5204
  * @permissionScope Manage Stores
4914
5205
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4915
5206
  * @permissionScope Manage Events
@@ -4928,6 +5219,8 @@ interface SubscriptionPauseScheduledEnvelope {
4928
5219
  }
4929
5220
  /**
4930
5221
  * Triggered when pause subscription requested
5222
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5223
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4931
5224
  * @permissionScope Manage Stores
4932
5225
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4933
5226
  * @permissionScope Manage Events
@@ -4946,6 +5239,8 @@ interface SubscriptionPausedEnvelope {
4946
5239
  }
4947
5240
  /**
4948
5241
  * Triggered when a subscription is paused.
5242
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5243
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4949
5244
  * @permissionScope Manage Stores
4950
5245
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4951
5246
  * @permissionScope Manage Events
@@ -4964,6 +5259,8 @@ interface SubscriptionResumeScheduleCanceledEnvelope {
4964
5259
  }
4965
5260
  /**
4966
5261
  * Triggered when scheduled pause canceled
5262
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5263
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4967
5264
  * @permissionScope Manage Stores
4968
5265
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4969
5266
  * @permissionScope Manage Events
@@ -4982,6 +5279,8 @@ interface SubscriptionResumeScheduledEnvelope {
4982
5279
  }
4983
5280
  /**
4984
5281
  * Triggered when resume subscription requested
5282
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5283
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
4985
5284
  * @permissionScope Manage Stores
4986
5285
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4987
5286
  * @permissionScope Manage Events
@@ -5000,6 +5299,8 @@ interface SubscriptionResumedEnvelope {
5000
5299
  }
5001
5300
  /**
5002
5301
  * Triggered when a subscription is resumed.
5302
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
5303
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
5003
5304
  * @permissionScope Manage Stores
5004
5305
  * @permissionScopeId SCOPE.STORES.MANAGE-STORES
5005
5306
  * @permissionScope Manage Events
@@ -5247,20 +5548,6 @@ interface CustomerUpdateBillingDateOptions {
5247
5548
  /** Optional reason for the update. */
5248
5549
  reason?: string | null;
5249
5550
  }
5250
- /**
5251
- * This used only for automation and permitted tenants (QA & testing)
5252
- * @public
5253
- * @documentationMaturity preview
5254
- * @requiredField options.tenantId
5255
- * @requiredField subscriptionId
5256
- * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsBackOfficeService.PayCycle
5257
- */
5258
- 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>>;
5259
- interface PayCycleOptions {
5260
- paymentTestMode?: PaymentTestModeWithLiterals;
5261
- /** @format GUID */
5262
- tenantId: string;
5263
- }
5264
5551
  /**
5265
5552
  * Returns a single subscription by its id
5266
5553
  * @public
@@ -5393,6 +5680,8 @@ interface ResumeSubscriptionOptions {
5393
5680
  /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
5394
5681
  resumeAtSchedule?: ScheduleAdditionalInfo;
5395
5682
  actionContext: ActionContext;
5683
+ /** Strategy for resuming a migrated paused subscription when the previous billing date is missing. */
5684
+ missingPreviousBillingDateResumeStrategy?: MissingPreviousBillingDateResumeStrategyWithLiterals;
5396
5685
  }
5397
5686
  /**
5398
5687
  * Lists subscriptions based on specified filters.
@@ -5708,4 +5997,4 @@ interface ListSubscriptionHistoryOptions {
5708
5997
  cursor?: CursorPaging;
5709
5998
  }
5710
5999
 
5711
- 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 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 };
6000
+ 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 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 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, 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, previewSubscriptionCharges, previewSubscriptionsCharges, querySubscriptions, resumeSubscription, reviseSubscription, searchSubscriptions, turnOffSubscriptionAutoRenewal, turnOnSubscriptionAutoRenewal, updateSubscriptionBillingDate, updateSubscriptionPaymentMethod };