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