@wix/auto_sdk_ecom_checkout 1.0.36 → 1.0.37

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 (134) hide show
  1. package/build/{es/src/ecom-v1-checkout-checkout.types.d.ts → ecom-v1-checkout-checkout.universal-DEDRvPML.d.mts} +674 -365
  2. package/build/{cjs/src/ecom-v1-checkout-checkout.types.d.ts → ecom-v1-checkout-checkout.universal-DEDRvPML.d.ts} +674 -365
  3. package/build/index.d.mts +210 -0
  4. package/build/index.d.ts +210 -0
  5. package/build/index.js +2782 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +2708 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{cjs/src/ecom-v1-checkout-checkout.types.d.ts → ecom-v1-checkout-checkout.universal-CirtPjnM.d.mts} +803 -364
  10. package/build/internal/{es/src/ecom-v1-checkout-checkout.types.d.ts → ecom-v1-checkout-checkout.universal-CirtPjnM.d.ts} +803 -364
  11. package/build/internal/index.d.mts +240 -0
  12. package/build/internal/index.d.ts +240 -0
  13. package/build/internal/index.js +2782 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +2708 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +2606 -0
  18. package/build/internal/meta.d.ts +2606 -0
  19. package/build/internal/meta.js +1587 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +1544 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +2606 -0
  24. package/build/meta.d.ts +2606 -0
  25. package/build/meta.js +1587 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +1544 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/ecom-v1-checkout-checkout.context.d.ts +0 -35
  40. package/build/cjs/src/ecom-v1-checkout-checkout.context.js +0 -76
  41. package/build/cjs/src/ecom-v1-checkout-checkout.context.js.map +0 -1
  42. package/build/cjs/src/ecom-v1-checkout-checkout.http.d.ts +0 -101
  43. package/build/cjs/src/ecom-v1-checkout-checkout.http.js +0 -1317
  44. package/build/cjs/src/ecom-v1-checkout-checkout.http.js.map +0 -1
  45. package/build/cjs/src/ecom-v1-checkout-checkout.meta.d.ts +0 -59
  46. package/build/cjs/src/ecom-v1-checkout-checkout.meta.js +0 -351
  47. package/build/cjs/src/ecom-v1-checkout-checkout.meta.js.map +0 -1
  48. package/build/cjs/src/ecom-v1-checkout-checkout.public.d.ts +0 -182
  49. package/build/cjs/src/ecom-v1-checkout-checkout.public.js +0 -357
  50. package/build/cjs/src/ecom-v1-checkout-checkout.public.js.map +0 -1
  51. package/build/cjs/src/ecom-v1-checkout-checkout.types.js +0 -303
  52. package/build/cjs/src/ecom-v1-checkout-checkout.types.js.map +0 -1
  53. package/build/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +0 -4437
  54. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js +0 -1587
  55. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/ecom-v1-checkout-checkout.context.d.ts +0 -35
  67. package/build/es/src/ecom-v1-checkout-checkout.context.js +0 -41
  68. package/build/es/src/ecom-v1-checkout-checkout.context.js.map +0 -1
  69. package/build/es/src/ecom-v1-checkout-checkout.http.d.ts +0 -101
  70. package/build/es/src/ecom-v1-checkout-checkout.http.js +0 -1297
  71. package/build/es/src/ecom-v1-checkout-checkout.http.js.map +0 -1
  72. package/build/es/src/ecom-v1-checkout-checkout.meta.d.ts +0 -59
  73. package/build/es/src/ecom-v1-checkout-checkout.meta.js +0 -308
  74. package/build/es/src/ecom-v1-checkout-checkout.meta.js.map +0 -1
  75. package/build/es/src/ecom-v1-checkout-checkout.public.d.ts +0 -182
  76. package/build/es/src/ecom-v1-checkout-checkout.public.js +0 -305
  77. package/build/es/src/ecom-v1-checkout-checkout.public.js.map +0 -1
  78. package/build/es/src/ecom-v1-checkout-checkout.types.js +0 -300
  79. package/build/es/src/ecom-v1-checkout-checkout.types.js.map +0 -1
  80. package/build/es/src/ecom-v1-checkout-checkout.universal.d.ts +0 -4437
  81. package/build/es/src/ecom-v1-checkout-checkout.universal.js +0 -1544
  82. package/build/es/src/ecom-v1-checkout-checkout.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.d.ts +0 -41
  93. package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.js +0 -76
  94. package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.js.map +0 -1
  95. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.d.ts +0 -101
  96. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js +0 -1317
  97. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js.map +0 -1
  98. package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.d.ts +0 -59
  99. package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.js +0 -351
  100. package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.js.map +0 -1
  101. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.d.ts +0 -206
  102. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js +0 -357
  103. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js.map +0 -1
  104. package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js +0 -303
  105. package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js.map +0 -1
  106. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +0 -4623
  107. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js +0 -1587
  108. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/ecom-v1-checkout-checkout.context.d.ts +0 -41
  119. package/build/internal/es/src/ecom-v1-checkout-checkout.context.js +0 -41
  120. package/build/internal/es/src/ecom-v1-checkout-checkout.context.js.map +0 -1
  121. package/build/internal/es/src/ecom-v1-checkout-checkout.http.d.ts +0 -101
  122. package/build/internal/es/src/ecom-v1-checkout-checkout.http.js +0 -1297
  123. package/build/internal/es/src/ecom-v1-checkout-checkout.http.js.map +0 -1
  124. package/build/internal/es/src/ecom-v1-checkout-checkout.meta.d.ts +0 -59
  125. package/build/internal/es/src/ecom-v1-checkout-checkout.meta.js +0 -308
  126. package/build/internal/es/src/ecom-v1-checkout-checkout.meta.js.map +0 -1
  127. package/build/internal/es/src/ecom-v1-checkout-checkout.public.d.ts +0 -206
  128. package/build/internal/es/src/ecom-v1-checkout-checkout.public.js +0 -305
  129. package/build/internal/es/src/ecom-v1-checkout-checkout.public.js.map +0 -1
  130. package/build/internal/es/src/ecom-v1-checkout-checkout.types.js +0 -300
  131. package/build/internal/es/src/ecom-v1-checkout-checkout.types.js.map +0 -1
  132. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.d.ts +0 -4623
  133. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js +0 -1544
  134. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js.map +0 -1
@@ -1,4623 +0,0 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- export interface Checkout {
3
- /**
4
- * Checkout ID.
5
- * @format GUID
6
- * @readonly
7
- */
8
- _id?: string | null;
9
- /**
10
- * Line items.
11
- *
12
- * Max: 300 items
13
- * @minSize 1
14
- * @maxSize 300
15
- * @readonly
16
- */
17
- lineItems?: LineItem[];
18
- /** Billing information. */
19
- billingInfo?: AddressWithContact;
20
- /** Shipping information. */
21
- shippingInfo?: ShippingInfo;
22
- /**
23
- * [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.
24
- * @maxLength 1000
25
- */
26
- buyerNote?: string | null;
27
- /** Buyer information. */
28
- buyerInfo?: BuyerInfo;
29
- /**
30
- * The currency selected by the buyer during the purchase flow, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
31
- * @readonly
32
- * @format CURRENCY
33
- */
34
- conversionCurrency?: string;
35
- /**
36
- * Calculated price summary for the checkout.
37
- * @readonly
38
- */
39
- priceSummary?: PriceSummary;
40
- /**
41
- * Errors when calculating totals.
42
- * @readonly
43
- */
44
- calculationErrors?: CalculationErrors;
45
- /**
46
- * Applied gift card details.
47
- *
48
- * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/setting-up-wix-gift-cards-9451439).
49
- * @readonly
50
- */
51
- giftCard?: GiftCard;
52
- /**
53
- * Applied discounts.
54
- * @readonly
55
- */
56
- appliedDiscounts?: AppliedDiscount[];
57
- /** Custom fields. */
58
- customFields?: CustomField[];
59
- /**
60
- * Weight measurement unit. Defaults to a site's weight unit.
61
- * @readonly
62
- */
63
- weightUnit?: WeightUnitWithLiterals;
64
- /**
65
- * Tax summary.
66
- * @readonly
67
- */
68
- taxSummary?: TaxSummary;
69
- /**
70
- * The site's default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
71
- * @format CURRENCY
72
- * @readonly
73
- */
74
- currency?: string;
75
- /**
76
- * Sales channel that submitted the order.
77
- * @readonly
78
- */
79
- channelType?: ChannelTypeWithLiterals;
80
- /**
81
- * Site language in which original values are shown.
82
- * @readonly
83
- */
84
- siteLanguage?: string;
85
- /**
86
- * Language for communication with the buyer. Defaults to the site language.
87
- *
88
- * For a site that supports multiple languages, this is the language the buyer selected.
89
- * @readonly
90
- */
91
- buyerLanguage?: string;
92
- /**
93
- * Whether an order was successfully created from this checkout.
94
- *
95
- * For an order to be successful, it must be successfully paid for (unless the total is 0).
96
- * @readonly
97
- */
98
- completed?: boolean;
99
- /**
100
- * Whether tax is included in line item prices.
101
- * @readonly
102
- */
103
- taxIncludedInPrice?: boolean;
104
- /**
105
- * ID of the checkout's initiator.
106
- * @readonly
107
- */
108
- createdBy?: CreatedBy;
109
- /**
110
- * Date and time the checkout was created.
111
- * @readonly
112
- */
113
- _createdDate?: Date | null;
114
- /**
115
- * Date and time the checkout was updated.
116
- * @readonly
117
- */
118
- _updatedDate?: Date | null;
119
- /**
120
- * Minimal amount to pay in order to place the order.
121
- * @readonly
122
- */
123
- payNow?: PriceSummary;
124
- /**
125
- * Remaining amount for the order to be fully paid.
126
- * @readonly
127
- */
128
- payLater?: PriceSummary;
129
- /** Memberships to apply when creating the order. */
130
- membershipOptions?: MembershipOptions;
131
- /**
132
- * Additional Fees.
133
- * @maxSize 100
134
- */
135
- additionalFees?: AdditionalFee[];
136
- /**
137
- * Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart.
138
- * @format GUID
139
- */
140
- cartId?: string | null;
141
- /**
142
- * List of validation violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
143
- * @readonly
144
- */
145
- violations?: Violation[];
146
- /**
147
- * Custom field data for the checkout object.
148
- *
149
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
150
- */
151
- extendedFields?: ExtendedFields;
152
- /**
153
- * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
154
- * @format GUID
155
- * @readonly
156
- */
157
- purchaseFlowId?: string | null;
158
- /**
159
- * Additional settings for customization of the checkout process.
160
- *
161
- * > **Notes:**
162
- * > * Custom settings can only be set when creating a checkout.
163
- * > * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
164
- * @immutable
165
- */
166
- customSettings?: CustomSettings;
167
- /**
168
- * Reference IDs for the app and component providing custom checkout page content.
169
- *
170
- * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
171
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
172
- */
173
- customContentReference?: CustomContentReference;
174
- /**
175
- * References to an external app and resource associated with this checkout.
176
- * Used for integration and tracking across different platforms.
177
- * @immutable
178
- */
179
- externalReference?: ExternalReference;
180
- /**
181
- * Order ID.
182
- *
183
- * This field is empty until the checkout completes and becomes an order.
184
- * @internal
185
- * @format GUID
186
- * @readonly
187
- */
188
- orderId?: string | null;
189
- /**
190
- * Payment for subscriptions after free trial period.
191
- * @readonly
192
- */
193
- payAfterFreeTrial?: PriceSummary;
194
- /**
195
- * The business location ID associated with the checkout.
196
- *
197
- * To learn more, see the Locations API.
198
- * @format GUID
199
- */
200
- businessLocationId?: string | null;
201
- /**
202
- * Whether payment is required to create an order.
203
- *
204
- * Payment is required if any of the following conditions are met:
205
- * 1. At least one item requires a payment method. This can be because the item has the `savePaymentMethod` field set to `true`, or the item is a subscription with a price greater than zero.
206
- * 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.
207
- * @internal
208
- * @readonly
209
- */
210
- paymentRequired?: boolean;
211
- /**
212
- * Charges information for each subscription in the checkout.
213
- * @internal
214
- * @readonly
215
- * @maxSize 100
216
- */
217
- subscriptionCharges?: SubscriptionCharges[];
218
- /**
219
- * Currency used for payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
220
- * @readonly
221
- * @format CURRENCY
222
- */
223
- paymentCurrency?: string;
224
- }
225
- export interface LineItem {
226
- /**
227
- * Line item ID.
228
- * @format GUID
229
- * @readonly
230
- */
231
- _id?: string | null;
232
- /**
233
- * Item quantity.
234
- *
235
- * Min: `"1"`
236
- * Max: `"100000"`
237
- * @min 1
238
- * @max 100000
239
- */
240
- quantity?: number;
241
- /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
242
- catalogReference?: CatalogReference;
243
- /**
244
- * Item name.
245
- * + Stores - `product.name`
246
- * + Bookings - `service.info.name`
247
- * + Events - `ticket.name`
248
- * @readonly
249
- */
250
- productName?: ProductName;
251
- /**
252
- * URL to the item's page on the site.
253
- * @readonly
254
- */
255
- url?: string;
256
- /**
257
- * Item price **after** catalog-defined discount and line item discounts.
258
- * @readonly
259
- */
260
- price?: MultiCurrencyPrice;
261
- /**
262
- * Total line item price **after** catalog-defined discount and line item discounts.
263
- * @readonly
264
- */
265
- lineItemPrice?: MultiCurrencyPrice;
266
- /**
267
- * Item price **before** catalog-defined discount. Defaults to `price` when not provided.
268
- * @readonly
269
- */
270
- fullPrice?: MultiCurrencyPrice;
271
- /**
272
- * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided.
273
- * @readonly
274
- */
275
- priceBeforeDiscounts?: MultiCurrencyPrice;
276
- /**
277
- * Total price after all discounts and tax.
278
- * @readonly
279
- */
280
- totalPriceAfterTax?: MultiCurrencyPrice;
281
- /**
282
- * Total price after discounts, and before tax.
283
- * @readonly
284
- */
285
- totalPriceBeforeTax?: MultiCurrencyPrice;
286
- /**
287
- * Tax details for this line item.
288
- * @readonly
289
- */
290
- taxDetails?: ItemTaxFullDetails;
291
- /**
292
- * Discount for this line item's entire quantity.
293
- * @readonly
294
- */
295
- discount?: MultiCurrencyPrice;
296
- /**
297
- * Line item description lines. Used for display purposes for the cart, checkout and order.
298
- * @readonly
299
- */
300
- descriptionLines?: DescriptionLine[];
301
- /**
302
- * Line item image details.
303
- * @readonly
304
- */
305
- media?: string;
306
- /**
307
- * Item availability details.
308
- * @readonly
309
- */
310
- availability?: ItemAvailabilityInfo;
311
- /**
312
- * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability.
313
- * @readonly
314
- */
315
- physicalProperties?: PhysicalProperties;
316
- /**
317
- * Item type. Either a preset type or custom.
318
- * @readonly
319
- */
320
- itemType?: ItemType;
321
- /**
322
- * Subscription option information.
323
- * @readonly
324
- */
325
- subscriptionOptionInfo?: SubscriptionOptionInfo;
326
- /**
327
- * Type of selected payment option for current item.
328
- *
329
- * Default: `FULL_PAYMENT_ONLINE`
330
- * @readonly
331
- */
332
- paymentOption?: PaymentOptionTypeWithLiterals;
333
- /**
334
- * Service properties. When relevant, this contains information such as date and number of participants.
335
- * @readonly
336
- */
337
- serviceProperties?: ServiceProperties;
338
- /**
339
- * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
340
- * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
341
- * + In most cases, this field has the same value as `catalogReference.catalogItemId`.
342
- * + Used in membership validation.
343
- * @minLength 1
344
- * @maxLength 36
345
- * @readonly
346
- */
347
- rootCatalogItemId?: string | null;
348
- /**
349
- * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
350
- * @readonly
351
- */
352
- priceDescription?: PriceDescription;
353
- /**
354
- * Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
355
- * @readonly
356
- */
357
- depositAmount?: MultiCurrencyPrice;
358
- /**
359
- * Delivery profile ID.
360
- * @format GUID
361
- * @readonly
362
- */
363
- deliveryProfileId?: string | null;
364
- /**
365
- * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin.
366
- * @readonly
367
- */
368
- customLineItem?: boolean;
369
- /**
370
- * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
371
- * @minLength 1
372
- * @maxLength 2500
373
- * @readonly
374
- */
375
- consentRequiredPaymentPolicy?: string | null;
376
- /**
377
- * Overriding values for catalog item properties.
378
- *
379
- * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
380
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
381
- */
382
- catalogOverrideFields?: CatalogOverrideFields;
383
- /**
384
- * Whether the price is not yet defined, and will be updated after the order is created.
385
- * @readonly
386
- */
387
- priceUndetermined?: boolean;
388
- /**
389
- * Whether the line item quantity is fixed and cannot be changed.
390
- * @readonly
391
- */
392
- fixedQuantity?: boolean;
393
- /**
394
- * Whether to save the payment method on the order.
395
- *
396
- * Default: `false`
397
- * @readonly
398
- */
399
- savePaymentMethod?: boolean;
400
- /** Address to use for tax calculation purposes. */
401
- taxableAddress?: TaxableAddress;
402
- /**
403
- * Custom extended fields for the line item object.
404
- *
405
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
406
- * @internal
407
- */
408
- extendedFields?: ExtendedFields;
409
- /**
410
- * Policies to be displayed to the customer on the checkout page.
411
- * @readonly
412
- * @maxSize 5
413
- */
414
- policies?: Policy[];
415
- /**
416
- * ID of the app managing the inventory.
417
- * @internal
418
- * @format GUID
419
- */
420
- inventoryAppId?: string | null;
421
- /**
422
- * Whether the item can only be purchased by site members.
423
- *
424
- * Default: `false`
425
- * @readonly
426
- */
427
- membersOnly?: boolean;
428
- /**
429
- * Modifier groups that were added to the item.
430
- * @readonly
431
- * @maxSize 25
432
- */
433
- modifierGroups?: ModifierGroup[];
434
- /**
435
- * Total price of all item modifiers. Included in the item price.
436
- * @readonly
437
- */
438
- modifiersTotalPrice?: MultiCurrencyPrice;
439
- }
440
- /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
441
- export interface CatalogReference {
442
- /**
443
- * ID of the item within the catalog it belongs to.
444
- * @minLength 1
445
- * @maxLength 36
446
- */
447
- catalogItemId?: string;
448
- /**
449
- * ID of the app providing the catalog.
450
- *
451
- * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
452
- *
453
- * For items from Wix catalogs, the following values always apply:
454
- * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
455
- * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
456
- * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
457
- * @minLength 1
458
- */
459
- appId?: string;
460
- /**
461
- * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
462
- *
463
- * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
464
- */
465
- options?: Record<string, any> | null;
466
- }
467
- export interface ProductName {
468
- /**
469
- * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
470
- *
471
- * Min: 1 character.
472
- * Max: 200 characters.
473
- * @minLength 1
474
- * @maxLength 200
475
- */
476
- original?: string;
477
- /**
478
- * Item name translated into the buyer's language.
479
- *
480
- * Min: 1 character.
481
- * Max: 400 characters.
482
- * Default: Same as `original`.
483
- * @minLength 1
484
- * @maxLength 400
485
- */
486
- translated?: string | null;
487
- }
488
- export interface MultiCurrencyPrice {
489
- /**
490
- * Amount.
491
- * @decimalValue options { gte:0, lte:1000000000000000 }
492
- */
493
- amount?: string;
494
- /**
495
- * Converted amount.
496
- * @readonly
497
- * @decimalValue options { gte:0, lte:1000000000000000 }
498
- */
499
- convertedAmount?: string;
500
- /**
501
- * Amount formatted with currency symbol.
502
- * @readonly
503
- */
504
- formattedAmount?: string;
505
- /**
506
- * Converted amount formatted with currency symbol.
507
- * @readonly
508
- */
509
- formattedConvertedAmount?: string;
510
- }
511
- export interface ItemTaxFullDetails {
512
- /** Amount for which tax is calculated. */
513
- taxableAmount?: MultiCurrencyPrice;
514
- /**
515
- * Tax rate %, as a decimal point between 0 and 1.
516
- * @decimalValue options { gte:0, lte:1, maxScale:6 }
517
- */
518
- taxRate?: string;
519
- /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
520
- totalTax?: MultiCurrencyPrice;
521
- /**
522
- * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.
523
- * @readonly
524
- * @deprecated
525
- */
526
- rateBreakdown?: TaxRateBreakdown[];
527
- }
528
- export interface TaxRateBreakdown {
529
- /**
530
- * Name of tax against which the calculation was performed.
531
- * @maxLength 100
532
- */
533
- name?: string;
534
- /**
535
- * Rate at which this tax detail was calculated.
536
- * @decimalValue options { gte:0, lte:1, maxScale:6 }
537
- */
538
- rate?: string;
539
- /** Amount of tax for this tax detail. */
540
- tax?: MultiCurrencyPrice;
541
- }
542
- /**
543
- * TaxBreakdown represents tax information for a line item.
544
- * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
545
- */
546
- export interface TaxBreakdown {
547
- /**
548
- * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
549
- * @maxLength 200
550
- */
551
- jurisdiction?: string | null;
552
- /** The amount of this line item price that was considered nontaxable. (Decimal value) */
553
- nonTaxableAmount?: MultiCurrencyPrice;
554
- /**
555
- * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)
556
- * @decimalValue options { gte:0, maxScale:6 }
557
- */
558
- rate?: string | null;
559
- /** The amount of tax estimated for this line item. (Decimal value) */
560
- taxAmount?: MultiCurrencyPrice;
561
- /** The taxable amount of this line item. */
562
- taxableAmount?: MultiCurrencyPrice;
563
- /**
564
- * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
565
- * @maxLength 200
566
- */
567
- taxType?: string | null;
568
- /**
569
- * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
570
- * This name should be explicit enough to allow the merchant to understand what tax was calculated.
571
- * @maxLength 200
572
- */
573
- taxName?: string | null;
574
- /** The type of the jurisdiction in which this tax detail applies. */
575
- jurisdictionType?: JurisdictionTypeWithLiterals;
576
- }
577
- /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
578
- export declare enum JurisdictionType {
579
- UNDEFINED = "UNDEFINED",
580
- COUNTRY = "COUNTRY",
581
- STATE = "STATE",
582
- COUNTY = "COUNTY",
583
- CITY = "CITY",
584
- SPECIAL = "SPECIAL"
585
- }
586
- /** @enumType */
587
- export type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
588
- export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
589
- /** Description line plain text value. */
590
- plainText?: PlainTextValue;
591
- /** Description line color value. */
592
- colorInfo?: Color;
593
- /** Description line name. */
594
- name?: DescriptionLineName;
595
- /**
596
- * Whether the description line originates from a modifier.
597
- * @internal
598
- */
599
- modifierDescriptionLine?: boolean;
600
- }
601
- /** @oneof */
602
- export interface DescriptionLineValueOneOf {
603
- /** Description line plain text value. */
604
- plainText?: PlainTextValue;
605
- /** Description line color value. */
606
- colorInfo?: Color;
607
- }
608
- /** @oneof */
609
- export interface DescriptionLineDescriptionLineValueOneOf {
610
- }
611
- export interface DescriptionLineName {
612
- /**
613
- * Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
614
- * @maxLength 100
615
- */
616
- original?: string;
617
- /**
618
- * Description line name translated into the buyer's language.
619
- *
620
- * Default: Same as `original`.
621
- * @maxLength 200
622
- */
623
- translated?: string | null;
624
- }
625
- export interface PlainTextValue {
626
- /**
627
- * Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
628
- * @maxLength 600
629
- */
630
- original?: string;
631
- /**
632
- * Description line plain text value translated into the buyer's language.
633
- *
634
- * Default: Same as `original`.
635
- * @maxLength 600
636
- */
637
- translated?: string | null;
638
- }
639
- export interface Color {
640
- /**
641
- * Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
642
- * @maxLength 500
643
- */
644
- original?: string;
645
- /**
646
- * Description line color name translated into the buyer's language.
647
- *
648
- * Default: Same as `original`.
649
- * @maxLength 500
650
- */
651
- translated?: string | null;
652
- /** HEX or RGB color code for display. */
653
- code?: string | null;
654
- }
655
- export declare enum DescriptionLineType {
656
- /** Unrecognized type. */
657
- UNRECOGNISED = "UNRECOGNISED",
658
- /** Plain text type. */
659
- PLAIN_TEXT = "PLAIN_TEXT",
660
- /** Color type. */
661
- COLOR = "COLOR"
662
- }
663
- /** @enumType */
664
- export type DescriptionLineTypeWithLiterals = DescriptionLineType | 'UNRECOGNISED' | 'PLAIN_TEXT' | 'COLOR';
665
- export interface FocalPoint {
666
- /** X-coordinate of the focal point. */
667
- x?: number;
668
- /** Y-coordinate of the focal point. */
669
- y?: number;
670
- /** crop by height */
671
- height?: number | null;
672
- /** crop by width */
673
- width?: number | null;
674
- }
675
- export interface ItemAvailabilityInfo {
676
- /** Item availability status. */
677
- status?: ItemAvailabilityStatusWithLiterals;
678
- /** Quantity available. */
679
- quantityAvailable?: number | null;
680
- }
681
- export declare enum ItemAvailabilityStatus {
682
- AVAILABLE = "AVAILABLE",
683
- /** Item does not exist. */
684
- NOT_FOUND = "NOT_FOUND",
685
- /** Item is not in stock. */
686
- NOT_AVAILABLE = "NOT_AVAILABLE",
687
- /** Available quantity is less than requested. */
688
- PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE"
689
- }
690
- /** @enumType */
691
- export type ItemAvailabilityStatusWithLiterals = ItemAvailabilityStatus | 'AVAILABLE' | 'NOT_FOUND' | 'NOT_AVAILABLE' | 'PARTIALLY_AVAILABLE';
692
- export interface PhysicalProperties {
693
- /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
694
- weight?: number | null;
695
- /**
696
- * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
697
- * @maxLength 40
698
- */
699
- sku?: string | null;
700
- /** Whether this line item is shippable. */
701
- shippable?: boolean;
702
- }
703
- export interface Scope {
704
- /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
705
- namespace?: string;
706
- /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
707
- group?: Group;
708
- }
709
- export interface Group {
710
- /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
711
- name?: string;
712
- /** Item ID (when the coupon scope is limited to just one item). */
713
- entityId?: string | null;
714
- }
715
- export interface ItemType extends ItemTypeItemTypeDataOneOf {
716
- /** Preset item type. */
717
- preset?: ItemTypeItemTypeWithLiterals;
718
- /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
719
- custom?: string;
720
- }
721
- /** @oneof */
722
- export interface ItemTypeItemTypeDataOneOf {
723
- /** Preset item type. */
724
- preset?: ItemTypeItemTypeWithLiterals;
725
- /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
726
- custom?: string;
727
- }
728
- export declare enum ItemTypeItemType {
729
- UNRECOGNISED = "UNRECOGNISED",
730
- PHYSICAL = "PHYSICAL",
731
- DIGITAL = "DIGITAL",
732
- GIFT_CARD = "GIFT_CARD",
733
- SERVICE = "SERVICE"
734
- }
735
- /** @enumType */
736
- export type ItemTypeItemTypeWithLiterals = ItemTypeItemType | 'UNRECOGNISED' | 'PHYSICAL' | 'DIGITAL' | 'GIFT_CARD' | 'SERVICE';
737
- export interface SubscriptionOptionInfo {
738
- /** Subscription option settings. */
739
- subscriptionSettings?: SubscriptionSettings;
740
- /** Subscription option title. */
741
- title?: Title;
742
- /** Subscription option description. */
743
- description?: Description;
744
- }
745
- export interface SubscriptionSettings {
746
- /** Frequency of recurring payment. */
747
- frequency?: SubscriptionFrequencyWithLiterals;
748
- /**
749
- * Interval of recurring payment.
750
- *
751
- * Default: `1`.
752
- * If SubscriptionFrequency is Day the minimum interval is 7
753
- * @min 1
754
- * @max 50
755
- */
756
- interval?: number | null;
757
- /** Whether subscription is renewed automatically at the end of each period. */
758
- autoRenewal?: boolean;
759
- /**
760
- * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.
761
- * @min 1
762
- */
763
- billingCycles?: number | null;
764
- /** Whether to allow the customer to cancel the subscription.. */
765
- enableCustomerCancellation?: boolean;
766
- /**
767
- * Period until first cycle starts. If applied payNow will be 0
768
- * If None => no free trial
769
- */
770
- freeTrialPeriod?: FreeTrialPeriod;
771
- /**
772
- * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.
773
- * @internal
774
- */
775
- startDate?: Date | null;
776
- }
777
- /** Frequency unit of recurring payment */
778
- export declare enum SubscriptionFrequency {
779
- UNDEFINED = "UNDEFINED",
780
- DAY = "DAY",
781
- WEEK = "WEEK",
782
- MONTH = "MONTH",
783
- YEAR = "YEAR"
784
- }
785
- /** @enumType */
786
- export type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
787
- export interface FreeTrialPeriod {
788
- /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
789
- frequency?: SubscriptionFrequencyWithLiterals;
790
- /**
791
- * interval of period
792
- * @min 1
793
- * @max 999
794
- */
795
- interval?: number;
796
- }
797
- export interface Title {
798
- /**
799
- * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
800
- * @minLength 1
801
- * @maxLength 150
802
- */
803
- original?: string;
804
- /**
805
- * Subscription option name translated into the buyer's language.
806
- *
807
- * Default: Same as `original`.
808
- * @minLength 1
809
- * @maxLength 150
810
- */
811
- translated?: string | null;
812
- }
813
- export interface Description {
814
- /**
815
- * Subscription option description.
816
- * @maxLength 500
817
- */
818
- original?: string;
819
- /**
820
- * Translated subscription option description.
821
- * @maxLength 500
822
- */
823
- translated?: string | null;
824
- }
825
- export interface SecuredMedia {
826
- /**
827
- * Media ID in Wix Media Manager.
828
- * @minLength 1
829
- * @maxLength 100
830
- */
831
- _id?: string;
832
- /**
833
- * Original filename.
834
- * @minLength 1
835
- * @maxLength 1000
836
- */
837
- fileName?: string;
838
- /** File type. */
839
- fileType?: FileTypeWithLiterals;
840
- }
841
- export declare enum FileType {
842
- UNSPECIFIED = "UNSPECIFIED",
843
- SECURE_PICTURE = "SECURE_PICTURE",
844
- SECURE_VIDEO = "SECURE_VIDEO",
845
- SECURE_DOCUMENT = "SECURE_DOCUMENT",
846
- SECURE_MUSIC = "SECURE_MUSIC",
847
- SECURE_ARCHIVE = "SECURE_ARCHIVE"
848
- }
849
- /** @enumType */
850
- export type FileTypeWithLiterals = FileType | 'UNSPECIFIED' | 'SECURE_PICTURE' | 'SECURE_VIDEO' | 'SECURE_DOCUMENT' | 'SECURE_MUSIC' | 'SECURE_ARCHIVE';
851
- /** Type of selected payment option for catalog item */
852
- export declare enum PaymentOptionType {
853
- /** The entire payment for this item happens as part of the checkout. */
854
- FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
855
- /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
856
- FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
857
- /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
858
- MEMBERSHIP = "MEMBERSHIP",
859
- /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
860
- DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
861
- /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */
862
- MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
863
- }
864
- /** @enumType */
865
- export type PaymentOptionTypeWithLiterals = PaymentOptionType | 'FULL_PAYMENT_ONLINE' | 'FULL_PAYMENT_OFFLINE' | 'MEMBERSHIP' | 'DEPOSIT_ONLINE' | 'MEMBERSHIP_OFFLINE';
866
- export interface ServiceProperties {
867
- /**
868
- * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
869
- * For example, the start time of a class.
870
- */
871
- scheduledDate?: Date | null;
872
- /**
873
- * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.
874
- * @min 1
875
- * @max 10000
876
- */
877
- numberOfParticipants?: number | null;
878
- }
879
- export interface PriceDescription {
880
- /**
881
- * __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
882
- * @minLength 1
883
- * @maxLength 100
884
- */
885
- original?: string;
886
- /**
887
- * Price description translated into the buyer's language.
888
- *
889
- * Default: Same as `original`.
890
- * @minLength 1
891
- * @maxLength 100
892
- */
893
- translated?: string | null;
894
- }
895
- export interface CatalogOverrideFields {
896
- /** Item name. */
897
- productName?: ProductName;
898
- /**
899
- * Item price **after** discounts.
900
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
901
- */
902
- price?: string | null;
903
- /**
904
- * Item price **before** discounts.
905
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
906
- */
907
- fullPrice?: string | null;
908
- /**
909
- * Item description lines. Used when displaying the line item to customers.
910
- * @maxSize 20
911
- */
912
- descriptionLines?: DescriptionLine[];
913
- /** Physical properties of the item. */
914
- physicalProperties?: PhysicalProperties;
915
- /** Item image. */
916
- image?: string;
917
- /** Payment method selected for the item. */
918
- paymentOption?: PaymentOption;
919
- /**
920
- * Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.
921
- * @format DECIMAL_VALUE
922
- * @decimalValue options { gt:0, lte:999999999, maxScale:3 }
923
- */
924
- depositAmount?: string | null;
925
- /**
926
- * Whether to save the payment method on the order.
927
- *
928
- * Default: `false`
929
- */
930
- savePaymentMethod?: boolean | null;
931
- }
932
- export interface PaymentOption {
933
- /**
934
- * Type of selected payment option for current item.
935
- *
936
- * Default: `FULL_PAYMENT_ONLINE`
937
- */
938
- value?: PaymentOptionTypeWithLiterals;
939
- }
940
- export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
941
- /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
942
- addressType?: TaxableAddressTypeWithLiterals;
943
- }
944
- /** @oneof */
945
- export interface TaxableAddressTaxableAddressDataOneOf {
946
- /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
947
- addressType?: TaxableAddressTypeWithLiterals;
948
- }
949
- export declare enum TaxableAddressType {
950
- UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
951
- BUSINESS = "BUSINESS",
952
- BILLING = "BILLING",
953
- SHIPPING = "SHIPPING"
954
- }
955
- /** @enumType */
956
- export type TaxableAddressTypeWithLiterals = TaxableAddressType | 'UNKNOWN_TAXABLE_ADDRESS' | 'BUSINESS' | 'BILLING' | 'SHIPPING';
957
- export interface ExtendedFields {
958
- /**
959
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
960
- * The value of each key is structured according to the schema defined when the extended fields were configured.
961
- *
962
- * You can only access fields for which you have the appropriate permissions.
963
- *
964
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
965
- */
966
- namespaces?: Record<string, Record<string, any>>;
967
- }
968
- export interface Policy {
969
- /**
970
- * Policy title - should be translated
971
- * @minLength 1
972
- * @maxLength 29
973
- */
974
- title?: string | null;
975
- /**
976
- * Policy content - should be translated
977
- * @minLength 1
978
- * @maxLength 3000
979
- */
980
- content?: string;
981
- }
982
- export interface ModifierGroup {
983
- /**
984
- * Modifier group id.
985
- * @minLength 1
986
- * @maxLength 36
987
- */
988
- _id?: string;
989
- /** Modifier group name. */
990
- name?: TranslatableString;
991
- /**
992
- * List of modifiers in this group.
993
- * @minSize 1
994
- * @maxSize 25
995
- */
996
- modifiers?: ItemModifier[];
997
- }
998
- export interface TranslatableString {
999
- /**
1000
- * __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
1001
- *
1002
- * Min: 1 character.
1003
- * Max: 200 characters.
1004
- * @minLength 1
1005
- * @maxLength 200
1006
- */
1007
- original?: string;
1008
- /**
1009
- * String translated into the buyer's language.
1010
- *
1011
- * Min: 1 character.
1012
- * Max: 400 characters.
1013
- * Default: Same as `original`.
1014
- * @minLength 1
1015
- * @maxLength 400
1016
- */
1017
- translated?: string | null;
1018
- }
1019
- export interface ItemModifier {
1020
- /**
1021
- * Modifier ID.
1022
- * @minLength 1
1023
- * @maxLength 36
1024
- */
1025
- _id?: string;
1026
- /**
1027
- * The quantity of this modifier.
1028
- * @min 1
1029
- * @max 100000
1030
- */
1031
- quantity?: number | null;
1032
- /** Primary display label for the modifier. */
1033
- label?: TranslatableString;
1034
- /** Optional additional details or clarification for the modifier. */
1035
- details?: TranslatableString;
1036
- /** The price of the modifier. */
1037
- price?: MultiCurrencyPrice;
1038
- }
1039
- /** Billing Info and shipping details */
1040
- export interface AddressWithContact {
1041
- /** Address. */
1042
- address?: ApiAddress;
1043
- /** Contact details. */
1044
- contactDetails?: FullAddressContactDetails;
1045
- }
1046
- /** Physical address */
1047
- export interface ApiAddress {
1048
- /**
1049
- * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
1050
- * @format COUNTRY
1051
- */
1052
- country?: string | null;
1053
- /**
1054
- * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
1055
- * @maxLength 50
1056
- */
1057
- subdivision?: string | null;
1058
- /**
1059
- * City name.
1060
- * @maxLength 50
1061
- */
1062
- city?: string | null;
1063
- /**
1064
- * Postal or zip code.
1065
- * @maxLength 50
1066
- */
1067
- postalCode?: string | null;
1068
- /** Street address. */
1069
- streetAddress?: StreetAddress;
1070
- /**
1071
- * Main address line (usually street name and number).
1072
- * @maxLength 150
1073
- */
1074
- addressLine1?: string | null;
1075
- /**
1076
- * Free text providing more detailed address info. Usually contains apt, suite, floor.
1077
- * @maxLength 100
1078
- */
1079
- addressLine2?: string | null;
1080
- /**
1081
- * Country's full name.
1082
- * @readonly
1083
- */
1084
- countryFullname?: string | null;
1085
- /**
1086
- * Subdivision full-name.
1087
- * @readonly
1088
- */
1089
- subdivisionFullname?: string | null;
1090
- }
1091
- export interface StreetAddress {
1092
- /** Street number. */
1093
- number?: string;
1094
- /** Street name. */
1095
- name?: string;
1096
- }
1097
- export interface AddressLocation {
1098
- /** Address latitude. */
1099
- latitude?: number | null;
1100
- /** Address longitude. */
1101
- longitude?: number | null;
1102
- }
1103
- /** Full contact details for an address */
1104
- export interface FullAddressContactDetails {
1105
- /**
1106
- * First name.
1107
- * @maxLength 100
1108
- */
1109
- firstName?: string | null;
1110
- /**
1111
- * Last name.
1112
- * @maxLength 100
1113
- */
1114
- lastName?: string | null;
1115
- /**
1116
- * Phone number.
1117
- * @format PHONE
1118
- */
1119
- phone?: string | null;
1120
- /**
1121
- * Company name.
1122
- * @maxLength 1000
1123
- */
1124
- company?: string | null;
1125
- /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
1126
- vatId?: CommonVatId;
1127
- }
1128
- export interface CommonVatId {
1129
- /** Customer's tax ID. */
1130
- _id?: string;
1131
- /**
1132
- * Tax type.
1133
- *
1134
- * Supported values:
1135
- * + `CPF`: for individual tax payers
1136
- * + `CNPJ`: for corporations
1137
- */
1138
- type?: CommonVatTypeWithLiterals;
1139
- }
1140
- /** tax info types */
1141
- export declare enum CommonVatType {
1142
- UNSPECIFIED = "UNSPECIFIED",
1143
- /** CPF - for individual tax payers. */
1144
- CPF = "CPF",
1145
- /** CNPJ - for corporations */
1146
- CNPJ = "CNPJ"
1147
- }
1148
- /** @enumType */
1149
- export type CommonVatTypeWithLiterals = CommonVatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';
1150
- export interface ShippingInfo {
1151
- /** Shipping address and contact details. */
1152
- shippingDestination?: AddressWithContact;
1153
- /** Selected option out of the options allowed for the `region`. */
1154
- selectedCarrierServiceOption?: SelectedCarrierServiceOption;
1155
- /**
1156
- * Shipping region. Based on the address provided.
1157
- * @readonly
1158
- */
1159
- region?: ShippingRegion;
1160
- /**
1161
- * All carrier options for this shipping rule.
1162
- * @readonly
1163
- */
1164
- carrierServiceOptions?: CarrierServiceOption[];
1165
- }
1166
- export interface SelectedCarrierServiceOption {
1167
- /**
1168
- * Unique identifier of selected option. For example, "usps_std_overnight".
1169
- * @maxLength 100
1170
- */
1171
- code?: string;
1172
- /**
1173
- * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1174
- * For example, "Standard" or "First-Class Package International".
1175
- * @maxLength 250
1176
- * @readonly
1177
- */
1178
- title?: string;
1179
- /**
1180
- * Delivery logistics.
1181
- * @readonly
1182
- */
1183
- logistics?: DeliveryLogistics;
1184
- /**
1185
- * Shipping costs.
1186
- * @readonly
1187
- */
1188
- cost?: SelectedCarrierServiceOptionPrices;
1189
- /**
1190
- * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)
1191
- * @readonly
1192
- */
1193
- requestedShippingOption?: boolean;
1194
- /**
1195
- * Other charges
1196
- * @deprecated Other charges
1197
- * @replacedBy additional_fees
1198
- * @targetRemovalDate 2025-10-01
1199
- */
1200
- otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
1201
- /**
1202
- * This carrier's unique ID
1203
- * @format GUID
1204
- */
1205
- carrierId?: string | null;
1206
- /**
1207
- * Delivery solution allocations to different delivery carriers and delivery regions
1208
- * @maxSize 300
1209
- */
1210
- deliveryAllocations?: DeliveryAllocation[];
1211
- /** If the delivery solution is a partial and doesn't apply to all items. */
1212
- partial?: boolean | null;
1213
- }
1214
- export interface DeliveryLogistics {
1215
- /**
1216
- * Expected delivery time, in free text. For example, "3-5 business days".
1217
- * @maxLength 500
1218
- */
1219
- deliveryTime?: string | null;
1220
- /**
1221
- * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot".
1222
- * @maxLength 1000
1223
- */
1224
- instructions?: string | null;
1225
- /** Pickup details. */
1226
- pickupDetails?: PickupDetails;
1227
- }
1228
- export interface PickupDetails {
1229
- /** Pickup address. */
1230
- address?: ApiAddress;
1231
- /**
1232
- * Whether the pickup address is that of a business - this may effect tax calculation.
1233
- * @deprecated
1234
- */
1235
- businessLocation?: boolean;
1236
- /** Pickup method */
1237
- pickupMethod?: PickupMethodWithLiterals;
1238
- }
1239
- export declare enum PickupMethod {
1240
- UNKNOWN_METHOD = "UNKNOWN_METHOD",
1241
- STORE_PICKUP = "STORE_PICKUP",
1242
- PICKUP_POINT = "PICKUP_POINT"
1243
- }
1244
- /** @enumType */
1245
- export type PickupMethodWithLiterals = PickupMethod | 'UNKNOWN_METHOD' | 'STORE_PICKUP' | 'PICKUP_POINT';
1246
- export interface DeliveryTimeSlot {
1247
- /** starting time of the delivery time slot */
1248
- from?: Date | null;
1249
- /** ending time of the delivery time slot */
1250
- to?: Date | null;
1251
- }
1252
- export interface SelectedCarrierServiceOptionPrices {
1253
- /** Total shipping price, after discount and after tax. */
1254
- totalPriceAfterTax?: MultiCurrencyPrice;
1255
- /** Total price of shipping after discounts (when relevant), and before tax. */
1256
- totalPriceBeforeTax?: MultiCurrencyPrice;
1257
- /** Tax details. */
1258
- taxDetails?: ItemTaxFullDetails;
1259
- /** Shipping discount before tax. */
1260
- totalDiscount?: MultiCurrencyPrice;
1261
- /** Shipping price before discount and before tax. */
1262
- price?: MultiCurrencyPrice;
1263
- }
1264
- export interface SelectedCarrierServiceOptionOtherCharge {
1265
- /** Type of additional cost. */
1266
- type?: ChargeTypeWithLiterals;
1267
- /**
1268
- * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.
1269
- * @maxLength 200
1270
- */
1271
- details?: string | null;
1272
- /** Price of added charge. */
1273
- cost?: SelectedCarrierServiceOptionPrices;
1274
- }
1275
- export declare enum ChargeType {
1276
- HANDLING_FEE = "HANDLING_FEE",
1277
- INSURANCE = "INSURANCE"
1278
- }
1279
- /** @enumType */
1280
- export type ChargeTypeWithLiterals = ChargeType | 'HANDLING_FEE' | 'INSURANCE';
1281
- export interface DeliveryAllocation {
1282
- /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
1283
- deliveryCarrier?: Carrier;
1284
- /** The delivery region that are relevant for this delivery solution. */
1285
- deliveryRegion?: Region;
1286
- /** Populated if the delivery solution is a partially supplied by this carrier. */
1287
- applicableLineItems?: ApplicableLineItems;
1288
- }
1289
- export interface Carrier {
1290
- /**
1291
- * The carrier app id
1292
- * @format GUID
1293
- */
1294
- appId?: string | null;
1295
- /**
1296
- * Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
1297
- * @maxLength 250
1298
- */
1299
- code?: string;
1300
- }
1301
- export interface Region {
1302
- /**
1303
- * The delivery region id.
1304
- * @format GUID
1305
- */
1306
- _id?: string | null;
1307
- /**
1308
- * The delivery region name.
1309
- * @maxLength 100
1310
- */
1311
- name?: string | null;
1312
- }
1313
- export interface ApplicableLineItems {
1314
- /**
1315
- * Line items that the delivery solution is for.
1316
- * @maxSize 300
1317
- * @minLength 1
1318
- * @maxLength 100
1319
- */
1320
- lineItemIds?: string[];
1321
- }
1322
- export interface ShippingRegion {
1323
- /**
1324
- * Shipping region ID.
1325
- * @format GUID
1326
- * @readonly
1327
- */
1328
- _id?: string;
1329
- /**
1330
- * Shipping region name.
1331
- * @maxLength 100
1332
- */
1333
- name?: string;
1334
- }
1335
- export interface CarrierServiceOption {
1336
- /**
1337
- * Carrier ID.
1338
- * @format GUID
1339
- */
1340
- carrierId?: string;
1341
- /** Shipping options offered by this carrier for this request. */
1342
- shippingOptions?: ShippingOption[];
1343
- }
1344
- export interface ShippingOption {
1345
- /**
1346
- * Unique code of provided shipping option like "usps_std_overnight".
1347
- * For legacy calculators this would be the UUID of the option.
1348
- * @maxLength 100
1349
- */
1350
- code?: string;
1351
- /**
1352
- * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1353
- * For example, "Standard" or "First-Class Package International".
1354
- * @maxLength 250
1355
- */
1356
- title?: string;
1357
- /** Delivery logistics. */
1358
- logistics?: DeliveryLogistics;
1359
- /** Sipping price information. */
1360
- cost?: ShippingPrice;
1361
- /**
1362
- * Delivery solution allocations to different delivery carriers and delivery regions
1363
- * @maxSize 300
1364
- */
1365
- deliveryAllocations?: DeliveryAllocation[];
1366
- /** If the delivery solution is a partial and doesn't apply to all items. */
1367
- partial?: boolean | null;
1368
- }
1369
- export interface ShippingPrice {
1370
- /** Shipping price. */
1371
- price?: MultiCurrencyPrice;
1372
- /** Other costs such as insurance, handling & packaging for fragile items, etc. */
1373
- otherCharges?: OtherCharge[];
1374
- }
1375
- export interface OtherCharge {
1376
- /** Type of additional cost. */
1377
- type?: ChargeTypeWithLiterals;
1378
- /** Price of added cost. */
1379
- price?: MultiCurrencyPrice;
1380
- /**
1381
- * Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`.
1382
- * @maxLength 250
1383
- */
1384
- details?: string | null;
1385
- }
1386
- export interface BuyerInfo extends BuyerInfoIdOneOf {
1387
- /**
1388
- * Visitor ID (if site visitor is **not** a member).
1389
- * @format GUID
1390
- * @readonly
1391
- */
1392
- visitorId?: string;
1393
- /**
1394
- * Member ID (if site visitor is a site member).
1395
- * @format GUID
1396
- * @readonly
1397
- */
1398
- memberId?: string;
1399
- /**
1400
- * Contact ID. Auto-created if one does not yet exist. For more information, see the Contacts API.
1401
- * @format GUID
1402
- * @readonly
1403
- */
1404
- contactId?: string | null;
1405
- /**
1406
- * Buyer email address.
1407
- * @format EMAIL
1408
- */
1409
- email?: string | null;
1410
- }
1411
- /** @oneof */
1412
- export interface BuyerInfoIdOneOf {
1413
- /**
1414
- * Visitor ID (if site visitor is **not** a member).
1415
- * @format GUID
1416
- * @readonly
1417
- */
1418
- visitorId?: string;
1419
- /**
1420
- * Member ID (if site visitor is a site member).
1421
- * @format GUID
1422
- * @readonly
1423
- */
1424
- memberId?: string;
1425
- }
1426
- export interface PriceSummary {
1427
- /** Subtotal of all line items, before discounts and before tax. */
1428
- subtotal?: MultiCurrencyPrice;
1429
- /** Total shipping price, before discounts and before tax. */
1430
- shipping?: MultiCurrencyPrice;
1431
- /** Total tax. */
1432
- tax?: MultiCurrencyPrice;
1433
- /** Total calculated discount value. */
1434
- discount?: MultiCurrencyPrice;
1435
- /** Total price after discounts, gift cards, and tax. */
1436
- total?: MultiCurrencyPrice;
1437
- /** Total additional fees price before tax. */
1438
- additionalFees?: MultiCurrencyPrice;
1439
- }
1440
- export interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1441
- /** General shipping calculation error. */
1442
- generalShippingCalculationError?: Details;
1443
- /** Carrier errors. */
1444
- carrierErrors?: CarrierErrors;
1445
- /** Tax calculation error. */
1446
- taxCalculationError?: Details;
1447
- /** Coupon calculation error. */
1448
- couponCalculationError?: Details;
1449
- /** Gift card calculation error. */
1450
- giftCardCalculationError?: Details;
1451
- /** Order validation errors. */
1452
- orderValidationErrors?: ApplicationError[];
1453
- /**
1454
- * Membership payment methods calculation errors
1455
- * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
1456
- */
1457
- membershipError?: Details;
1458
- /** Discount Rule calculation error. */
1459
- discountsCalculationError?: Details;
1460
- }
1461
- /** @oneof */
1462
- export interface CalculationErrorsShippingCalculationErrorOneOf {
1463
- /** General shipping calculation error. */
1464
- generalShippingCalculationError?: Details;
1465
- /** Carrier errors. */
1466
- carrierErrors?: CarrierErrors;
1467
- }
1468
- export interface Details extends DetailsKindOneOf {
1469
- applicationError?: ApplicationError;
1470
- validationError?: ValidationError;
1471
- systemError?: SystemError;
1472
- /**
1473
- * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
1474
- * @deprecated
1475
- */
1476
- tracing?: Record<string, string>;
1477
- }
1478
- /** @oneof */
1479
- export interface DetailsKindOneOf {
1480
- applicationError?: ApplicationError;
1481
- validationError?: ValidationError;
1482
- systemError?: SystemError;
1483
- }
1484
- export interface ApplicationError {
1485
- /** Error code. */
1486
- code?: string;
1487
- /** Description of the error. */
1488
- description?: string;
1489
- /** Data related to the error. */
1490
- data?: Record<string, any> | null;
1491
- }
1492
- /**
1493
- * example result:
1494
- * {
1495
- * "fieldViolations": [
1496
- * {
1497
- * "field": "fieldA",
1498
- * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
1499
- * "violatedRule": "OTHER",
1500
- * "ruleName": "INVALID_NOTE",
1501
- * "data": {
1502
- * "value": "FI"
1503
- * }
1504
- * },
1505
- * {
1506
- * "field": "fieldB",
1507
- * "description": "field value out of range. supported range: [0-20]",
1508
- * "violatedRule": "MAX",
1509
- * "data": {
1510
- * "threshold": 20
1511
- * }
1512
- * },
1513
- * {
1514
- * "field": "fieldC",
1515
- * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
1516
- * "violatedRule": "FORMAT",
1517
- * "data": {
1518
- * "type": "PHONE"
1519
- * }
1520
- * }
1521
- * ]
1522
- * }
1523
- */
1524
- export interface ValidationError {
1525
- fieldViolations?: FieldViolation[];
1526
- }
1527
- export declare enum RuleType {
1528
- VALIDATION = "VALIDATION",
1529
- OTHER = "OTHER",
1530
- MAX = "MAX",
1531
- MIN = "MIN",
1532
- MAX_LENGTH = "MAX_LENGTH",
1533
- MIN_LENGTH = "MIN_LENGTH",
1534
- MAX_SIZE = "MAX_SIZE",
1535
- MIN_SIZE = "MIN_SIZE",
1536
- FORMAT = "FORMAT",
1537
- DECIMAL_LTE = "DECIMAL_LTE",
1538
- DECIMAL_GTE = "DECIMAL_GTE",
1539
- DECIMAL_LT = "DECIMAL_LT",
1540
- DECIMAL_GT = "DECIMAL_GT",
1541
- DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
1542
- INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
1543
- REQUIRED_FIELD = "REQUIRED_FIELD",
1544
- FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
1545
- ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
1546
- EXACT_LENGTH = "EXACT_LENGTH",
1547
- EXACT_SIZE = "EXACT_SIZE",
1548
- REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
1549
- }
1550
- /** @enumType */
1551
- export type RuleTypeWithLiterals = RuleType | 'VALIDATION' | 'OTHER' | 'MAX' | 'MIN' | 'MAX_LENGTH' | 'MIN_LENGTH' | 'MAX_SIZE' | 'MIN_SIZE' | 'FORMAT' | 'DECIMAL_LTE' | 'DECIMAL_GTE' | 'DECIMAL_LT' | 'DECIMAL_GT' | 'DECIMAL_MAX_SCALE' | 'INVALID_ENUM_VALUE' | 'REQUIRED_FIELD' | 'FIELD_NOT_ALLOWED' | 'ONE_OF_ALIGNMENT' | 'EXACT_LENGTH' | 'EXACT_SIZE' | 'REQUIRED_ONE_OF_FIELD';
1552
- export interface FieldViolation {
1553
- field?: string;
1554
- description?: string;
1555
- violatedRule?: RuleTypeWithLiterals;
1556
- /** applicable when violated_rule=OTHER */
1557
- ruleName?: string | null;
1558
- data?: Record<string, any> | null;
1559
- }
1560
- export interface SystemError {
1561
- /** Error code. */
1562
- errorCode?: string | null;
1563
- }
1564
- export interface CarrierErrors {
1565
- /** Carrier errors. */
1566
- errors?: CarrierError[];
1567
- }
1568
- export interface CarrierError {
1569
- /** Carrier ID. */
1570
- carrierId?: string;
1571
- /** Error details. */
1572
- error?: Details;
1573
- }
1574
- export interface GiftCard {
1575
- /**
1576
- * Gift Card ID.
1577
- * @deprecated
1578
- */
1579
- _id?: string;
1580
- /** Gift card obfuscated code. */
1581
- obfuscatedCode?: string;
1582
- /** Gift card value. */
1583
- amount?: MultiCurrencyPrice;
1584
- /**
1585
- * App ID of the gift card provider.
1586
- * @format GUID
1587
- */
1588
- appId?: string;
1589
- /**
1590
- * External ID in the gift card provider's system.
1591
- * Used for integration and tracking across different platforms.
1592
- * @minLength 1
1593
- * @maxLength 50
1594
- */
1595
- externalId?: string | null;
1596
- }
1597
- export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1598
- /** Coupon details. */
1599
- coupon?: Coupon;
1600
- /** Merchant discount. */
1601
- merchantDiscount?: MerchantDiscount;
1602
- /** Discount rule */
1603
- discountRule?: DiscountRule;
1604
- /** Discount type. */
1605
- discountType?: DiscountTypeWithLiterals;
1606
- /**
1607
- * IDs of line items the discount applies to.
1608
- * @format GUID
1609
- * @deprecated IDs of line items the discount applies to.
1610
- * @replacedBy line_items_discounts
1611
- * @targetRemovalDate 2024-06-01
1612
- */
1613
- lineItemIds?: string[];
1614
- /**
1615
- * Number of subscription cycle this discount applies to
1616
- * default None - all billing cycle
1617
- * @internal
1618
- * @min 1
1619
- * @max 999
1620
- */
1621
- subscriptionCycles?: number | null;
1622
- }
1623
- /** @oneof */
1624
- export interface AppliedDiscountDiscountSourceOneOf {
1625
- /** Coupon details. */
1626
- coupon?: Coupon;
1627
- /** Merchant discount. */
1628
- merchantDiscount?: MerchantDiscount;
1629
- /** Discount rule */
1630
- discountRule?: DiscountRule;
1631
- }
1632
- export declare enum DiscountType {
1633
- GLOBAL = "GLOBAL",
1634
- SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
1635
- SHIPPING = "SHIPPING"
1636
- }
1637
- /** @enumType */
1638
- export type DiscountTypeWithLiterals = DiscountType | 'GLOBAL' | 'SPECIFIC_ITEMS' | 'SHIPPING';
1639
- /** Coupon */
1640
- export interface Coupon {
1641
- /** Coupon ID. */
1642
- _id?: string;
1643
- /** Coupon code. */
1644
- code?: string;
1645
- /** Coupon value. */
1646
- amount?: MultiCurrencyPrice;
1647
- /** Coupon name. */
1648
- name?: string;
1649
- }
1650
- export interface MerchantDiscount {
1651
- /** Discount value. */
1652
- amount?: MultiCurrencyPrice;
1653
- /**
1654
- * Discount Percentage. Will be calculated from items price before other discounts.
1655
- * @min 1
1656
- * @max 100
1657
- */
1658
- percentage?: number | null;
1659
- }
1660
- export interface DiscountRule {
1661
- /**
1662
- * Discount rule ID
1663
- * @format GUID
1664
- */
1665
- _id?: string;
1666
- /** Discount rule name */
1667
- name?: DiscountRuleName;
1668
- /** Discount value. */
1669
- amount?: MultiCurrencyPrice;
1670
- }
1671
- export interface DiscountRuleName {
1672
- /**
1673
- * Original discount rule name (in site's default language).
1674
- * @minLength 1
1675
- * @maxLength 256
1676
- */
1677
- original?: string;
1678
- /**
1679
- * Translated discount rule name according to buyer language. Defaults to `original` when not provided.
1680
- * @minLength 1
1681
- * @maxLength 500
1682
- */
1683
- translated?: string | null;
1684
- }
1685
- export interface LineItemDiscount {
1686
- /**
1687
- * ID of line item the discount applies to.
1688
- * @format GUID
1689
- */
1690
- _id?: string;
1691
- /** Discount value. */
1692
- totalDiscountAmount?: MultiCurrencyPrice;
1693
- }
1694
- export interface CustomField {
1695
- /** Custom field value. */
1696
- value?: any;
1697
- /**
1698
- * Custom field title.
1699
- * @minLength 1
1700
- * @maxLength 500
1701
- */
1702
- title?: string;
1703
- /**
1704
- * Translated custom field title.
1705
- * @minLength 1
1706
- * @maxLength 500
1707
- */
1708
- translatedTitle?: string | null;
1709
- }
1710
- export declare enum WeightUnit {
1711
- /** Weight unit can't be classified due to an error. */
1712
- UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
1713
- /** Kilograms. */
1714
- KG = "KG",
1715
- /** Pounds. */
1716
- LB = "LB"
1717
- }
1718
- /** @enumType */
1719
- export type WeightUnitWithLiterals = WeightUnit | 'UNSPECIFIED_WEIGHT_UNIT' | 'KG' | 'LB';
1720
- export interface TaxSummary {
1721
- /**
1722
- * Amount for which tax is calculated, added from line items.
1723
- * @readonly
1724
- */
1725
- taxableAmount?: MultiCurrencyPrice;
1726
- /**
1727
- * Calculated tax, added from line items.
1728
- * @readonly
1729
- */
1730
- totalTax?: MultiCurrencyPrice;
1731
- /**
1732
- * Tax calculator that was active when the order was created.
1733
- * @deprecated
1734
- */
1735
- calculationDetails?: TaxCalculationDetails;
1736
- }
1737
- export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
1738
- /** Reason the manual calculation was used. */
1739
- manualRateReason?: ManualCalculationReasonWithLiterals;
1740
- /** Details of the fallback rate calculation. */
1741
- autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1742
- /** Rate calculation type. */
1743
- rateType?: RateTypeWithLiterals;
1744
- }
1745
- /** @oneof */
1746
- export interface TaxCalculationDetailsCalculationDetailsOneOf {
1747
- /** Reason the manual calculation was used. */
1748
- manualRateReason?: ManualCalculationReasonWithLiterals;
1749
- /** Details of the fallback rate calculation. */
1750
- autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1751
- }
1752
- export declare enum RateType {
1753
- /** no tax being collected for this request due to location of purchase */
1754
- NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
1755
- /** manual rate used for calculation */
1756
- MANUAL_RATE = "MANUAL_RATE",
1757
- /** autotax rate used for calculation */
1758
- AUTO_RATE = "AUTO_RATE",
1759
- /** fallback rate used for calculation */
1760
- FALLBACK_RATE = "FALLBACK_RATE"
1761
- }
1762
- /** @enumType */
1763
- export type RateTypeWithLiterals = RateType | 'NO_TAX_COLLECTED' | 'MANUAL_RATE' | 'AUTO_RATE' | 'FALLBACK_RATE';
1764
- export declare enum ManualCalculationReason {
1765
- /** user set calculator in Business Manager to be Manual */
1766
- GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
1767
- /** specific region is on manual even though Global setting is Auto-tax */
1768
- REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
1769
- }
1770
- /** @enumType */
1771
- export type ManualCalculationReasonWithLiterals = ManualCalculationReason | 'GLOBAL_SETTING_TO_MANUAL' | 'REGION_SETTING_TO_MANUAL';
1772
- export interface AutoTaxFallbackCalculationDetails {
1773
- /** reason for fallback */
1774
- fallbackReason?: FallbackReasonWithLiterals;
1775
- /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
1776
- error?: ApplicationError;
1777
- }
1778
- export declare enum FallbackReason {
1779
- /** auto-tax failed to be calculated */
1780
- AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
1781
- /** auto-tax was temporarily deactivated on a system-level */
1782
- AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
1783
- }
1784
- /** @enumType */
1785
- export type FallbackReasonWithLiterals = FallbackReason | 'AUTO_TAX_FAILED' | 'AUTO_TAX_DEACTIVATED';
1786
- /**
1787
- * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate.
1788
- * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
1789
- */
1790
- export interface AggregatedTaxBreakdown {
1791
- /**
1792
- * The name of the tax against which this tax amount was calculated.
1793
- * @maxLength 200
1794
- */
1795
- taxName?: string;
1796
- /**
1797
- * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
1798
- * @maxLength 200
1799
- */
1800
- taxType?: string;
1801
- /**
1802
- * The name of the jurisdiction in which this tax detail applies.
1803
- * @maxLength 200
1804
- */
1805
- jurisdiction?: string;
1806
- /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
1807
- jurisdictionTypeEnum?: JurisdictionTypeWithLiterals;
1808
- /**
1809
- * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value)
1810
- * @decimalValue options { gte:0, maxScale:6 }
1811
- */
1812
- rate?: string;
1813
- /** The sum of all the tax from line items that calculated by the tax identifiers. */
1814
- aggregatedTaxAmount?: MultiCurrencyPrice;
1815
- }
1816
- export declare enum ChannelType {
1817
- /** Unspecified sales channel. This value is not supported. */
1818
- UNSPECIFIED = "UNSPECIFIED",
1819
- /** A web client. */
1820
- WEB = "WEB",
1821
- /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
1822
- POS = "POS",
1823
- /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
1824
- EBAY = "EBAY",
1825
- /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
1826
- AMAZON = "AMAZON",
1827
- /** Other sales platform. */
1828
- OTHER_PLATFORM = "OTHER_PLATFORM",
1829
- /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
1830
- WIX_APP_STORE = "WIX_APP_STORE",
1831
- /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */
1832
- WIX_INVOICES = "WIX_INVOICES",
1833
- /** Wix merchant backoffice. */
1834
- BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
1835
- /** Wish sales channel. */
1836
- WISH = "WISH",
1837
- /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
1838
- CLASS_PASS = "CLASS_PASS",
1839
- /** Global-E sales channel. */
1840
- GLOBAL_E = "GLOBAL_E",
1841
- /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
1842
- FACEBOOK = "FACEBOOK",
1843
- /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
1844
- ETSY = "ETSY",
1845
- /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
1846
- TIKTOK = "TIKTOK",
1847
- /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
1848
- FAIRE_COM = "FAIRE_COM"
1849
- }
1850
- /** @enumType */
1851
- export type ChannelTypeWithLiterals = ChannelType | 'UNSPECIFIED' | 'WEB' | 'POS' | 'EBAY' | 'AMAZON' | 'OTHER_PLATFORM' | 'WIX_APP_STORE' | 'WIX_INVOICES' | 'BACKOFFICE_MERCHANT' | 'WISH' | 'CLASS_PASS' | 'GLOBAL_E' | 'FACEBOOK' | 'ETSY' | 'TIKTOK' | 'FAIRE_COM';
1852
- export interface CreatedBy extends CreatedByIdOneOf {
1853
- /**
1854
- * User ID. When the order was created by a Wix user on behalf of a buyer.
1855
- * For example, via POS (point of service).
1856
- * @format GUID
1857
- */
1858
- userId?: string;
1859
- /**
1860
- * Member ID. When the order was created by a **logged in** site visitor.
1861
- * @format GUID
1862
- */
1863
- memberId?: string;
1864
- /**
1865
- * Visitor ID. When the order was created by a site visitor that was **not** logged in.
1866
- * @format GUID
1867
- */
1868
- visitorId?: string;
1869
- /**
1870
- * App ID. When the order was created by an external application or Wix service.
1871
- * @format GUID
1872
- */
1873
- appId?: string;
1874
- }
1875
- /** @oneof */
1876
- export interface CreatedByIdOneOf {
1877
- /**
1878
- * User ID. When the order was created by a Wix user on behalf of a buyer.
1879
- * For example, via POS (point of service).
1880
- * @format GUID
1881
- */
1882
- userId?: string;
1883
- /**
1884
- * Member ID. When the order was created by a **logged in** site visitor.
1885
- * @format GUID
1886
- */
1887
- memberId?: string;
1888
- /**
1889
- * Visitor ID. When the order was created by a site visitor that was **not** logged in.
1890
- * @format GUID
1891
- */
1892
- visitorId?: string;
1893
- /**
1894
- * App ID. When the order was created by an external application or Wix service.
1895
- * @format GUID
1896
- */
1897
- appId?: string;
1898
- }
1899
- /** Reserved for internal use. */
1900
- export interface MembershipOptions {
1901
- /**
1902
- * Reserved for internal use.
1903
- * @readonly
1904
- * @maxSize 300
1905
- */
1906
- eligibleMemberships?: Membership[];
1907
- /**
1908
- * Reserved for internal use.
1909
- * @readonly
1910
- * @maxSize 300
1911
- */
1912
- invalidMemberships?: InvalidMembership[];
1913
- /** Selected membership to apply to this checkout. */
1914
- selectedMemberships?: SelectedMemberships;
1915
- }
1916
- export interface Membership {
1917
- /**
1918
- * Membership ID.
1919
- * @minLength 1
1920
- * @maxLength 100
1921
- */
1922
- _id?: string;
1923
- /**
1924
- * ID of the application providing this payment option.
1925
- * @format GUID
1926
- */
1927
- appId?: string;
1928
- /** The name of this membership. */
1929
- name?: MembershipName;
1930
- /**
1931
- * Line item IDs which are "paid" for by this membership.
1932
- * @minSize 1
1933
- * @maxSize 300
1934
- * @minLength 1
1935
- * @maxLength 100
1936
- */
1937
- lineItemIds?: string[];
1938
- /** Optional - For a membership that has limited credits, information about credit usage. */
1939
- credits?: MembershipPaymentCredits;
1940
- /** Optional - TMembership expiry date. */
1941
- expirationDate?: Date | null;
1942
- /** Additional data about this membership. */
1943
- additionalData?: Record<string, any> | null;
1944
- }
1945
- export interface MembershipName {
1946
- /**
1947
- * Membership name.
1948
- * @maxLength 100
1949
- */
1950
- original?: string;
1951
- /**
1952
- * Translated membership name. Defaults to `original` when not provided.
1953
- * @maxLength 100
1954
- */
1955
- translated?: string | null;
1956
- }
1957
- export interface MembershipPaymentCredits {
1958
- /**
1959
- * Membership's total amount of credits.
1960
- * @min 1
1961
- */
1962
- total?: number;
1963
- /** Membership's remaining amount of credits. */
1964
- remaining?: number;
1965
- }
1966
- export interface InvalidMembership {
1967
- /** Membership details. */
1968
- membership?: Membership;
1969
- /**
1970
- * Reason why this membership is invalid and cannot be used.
1971
- * @minLength 1
1972
- * @maxLength 100
1973
- */
1974
- reason?: string;
1975
- }
1976
- export interface SelectedMemberships {
1977
- /**
1978
- * Selected memberships.
1979
- * @maxSize 300
1980
- */
1981
- memberships?: SelectedMembership[];
1982
- }
1983
- export interface SelectedMembership {
1984
- /**
1985
- * Membership ID.
1986
- * @minLength 1
1987
- * @maxLength 100
1988
- */
1989
- _id?: string;
1990
- /**
1991
- * ID of the app providing this payment option.
1992
- * @format GUID
1993
- */
1994
- appId?: string;
1995
- /**
1996
- * IDs of the line items this membership applies to.
1997
- * @minSize 1
1998
- * @maxSize 300
1999
- * @minLength 1
2000
- * @maxLength 100
2001
- */
2002
- lineItemIds?: string[];
2003
- }
2004
- export interface AdditionalFee {
2005
- /**
2006
- * Additional fee's unique code (or ID) for future processing.
2007
- * @minLength 1
2008
- * @maxLength 100
2009
- */
2010
- code?: string | null;
2011
- /**
2012
- * Translated additional fee's name.
2013
- * @minLength 1
2014
- * @maxLength 50
2015
- */
2016
- name?: string;
2017
- /** Additional fee's price. */
2018
- price?: MultiCurrencyPrice;
2019
- /** Tax details. */
2020
- taxDetails?: ItemTaxFullDetails;
2021
- /**
2022
- * Provider's app id.
2023
- * @minLength 1
2024
- * @maxLength 100
2025
- */
2026
- providerAppId?: string | null;
2027
- /** Additional fee's price before tax. */
2028
- priceBeforeTax?: MultiCurrencyPrice;
2029
- /** Additional fee's price after tax. */
2030
- priceAfterTax?: MultiCurrencyPrice;
2031
- /**
2032
- * Optional - Line items associated with this additional fee.
2033
- * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
2034
- * @format GUID
2035
- */
2036
- lineItemIds?: string[];
2037
- /**
2038
- * Number of subscription cycle this fee applies to
2039
- * default None - all billing cycle
2040
- * @internal
2041
- * @min 1
2042
- * @max 999
2043
- */
2044
- subscriptionCycles?: number | null;
2045
- /** the source the additional fee was added from */
2046
- source?: AdditionalFeeSourceWithLiterals;
2047
- }
2048
- export declare enum AdditionalFeeSource {
2049
- UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
2050
- /** The additional fee was added by an additional fee service plugin */
2051
- SERVICE_PLUGIN = "SERVICE_PLUGIN",
2052
- /** The additional fee was added on the item either via the catalog or on custom line item */
2053
- ITEM = "ITEM",
2054
- /** The additional fee was added manually on the request */
2055
- MANUAL = "MANUAL",
2056
- /** The additional fee was added by the shipping provider */
2057
- SHIPPING = "SHIPPING"
2058
- }
2059
- /** @enumType */
2060
- export type AdditionalFeeSourceWithLiterals = AdditionalFeeSource | 'UNKNOWN_ADDITIONAL_FEE_SOURCE' | 'SERVICE_PLUGIN' | 'ITEM' | 'MANUAL' | 'SHIPPING';
2061
- export interface ConversionInfo {
2062
- /**
2063
- * The site currency.
2064
- * @readonly
2065
- * @format CURRENCY
2066
- */
2067
- siteCurrency?: string;
2068
- /**
2069
- * The rate used when converting from the site currency to the checkout currency.
2070
- * @readonly
2071
- * @decimalValue options { gt:0, lte:1000000000000000 }
2072
- */
2073
- conversionRate?: string;
2074
- }
2075
- export interface Violation {
2076
- /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */
2077
- severity?: SeverityWithLiterals;
2078
- /** Target location on a checkout or cart page where the violation will be displayed. */
2079
- target?: Target;
2080
- /**
2081
- * Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href="https://www.wix.com">Click me</a>`.
2082
- * @minLength 1
2083
- * @maxLength 1000
2084
- */
2085
- description?: string | null;
2086
- }
2087
- export declare enum Severity {
2088
- /** The user is allowed to move forward in the flow. */
2089
- WARNING = "WARNING",
2090
- /**
2091
- * The user is blocked from moving forward in the flow.
2092
- * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.
2093
- */
2094
- ERROR = "ERROR"
2095
- }
2096
- /** @enumType */
2097
- export type SeverityWithLiterals = Severity | 'WARNING' | 'ERROR';
2098
- export interface Target extends TargetTargetTypeOneOf {
2099
- /** General (other) violation. */
2100
- other?: Other;
2101
- /** Specific line item violation. */
2102
- lineItem?: TargetLineItem;
2103
- }
2104
- /** @oneof */
2105
- export interface TargetTargetTypeOneOf {
2106
- /** General (other) violation. */
2107
- other?: Other;
2108
- /** Specific line item violation. */
2109
- lineItem?: TargetLineItem;
2110
- }
2111
- /** Available locations on the webpage */
2112
- export declare enum NameInOther {
2113
- /** Default location, in case no specific location is specified. */
2114
- OTHER_DEFAULT = "OTHER_DEFAULT"
2115
- }
2116
- /** @enumType */
2117
- export type NameInOtherWithLiterals = NameInOther | 'OTHER_DEFAULT';
2118
- /** Available locations on the line item */
2119
- export declare enum NameInLineItem {
2120
- /** Default location, in case no specific location is specified. */
2121
- LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
2122
- }
2123
- /** @enumType */
2124
- export type NameInLineItemWithLiterals = NameInLineItem | 'LINE_ITEM_DEFAULT';
2125
- export declare enum SuggestedFix {
2126
- /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
2127
- UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
2128
- /** The line item should be removed from the cart or checkout to resolve the violation. */
2129
- REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
2130
- }
2131
- /** @enumType */
2132
- export type SuggestedFixWithLiterals = SuggestedFix | 'UNKNOWN_SUGGESTED_FIX' | 'REMOVE_LINE_ITEM';
2133
- /** General (other) violation. */
2134
- export interface Other {
2135
- /** Location on a checkout or a cart page where a general (other) violation will be displayed. */
2136
- name?: NameInOtherWithLiterals;
2137
- }
2138
- /** Specific line item violation. */
2139
- export interface TargetLineItem {
2140
- /** Location on a checkout or a cart page where the specific line item violation will be displayed. */
2141
- name?: NameInLineItemWithLiterals;
2142
- /** ID of the line item containing the violation. */
2143
- _id?: string | null;
2144
- /**
2145
- * Suggested fix for resolving the line item violation.
2146
- * @internal
2147
- */
2148
- suggestedFix?: SuggestedFixWithLiterals;
2149
- }
2150
- export interface CustomSettings {
2151
- /**
2152
- * Whether to restrict the option to add or remove a gift card on the checkout page.
2153
- *
2154
- * Default: `false`
2155
- */
2156
- lockGiftCard?: boolean;
2157
- /**
2158
- * Whether to restrict the option to add or remove a coupon code on the checkout page.
2159
- *
2160
- * Default: `false`
2161
- */
2162
- lockCouponCode?: boolean;
2163
- /**
2164
- * Whether to disable policy agreement checkout in the checkout page
2165
- *
2166
- * Default: `false`
2167
- */
2168
- disabledPolicyAgreementCheckbox?: boolean;
2169
- /**
2170
- * Whether to disable manual payment option for this checkout.
2171
- *
2172
- * Default: `false`
2173
- */
2174
- disabledManualPayment?: boolean;
2175
- }
2176
- export interface CustomContentReference {
2177
- /**
2178
- * ID of the app providing the content.
2179
- *
2180
- * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
2181
- * @format GUID
2182
- */
2183
- appId?: string;
2184
- /**
2185
- * ID of the component within the app it belongs to.
2186
- *
2187
- * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
2188
- * @format GUID
2189
- */
2190
- componentId?: string;
2191
- }
2192
- export interface ExternalReference {
2193
- /**
2194
- * ID of the app associated with the purchase flow.
2195
- * For example, the Wix Pay Links app ID.
2196
- * @format GUID
2197
- * @immutable
2198
- */
2199
- appId?: string;
2200
- /**
2201
- * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
2202
- * For example, a Wix Pay Link ID.
2203
- * @minLength 1
2204
- * @maxLength 100
2205
- * @immutable
2206
- */
2207
- resourceId?: string | null;
2208
- }
2209
- export interface SubscriptionCharges {
2210
- /**
2211
- * ids of the items the subscription is defined on
2212
- * @format GUID
2213
- * @minSize 1
2214
- * @maxSize 300
2215
- */
2216
- lineItemIds?: string[];
2217
- /**
2218
- * Generated description explaining future charges amount and schedule.
2219
- * Translated to subscription order buyer language, or to site language if was not provided.
2220
- * @maxLength 1000
2221
- */
2222
- description?: string | null;
2223
- /**
2224
- * Charges for subscription.
2225
- * @maxSize 50
2226
- */
2227
- charges?: Charge[];
2228
- }
2229
- export interface Charge {
2230
- /** The cycle number from which the charge starts. */
2231
- cycleFrom?: number;
2232
- /** The number of cycles for which the charge is applicable. */
2233
- cycleCount?: number | null;
2234
- /** Charge summary. */
2235
- priceSummary?: PriceSummary;
2236
- /** The billing date from which the charge starts. */
2237
- cycleBillingDate?: Date | null;
2238
- }
2239
- export interface UpdatedCheckoutMessage {
2240
- /** Previous checkout. */
2241
- oldCheckout?: Checkout;
2242
- /** Updated checkout. */
2243
- updatedCheckout?: Checkout;
2244
- }
2245
- export interface CreateCheckoutRequest {
2246
- /** Checkout information. */
2247
- checkoutInfo?: Checkout;
2248
- /** Coupon code. */
2249
- couponCode?: string | null;
2250
- /**
2251
- * Catalog line items to add to the checkout.
2252
- * @maxSize 300
2253
- */
2254
- lineItems?: LineItem[];
2255
- /**
2256
- * Custom line items to add to the checkout. Custom line items don't trigger the Catalog service plugin.
2257
- *
2258
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2259
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2260
- * @maxSize 300
2261
- */
2262
- customLineItems?: CustomLineItem[];
2263
- /** Sales channel that submitted the order. */
2264
- channelType: ChannelTypeWithLiterals;
2265
- /**
2266
- * Gift card code.
2267
- *
2268
- * The checkout can only hold 1 `giftCardCode` at a time. If an additional `giftCardCode` is added, it will override the existing `giftCardCode`.
2269
- *
2270
- * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/setting-up-wix-gift-cards-9451439).
2271
- */
2272
- giftCardCode?: string | null;
2273
- /**
2274
- * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2275
- *
2276
- * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
2277
- * to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
2278
- * standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2279
- * @maxLength 1000
2280
- */
2281
- overrideCheckoutUrl?: string | null;
2282
- }
2283
- export interface CustomLineItem {
2284
- /**
2285
- * Custom line item quantity.
2286
- *
2287
- * Min: `1`
2288
- * Max: `100000`
2289
- * @min 1
2290
- * @max 100000
2291
- */
2292
- quantity?: number;
2293
- /**
2294
- * Custom line item price. For security reasons, the `price` field should come from backend code, and not be passed from the frontend.
2295
- * @format DECIMAL_VALUE
2296
- * @decimalValue options { gte:0, lte:1000000000000000 }
2297
- */
2298
- price?: string;
2299
- /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
2300
- priceDescription?: PriceDescription;
2301
- /**
2302
- * Custom line item description lines. Used for display purposes for the cart, checkout and order.
2303
- * @maxSize 10
2304
- */
2305
- descriptionLines?: DescriptionLine[];
2306
- /**
2307
- * Custom line item media.
2308
- * + Link to an image/video from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) - `"wix:image://v1/3c76e2_c53...4ea4~mv2.jpg#originWidth=1000&originHeight=1000"`.
2309
- * + An image from the web - `"http(s)://<image url>"`.
2310
- */
2311
- media?: string;
2312
- /**
2313
- * Custom line item ID. If passed, `id` must be unique.
2314
- *
2315
- * Default: auto-generated ID
2316
- * @format GUID
2317
- */
2318
- _id?: string | null;
2319
- /**
2320
- * Tax group ID for this custom line item.
2321
- * @format GUID
2322
- */
2323
- taxGroupId?: string | null;
2324
- /** Name of the item or product. */
2325
- productName?: ProductName;
2326
- /** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */
2327
- url?: string;
2328
- /** Item type. Either a preset type or custom. */
2329
- itemType?: ItemType;
2330
- /**
2331
- * Item price **before** catalog-defined discount. Defaults to `price` when not provided.
2332
- * @format DECIMAL_VALUE
2333
- */
2334
- fullPrice?: string | null;
2335
- /**
2336
- * Item quantity available for purchase. Only return this if inventory is managed.
2337
- * Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
2338
- * @max 100000
2339
- */
2340
- quantityAvailable?: number | null;
2341
- /** Physical properties of the item. */
2342
- physicalProperties?: PhysicalProperties;
2343
- /**
2344
- * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
2345
- *
2346
- * + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
2347
- * + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
2348
- * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
2349
- * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.
2350
- */
2351
- paymentOption?: PaymentOptionTypeWithLiterals;
2352
- /**
2353
- * Service properties. When relevant, this contains information such as date and number of participants.
2354
- * Used, among other things, when checking for valid memberships.
2355
- */
2356
- serviceProperties?: ServiceProperties;
2357
- /**
2358
- * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
2359
- *
2360
- * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
2361
- * + In most cases, this field is the same as `catalogReference.catalogItemId`.
2362
- * + Used in membership validation.
2363
- * @minLength 1
2364
- * @maxLength 36
2365
- */
2366
- rootCatalogItemId?: string | null;
2367
- /**
2368
- * Partial payment for the given item to be paid upfront during the checkout.
2369
- *
2370
- * Eligible for catalog items with type `DEPOSIT_ONLINE`.
2371
- * When omitted, the item's price will not be split and is expected to be paid in a single installment.
2372
- * @format DECIMAL_VALUE
2373
- */
2374
- depositAmount?: string | null;
2375
- /**
2376
- * Delivery profile ID.
2377
- * @format GUID
2378
- */
2379
- deliveryProfileId?: string | null;
2380
- /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
2381
- catalogReference?: CatalogReference;
2382
- /**
2383
- * Whether the price is not yet defined, and will be updated after the order is created.
2384
- *
2385
- * Default: `false`
2386
- * @internal
2387
- */
2388
- priceUndetermined?: boolean;
2389
- /**
2390
- * Whether the line item quantity is fixed and cannot be changed.
2391
- *
2392
- * Default: `false`
2393
- * @internal
2394
- */
2395
- fixedQuantity?: boolean;
2396
- /**
2397
- * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
2398
- * @minLength 1
2399
- * @maxLength 1000
2400
- * @readonly
2401
- */
2402
- consentRequiredPaymentPolicy?: string | null;
2403
- /**
2404
- * Whether to save the payment method on the order.
2405
- *
2406
- * Default: `false`
2407
- * @readonly
2408
- */
2409
- savePaymentMethod?: boolean;
2410
- /**
2411
- * Policies to be displayed to the customer on the checkout page.
2412
- * @maxSize 5
2413
- */
2414
- policies?: Policy[];
2415
- /**
2416
- * ID of the app managing the inventory.
2417
- * @internal
2418
- * @format GUID
2419
- */
2420
- inventoryAppId?: string | null;
2421
- /**
2422
- * Whether the item can only be purchased by site members.
2423
- *
2424
- * Default: `false`
2425
- */
2426
- membersOnly?: boolean;
2427
- /** Address to use for tax calculation purposes. */
2428
- taxableAddress?: TaxableAddress;
2429
- /**
2430
- * Modifier groups that were added to the item.
2431
- * @maxSize 25
2432
- */
2433
- modifierGroups?: V1ModifierGroup[];
2434
- }
2435
- export interface V1ModifierGroup {
2436
- /**
2437
- * Modifier group id.
2438
- * @minLength 1
2439
- * @maxLength 36
2440
- */
2441
- _id?: string;
2442
- /** Modifier group name. */
2443
- name?: TranslatableString;
2444
- /**
2445
- * List of modifiers in this group.
2446
- * @minSize 1
2447
- * @maxSize 25
2448
- */
2449
- modifiers?: V1ItemModifier[];
2450
- }
2451
- export interface V1ItemModifier {
2452
- /**
2453
- * Modifier ID.
2454
- * @minLength 1
2455
- * @maxLength 36
2456
- */
2457
- _id?: string;
2458
- /**
2459
- * The quantity of this modifier.
2460
- * @min 1
2461
- * @max 100000
2462
- */
2463
- quantity?: number | null;
2464
- /** Primary display label for the modifier. */
2465
- label?: TranslatableString;
2466
- /** Optional additional details or clarification for the modifier. */
2467
- details?: TranslatableString;
2468
- /**
2469
- * The price of the modifier.
2470
- * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }
2471
- */
2472
- price?: string | null;
2473
- }
2474
- export interface MerchantDiscountInput {
2475
- /**
2476
- * Discount amount.
2477
- * @decimalValue options { gte:0 }
2478
- */
2479
- amount?: string;
2480
- /**
2481
- * IDs of line items the discount applies to.
2482
- * @format GUID
2483
- * @maxSize 300
2484
- */
2485
- lineItemIds?: string[];
2486
- }
2487
- export interface CreateCheckoutResponse {
2488
- /** Newly created checkout. */
2489
- checkout?: Checkout;
2490
- }
2491
- export interface ShippingCalculationErrorData extends ShippingCalculationErrorDataShippingCalculationErrorOneOf {
2492
- generalShippingCalculationError?: Details;
2493
- carrierErrors?: CarrierErrors;
2494
- }
2495
- /** @oneof */
2496
- export interface ShippingCalculationErrorDataShippingCalculationErrorOneOf {
2497
- generalShippingCalculationError?: Details;
2498
- carrierErrors?: CarrierErrors;
2499
- }
2500
- export interface GetCheckoutRequest {
2501
- /**
2502
- * Checkout ID.
2503
- * @format GUID
2504
- */
2505
- _id: string;
2506
- }
2507
- export interface GetCheckoutResponse {
2508
- /** Retrieved checkout. */
2509
- checkout?: Checkout;
2510
- }
2511
- export interface GetCheckoutWithAllExtendedFieldsRequest {
2512
- /**
2513
- * Checkout ID.
2514
- * @format GUID
2515
- */
2516
- _id?: string;
2517
- }
2518
- export interface GetCheckoutWithAllExtendedFieldsResponse {
2519
- /** Retrieved checkout. */
2520
- checkout?: Checkout;
2521
- }
2522
- export interface GetCheckoutByCartIdRequest {
2523
- /**
2524
- * Cart ID.
2525
- * @format GUID
2526
- */
2527
- _id: string;
2528
- }
2529
- export interface GetCheckoutByCartIdResponse {
2530
- /** Retrieved checkout. */
2531
- checkout?: Checkout;
2532
- }
2533
- export interface GetWixCheckoutURLRequest {
2534
- /**
2535
- * Checkout ID.
2536
- * @format GUID
2537
- */
2538
- _id: string;
2539
- }
2540
- export interface GetWixCheckoutURLResponse {
2541
- /** Checkout URL. */
2542
- checkoutUrl?: string;
2543
- }
2544
- export interface GetCheckoutURLRequest {
2545
- /**
2546
- * Checkout ID.
2547
- * @format GUID
2548
- */
2549
- _id: string;
2550
- }
2551
- export interface GetCheckoutURLResponse {
2552
- /** Checkout URL. */
2553
- checkoutUrl?: string;
2554
- }
2555
- export interface UpdateCheckoutRequest {
2556
- /** Checkout information. */
2557
- checkout: Checkout;
2558
- /**
2559
- * Coupon code.
2560
- *
2561
- * The checkout can only hold 1 `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.
2562
- */
2563
- couponCode?: string | null;
2564
- /** Gift card code. */
2565
- giftCardCode?: string | null;
2566
- /**
2567
- * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2568
- *
2569
- * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
2570
- * to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
2571
- * standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2572
- * @maxLength 1000
2573
- */
2574
- overrideCheckoutUrl?: string | null;
2575
- /**
2576
- * Catalog line items.
2577
- * @maxSize 300
2578
- */
2579
- lineItems?: LineItem[];
2580
- /**
2581
- * Custom line items. Custom line items don't trigger the Catalog service plugin.
2582
- *
2583
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2584
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2585
- * @maxSize 300
2586
- */
2587
- customLineItems?: CustomLineItem[];
2588
- }
2589
- export interface UpdateCheckoutResponse {
2590
- /** Updated checkout. */
2591
- checkout?: Checkout;
2592
- }
2593
- export interface RemoveCouponRequest {
2594
- /**
2595
- * ID of the checkout to remove the coupon from.
2596
- * @format GUID
2597
- */
2598
- _id: string;
2599
- }
2600
- export interface RemoveCouponResponse {
2601
- /** Updated checkout after removal of coupon. */
2602
- checkout?: Checkout;
2603
- }
2604
- export interface RemoveGiftCardRequest {
2605
- /**
2606
- * ID of the checkout to remove the gift card from.
2607
- * @format GUID
2608
- */
2609
- _id: string;
2610
- }
2611
- export interface RemoveGiftCardResponse {
2612
- /** Updated checkout after removal of gift card. */
2613
- checkout?: Checkout;
2614
- }
2615
- export interface RemoveOverrideCheckoutUrlRequest {
2616
- /**
2617
- * ID of the checkout to remove the override checkout url from.
2618
- * @format GUID
2619
- */
2620
- _id: string;
2621
- }
2622
- export interface RemoveOverrideCheckoutUrlResponse {
2623
- /** Updated checkout after removal of override checkout url. */
2624
- checkout?: Checkout;
2625
- }
2626
- export interface AddToCheckoutRequest {
2627
- /**
2628
- * Checkout ID.
2629
- * @format GUID
2630
- */
2631
- _id: string;
2632
- /**
2633
- * Catalog line items.
2634
- * @maxSize 100
2635
- */
2636
- lineItems?: LineItem[];
2637
- /**
2638
- * Custom line items. Custom line items don't trigger the Catalog service plugin.
2639
- *
2640
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2641
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2642
- * @maxSize 100
2643
- */
2644
- customLineItems?: CustomLineItem[];
2645
- }
2646
- export interface AddToCheckoutResponse {
2647
- /** Updated checkout. */
2648
- checkout?: Checkout;
2649
- }
2650
- export interface RemoveLineItemsRequest {
2651
- /**
2652
- * ID of the checkout to remove line items from.
2653
- * @format GUID
2654
- */
2655
- _id: string;
2656
- /**
2657
- * IDs of the line items to remove from the checkout.
2658
- *
2659
- * To find the IDs of the checkout line items you'd like to remove,
2660
- * pass the checkout ID to Get Checkout and look for the IDs under
2661
- * `lineItems`.
2662
- * @format GUID
2663
- * @minSize 1
2664
- * @maxSize 300
2665
- */
2666
- lineItemIds: string[];
2667
- }
2668
- export interface RemoveLineItemsResponse {
2669
- /** Updated checkout after removal of line items. */
2670
- checkout?: Checkout;
2671
- }
2672
- export interface CreateOrderRequest {
2673
- /**
2674
- * Checkout ID.
2675
- * @format GUID
2676
- */
2677
- _id: string;
2678
- /** Whether the payment method should be saved on the order. */
2679
- savePaymentMethod?: boolean;
2680
- /** Whether to authorize the payment and delay the capture. */
2681
- delayCapture?: boolean;
2682
- }
2683
- export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
2684
- /**
2685
- * ID of newly created order.
2686
- * @format GUID
2687
- */
2688
- orderId?: string;
2689
- /**
2690
- * ID of newly created subscription. Learn more about your site's [Subscriptions](https://support.wix.com/en/article/wix-stores-managing-product-subscriptions).
2691
- * @format GUID
2692
- */
2693
- subscriptionId?: string;
2694
- /**
2695
- * Payment gateway order ID.
2696
- *
2697
- * For online orders, pass this value as the `paymentId` parameter to the Wix Pay [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function so your customer can pay for the order.
2698
- * `paymentGatewayOrderId` will be returned if money needs to be charged.
2699
- *
2700
- * In some cases, money cannot be charged:
2701
- * + When the total price (the `priceSummary.total.amount` field in the checkout/order objects) is `0`. For example, in the case of a free item or an item with a 100% discount.
2702
- * + If the total price is not `0`, but the payment is covered by alternative payment methods, such as a gift card.
2703
- */
2704
- paymentGatewayOrderId?: string | null;
2705
- }
2706
- /** @oneof */
2707
- export interface CreateOrderResponseIdOneOf {
2708
- /**
2709
- * ID of newly created order.
2710
- * @format GUID
2711
- */
2712
- orderId?: string;
2713
- /**
2714
- * ID of newly created subscription. Learn more about your site's [Subscriptions](https://support.wix.com/en/article/wix-stores-managing-product-subscriptions).
2715
- * @format GUID
2716
- */
2717
- subscriptionId?: string;
2718
- }
2719
- export interface PaymentErrorResponseData {
2720
- paymentResponseToken?: string | null;
2721
- transactionStatus?: string;
2722
- failureDetails?: string | null;
2723
- }
2724
- export interface DoublePaymentErrorData extends DoublePaymentErrorDataIdOneOf {
2725
- /** @format GUID */
2726
- orderId?: string;
2727
- /** @format GUID */
2728
- subscriptionId?: string;
2729
- }
2730
- /** @oneof */
2731
- export interface DoublePaymentErrorDataIdOneOf {
2732
- /** @format GUID */
2733
- orderId?: string;
2734
- /** @format GUID */
2735
- subscriptionId?: string;
2736
- }
2737
- export interface RedeemErrorData {
2738
- reason?: string;
2739
- }
2740
- export interface ViolationsList {
2741
- /** Violations risen by ValidationsSPI implementers. */
2742
- violations?: Violation[];
2743
- }
2744
- export interface CreateOrderAndChargeRequest {
2745
- /**
2746
- * Checkout ID.
2747
- * @format GUID
2748
- */
2749
- _id: string;
2750
- /** Payment token. */
2751
- paymentToken?: string | null;
2752
- /** Whether the payment method should be saved on the order. */
2753
- savePaymentMethod?: boolean;
2754
- /** Whether to authorize the payment and delay the capture. */
2755
- delayCapture?: boolean;
2756
- }
2757
- export interface CreateOrderAndChargeResponse extends CreateOrderAndChargeResponseIdOneOf {
2758
- /**
2759
- * ID of newly created order.
2760
- * @format GUID
2761
- */
2762
- orderId?: string;
2763
- /**
2764
- * ID of newly created subscription.
2765
- * @format GUID
2766
- */
2767
- subscriptionId?: string;
2768
- /** Payment response token. */
2769
- paymentResponseToken?: string | null;
2770
- /**
2771
- * The payment gateway is cashier.
2772
- * payment_gateway_order_id will be returned given that money was charged.
2773
- * In some cases, money will not be charged:
2774
- * If the total price is 0 - For example, could be a free item or a an item with 100% discount
2775
- * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card
2776
- */
2777
- paymentGatewayOrderId?: string | null;
2778
- /**
2779
- * Whether an order was successfully created from this checkout and the payment transaction was completed
2780
- * @internal
2781
- * @readonly
2782
- */
2783
- checkoutCompleted?: boolean;
2784
- }
2785
- /** @oneof */
2786
- export interface CreateOrderAndChargeResponseIdOneOf {
2787
- /**
2788
- * ID of newly created order.
2789
- * @format GUID
2790
- */
2791
- orderId?: string;
2792
- /**
2793
- * ID of newly created subscription.
2794
- * @format GUID
2795
- */
2796
- subscriptionId?: string;
2797
- }
2798
- export interface MarkCheckoutAsCompletedAndRedirectToUrlRequest {
2799
- /**
2800
- * Server-signed JWT token with required information to complete checkout
2801
- * @maxLength 4096
2802
- */
2803
- token: string;
2804
- }
2805
- export interface RawHttpResponse {
2806
- body?: Uint8Array;
2807
- statusCode?: number | null;
2808
- headers?: HeadersEntry[];
2809
- }
2810
- export interface HeadersEntry {
2811
- key?: string;
2812
- value?: string;
2813
- }
2814
- export interface MarkCheckoutAsCompletedRequest {
2815
- /**
2816
- * Checkout ID.
2817
- * @format GUID
2818
- */
2819
- _id: string;
2820
- /**
2821
- * Order ID.
2822
- * @internal
2823
- * @format GUID
2824
- */
2825
- orderId?: string | null;
2826
- }
2827
- export interface MarkCheckoutAsCompletedResponse {
2828
- }
2829
- /** Triggered when an order created from this checkout is successfully paid for or when a checkout is marked as completed. */
2830
- export interface CheckoutMarkedAsCompleted {
2831
- checkout?: Checkout;
2832
- }
2833
- export interface UpdateLineItemsQuantityRequest {
2834
- /**
2835
- * Checkout ID.
2836
- * @format GUID
2837
- */
2838
- _id: string;
2839
- /**
2840
- * Line item info to update.
2841
- * @minSize 1
2842
- * @maxSize 100
2843
- */
2844
- lineItems: LineItemQuantityUpdate[];
2845
- }
2846
- export interface LineItemQuantityUpdate {
2847
- /**
2848
- * ID of the line item to update.
2849
- * @format GUID
2850
- */
2851
- _id?: string;
2852
- /**
2853
- * New total amount of the line item,
2854
- * not the amount to add to the current `quantity`.
2855
- *
2856
- * Min: `1`
2857
- *
2858
- * Max: `100000`
2859
- * @min 1
2860
- * @max 100000
2861
- */
2862
- quantity?: number;
2863
- }
2864
- export interface UpdateLineItemsQuantityResponse {
2865
- /** Updated checkout. */
2866
- checkout?: Checkout;
2867
- }
2868
- export interface GetCheckoutPaymentSettingsRequest {
2869
- /**
2870
- * Checkout ID.
2871
- * @format GUID
2872
- */
2873
- _id: string;
2874
- }
2875
- export interface GetCheckoutPaymentSettingsResponse {
2876
- blockedPaymentOptions?: GetCheckoutPaymentSettingsResponsePaymentOptionWithLiterals[];
2877
- }
2878
- export declare enum GetCheckoutPaymentSettingsResponsePaymentOption {
2879
- UNKNOWN_PAYMENT_OPTION = "UNKNOWN_PAYMENT_OPTION",
2880
- MANUAL = "MANUAL"
2881
- }
2882
- /** @enumType */
2883
- export type GetCheckoutPaymentSettingsResponsePaymentOptionWithLiterals = GetCheckoutPaymentSettingsResponsePaymentOption | 'UNKNOWN_PAYMENT_OPTION' | 'MANUAL';
2884
- export interface DeleteCheckoutRequest {
2885
- /**
2886
- * ID of the checkout to delete.
2887
- * @format GUID
2888
- */
2889
- _id?: string;
2890
- }
2891
- export interface DeleteCheckoutResponse {
2892
- }
2893
- export interface SubscriptionCreated {
2894
- subscription?: Subscription;
2895
- }
2896
- export interface Subscription {
2897
- /**
2898
- * Subscription id (auto-generated upon subscription creation)
2899
- * @readonly
2900
- */
2901
- _id?: string;
2902
- /**
2903
- * id of subscription in external system
2904
- * @format GUID
2905
- */
2906
- externalId?: string | null;
2907
- /**
2908
- * Subscription creation date
2909
- * @readonly
2910
- */
2911
- dateCreated?: Date | null;
2912
- /**
2913
- * The id of the cart this order was created from
2914
- * @format GUID
2915
- */
2916
- cartId?: string | null;
2917
- /**
2918
- * The id of the checkout this subscriptions was created from
2919
- * @format GUID
2920
- */
2921
- checkoutId?: string | null;
2922
- /** member or contact */
2923
- buyerInfo?: V1BuyerInfo;
2924
- /**
2925
- * Line items ordered
2926
- * @minSize 1
2927
- * @maxSize 1
2928
- */
2929
- lineItems?: V1LineItem[];
2930
- /** Totals for subscription's line items */
2931
- totals?: Totals;
2932
- /** site settings at the moment when subscription created */
2933
- storeSettings?: StoreSettings;
2934
- /** Full billing address */
2935
- billingAddress?: Address;
2936
- /** Delivery information */
2937
- shippingInfo?: V1ShippingInfo;
2938
- /** Coupon that was applied to subscription */
2939
- appliedCoupon?: AppliedCoupon;
2940
- /**
2941
- * Message from the customer (e.g., customization request)
2942
- * @maxLength 1000
2943
- */
2944
- buyerNote?: string | null;
2945
- /** Custom field */
2946
- customField?: V1CustomField;
2947
- /** Information about subscription option from which subscription was created */
2948
- subscriptionOptionInfo?: V1SubscriptionOptionInfo;
2949
- /** Sales channel that submitted this subscription */
2950
- channelInfo?: ChannelInfo;
2951
- /** defines when subscriber will be charged: for frequency=MONTH, billingCycles=6, interval=2 payment will be done every 2 month during one year */
2952
- subscriptionSettings?: V1SubscriptionSettings;
2953
- /**
2954
- * information about first subscription payment
2955
- * @readonly
2956
- */
2957
- billingInfo?: BillingInfo;
2958
- }
2959
- /** Buyer Info */
2960
- export interface V1BuyerInfo {
2961
- /**
2962
- * Wix customer ID
2963
- * @format GUID
2964
- */
2965
- _id?: string;
2966
- /** Customer type */
2967
- identityType?: IdentityTypeWithLiterals;
2968
- }
2969
- export declare enum IdentityType {
2970
- UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE",
2971
- /** Site member */
2972
- MEMBER = "MEMBER",
2973
- /** Contact */
2974
- CONTACT = "CONTACT"
2975
- }
2976
- /** @enumType */
2977
- export type IdentityTypeWithLiterals = IdentityType | 'UNSPECIFIED_IDENTITY_TYPE' | 'MEMBER' | 'CONTACT';
2978
- export interface V1LineItem {
2979
- /** Line item ID (auto-generated) */
2980
- index?: number;
2981
- /**
2982
- * Line item quantity
2983
- * @min 1
2984
- * @max 100000
2985
- */
2986
- quantity?: number;
2987
- /**
2988
- * Line item variantId (from Stores Catalog)
2989
- * @format GUID
2990
- */
2991
- variantId?: string | null;
2992
- /**
2993
- * Line item options ordered
2994
- * @maxSize 6
2995
- */
2996
- options?: OptionSelection[];
2997
- /**
2998
- * Line item custom text field selections
2999
- * @maxSize 20
3000
- */
3001
- customTextFields?: CustomTextFieldSelection[];
3002
- /** Charges details */
3003
- chargeDetails?: ChargeDetails;
3004
- /** Product details */
3005
- productDetails?: ProductDetails;
3006
- }
3007
- export interface OptionSelection {
3008
- /**
3009
- * Option name
3010
- * @maxLength 200
3011
- */
3012
- option?: string;
3013
- /**
3014
- * Selected choice for this option
3015
- * @maxLength 500
3016
- */
3017
- selection?: string;
3018
- }
3019
- export interface CustomTextFieldSelection {
3020
- /**
3021
- * Custom text field name
3022
- * @maxLength 100
3023
- */
3024
- title?: string;
3025
- /**
3026
- * Custom text field value
3027
- * @maxLength 500
3028
- */
3029
- value?: string;
3030
- }
3031
- export interface ChargeDetails {
3032
- /**
3033
- * price of line item (depends on subscription option)
3034
- * @max 999999999.99
3035
- */
3036
- price?: number;
3037
- /**
3038
- * Total price charged to the customer (for this line items) after computation of quantity and discount
3039
- * @max 999999999.99
3040
- */
3041
- totalPrice?: number | null;
3042
- /**
3043
- * Discount applied for this line item
3044
- * @max 999999999.99
3045
- */
3046
- discount?: number | null;
3047
- /**
3048
- * Tax applied for this line item
3049
- * @max 999999999.99
3050
- */
3051
- tax?: number | null;
3052
- /** Is tax applied for this line item */
3053
- taxIncludedInPrice?: boolean;
3054
- /**
3055
- * Tax rate %, as a decimal point >= 0
3056
- * @decimalValue options { maxScale:6, gte:0 }
3057
- */
3058
- taxRate?: string | null;
3059
- }
3060
- export interface ProductDetails {
3061
- /**
3062
- * Line item product ID (optional for POS orders)
3063
- * @minLength 1
3064
- */
3065
- productId?: string | null;
3066
- /**
3067
- * Line item name
3068
- * @minLength 1
3069
- * @maxLength 100
3070
- */
3071
- name?: string;
3072
- /**
3073
- * Line item name translated to buyer's language
3074
- * @minLength 1
3075
- * @maxLength 100
3076
- */
3077
- translatedName?: string | null;
3078
- /** Line item type (may be extended) */
3079
- lineItemType?: LineItemTypeWithLiterals;
3080
- /** Line item primary media for preview */
3081
- mediaItem?: MediaItem;
3082
- /**
3083
- * Line item SKU
3084
- * @maxLength 40
3085
- */
3086
- sku?: string | null;
3087
- /**
3088
- * Line item weight
3089
- * @max 999999999.99
3090
- */
3091
- weight?: number | null;
3092
- /**
3093
- * Line item notes
3094
- * @maxLength 1000
3095
- */
3096
- notes?: string | null;
3097
- /**
3098
- * Line item fulfillerId from stores fulfillers. No value means self fulfilled
3099
- * @format GUID
3100
- */
3101
- fulfillerId?: string | null;
3102
- /**
3103
- * Tax group id
3104
- * @format GUID
3105
- */
3106
- taxGroupId?: string | null;
3107
- /**
3108
- * App id from the catalog reference
3109
- * @format GUID
3110
- */
3111
- appId?: string | null;
3112
- }
3113
- export declare enum LineItemType {
3114
- /** Line item type can't be classified, due to an error */
3115
- UNSPECIFIED_LINE_ITEM_TYPE = "UNSPECIFIED_LINE_ITEM_TYPE",
3116
- /** Physical item type */
3117
- PHYSICAL = "PHYSICAL",
3118
- /** Digital item type */
3119
- DIGITAL = "DIGITAL",
3120
- /** Custom item price */
3121
- CUSTOM_AMOUNT_ITEM = "CUSTOM_AMOUNT_ITEM"
3122
- }
3123
- /** @enumType */
3124
- export type LineItemTypeWithLiterals = LineItemType | 'UNSPECIFIED_LINE_ITEM_TYPE' | 'PHYSICAL' | 'DIGITAL' | 'CUSTOM_AMOUNT_ITEM';
3125
- export interface MediaItem {
3126
- /**
3127
- * Media type
3128
- * @readonly
3129
- */
3130
- mediaType?: MediaItemTypeWithLiterals;
3131
- /**
3132
- * Media URL
3133
- * @format WEB_URL
3134
- * @readonly
3135
- */
3136
- url?: string;
3137
- /**
3138
- * Media item width
3139
- * @max 5000
3140
- * @readonly
3141
- */
3142
- width?: number;
3143
- /**
3144
- * Media item height
3145
- * @max 5000
3146
- * @readonly
3147
- */
3148
- height?: number;
3149
- /** Media ID (for media items previously saved in Wix Media) */
3150
- _id?: string | null;
3151
- /** Media external URL */
3152
- externalImageUrl?: string | null;
3153
- /**
3154
- * Alternative text for presentation when media cannot be displayed
3155
- * @maxLength 256
3156
- */
3157
- altText?: string | null;
3158
- }
3159
- export declare enum MediaItemType {
3160
- /** Media item type can't be classified, due to an error */
3161
- UNSPECIFIED_MEDIA_TYPE_ITEM = "UNSPECIFIED_MEDIA_TYPE_ITEM",
3162
- /** Image item type */
3163
- IMAGE = "IMAGE"
3164
- }
3165
- /** @enumType */
3166
- export type MediaItemTypeWithLiterals = MediaItemType | 'UNSPECIFIED_MEDIA_TYPE_ITEM' | 'IMAGE';
3167
- export interface Totals {
3168
- /**
3169
- * Subtotal of all line items, before tax
3170
- * @max 999999999.99
3171
- */
3172
- subtotal?: number;
3173
- /**
3174
- * Total shipping price, including tax
3175
- * @max 999999999.99
3176
- */
3177
- shipping?: number;
3178
- /**
3179
- * Total tax
3180
- * @max 999999999.99
3181
- */
3182
- tax?: number;
3183
- /**
3184
- * Total calculated discount value
3185
- * @max 999999999.99
3186
- */
3187
- discount?: number;
3188
- /**
3189
- * Total price
3190
- * @max 999999999.99
3191
- */
3192
- total?: number;
3193
- /**
3194
- * Total weight
3195
- * @max 999999999.99
3196
- */
3197
- weight?: number | null;
3198
- /**
3199
- * Total line items quantity
3200
- * @readonly
3201
- */
3202
- quantity?: number;
3203
- }
3204
- export interface StoreSettings {
3205
- /**
3206
- * Currency used for pricing in this store
3207
- * @maxLength 3
3208
- * @format CURRENCY
3209
- */
3210
- currency?: string | null;
3211
- /** Weight unit used in this store */
3212
- weightUnit?: WeightUnitWithLiterals;
3213
- /**
3214
- * The language to be used when communicating with the buyer
3215
- * For a site that support multiple languages, this would be the language the buyer selected
3216
- * Otherwise this would be the site language
3217
- * @minLength 2
3218
- * @maxLength 2
3219
- */
3220
- buyerLanguage?: string | null;
3221
- }
3222
- export interface Address extends AddressAddressLine1OptionsOneOf {
3223
- /**
3224
- * Address line 1 (free text)
3225
- * @maxLength 1000
3226
- */
3227
- addressLine1?: string;
3228
- /** Address line 1 (street) */
3229
- street?: Street;
3230
- /** Addressee name */
3231
- fullName?: FullName;
3232
- /**
3233
- * Country code (2 letters)
3234
- * @format COUNTRY
3235
- */
3236
- country?: string | null;
3237
- /**
3238
- * State or district
3239
- * @maxLength 50
3240
- */
3241
- subdivision?: string | null;
3242
- /**
3243
- * City name
3244
- * @maxLength 150
3245
- */
3246
- city?: string | null;
3247
- /**
3248
- * ZIP/postal code
3249
- * @maxLength 200
3250
- */
3251
- zipCode?: string | null;
3252
- /**
3253
- * Phone number
3254
- * @maxLength 200
3255
- */
3256
- phone?: string | null;
3257
- /**
3258
- * Company name
3259
- * @maxLength 500
3260
- */
3261
- company?: string | null;
3262
- /**
3263
- * Email address
3264
- * @maxLength 500
3265
- */
3266
- email?: string | null;
3267
- /**
3268
- * address line
3269
- * @maxLength 250
3270
- */
3271
- addressLine2?: string | null;
3272
- /** Tax information (for Brazil only) */
3273
- vatId?: VatId;
3274
- }
3275
- /** @oneof */
3276
- export interface AddressAddressLine1OptionsOneOf {
3277
- /**
3278
- * Address line 1 (free text)
3279
- * @maxLength 1000
3280
- */
3281
- addressLine1?: string;
3282
- /** Address line 1 (street) */
3283
- street?: Street;
3284
- }
3285
- export interface FullName {
3286
- /**
3287
- * Customer's first name
3288
- * @maxLength 1000
3289
- */
3290
- firstName?: string;
3291
- /**
3292
- * Customer's last name
3293
- * @maxLength 1000
3294
- */
3295
- lastName?: string;
3296
- }
3297
- export interface Street {
3298
- /**
3299
- * Street number
3300
- * @maxLength 500
3301
- */
3302
- number?: string;
3303
- /**
3304
- * Street name
3305
- * @maxLength 1000
3306
- */
3307
- name?: string;
3308
- }
3309
- export interface VatId {
3310
- /**
3311
- * Customer's tax ID.
3312
- * @maxLength 50
3313
- */
3314
- number?: string;
3315
- /**
3316
- * Tax type.
3317
- * + `CPF`: For individual tax payers.
3318
- * + `CNPJ`: For corporations.
3319
- */
3320
- type?: VatTypeWithLiterals;
3321
- }
3322
- /** Brazilian tax info types */
3323
- export declare enum VatType {
3324
- /** When the tax info type can't be classified, due to an error */
3325
- UNSPECIFIED_TAX_TYPE = "UNSPECIFIED_TAX_TYPE",
3326
- /** CPF - for individual tax payers */
3327
- CPF = "CPF",
3328
- /** CNPJ - for corporations */
3329
- CNPJ = "CNPJ"
3330
- }
3331
- /** @enumType */
3332
- export type VatTypeWithLiterals = VatType | 'UNSPECIFIED_TAX_TYPE' | 'CPF' | 'CNPJ';
3333
- export interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {
3334
- /** Shipment details (when this object describes shipment) */
3335
- shipmentDetails?: ShipmentDetails;
3336
- /** Pickup details (when this object describes pickup) */
3337
- pickupDetails?: V1PickupDetails;
3338
- /**
3339
- * Delivery option name
3340
- * @maxLength 250
3341
- */
3342
- deliveryOption?: string;
3343
- /**
3344
- * Delivery option delivery time
3345
- * @maxLength 500
3346
- */
3347
- estimatedDeliveryTime?: string | null;
3348
- }
3349
- /** @oneof */
3350
- export interface V1ShippingInfoDetailsOneOf {
3351
- /** Shipment details (when this object describes shipment) */
3352
- shipmentDetails?: ShipmentDetails;
3353
- /** Pickup details (when this object describes pickup) */
3354
- pickupDetails?: V1PickupDetails;
3355
- }
3356
- export interface ShipmentDetails {
3357
- /** Shipping destination address */
3358
- address?: Address;
3359
- /**
3360
- * Discount applied for shipping
3361
- * @max 999999999.99
3362
- */
3363
- discount?: number | null;
3364
- /**
3365
- * Tax applied for shipping
3366
- * @max 999999999.99
3367
- */
3368
- tax?: number | null;
3369
- /** Whether tax is included in the price */
3370
- taxIncludedInPrice?: boolean;
3371
- /**
3372
- * Tax rate % for shipping, as a decimal point >= 0
3373
- * @decimalValue options { maxScale:6, gte:0 }
3374
- */
3375
- taxRate?: string | null;
3376
- }
3377
- export interface V1PickupDetails {
3378
- /** Pickup address */
3379
- address?: PickupAddress;
3380
- /**
3381
- * Store owner's pickup instructions
3382
- * @maxLength 1000
3383
- */
3384
- pickupInstructions?: string | null;
3385
- }
3386
- export interface PickupAddress {
3387
- /**
3388
- * Country code (2 letters)
3389
- * @format COUNTRY
3390
- */
3391
- country?: string;
3392
- /**
3393
- * State/District
3394
- * @maxLength 50
3395
- */
3396
- subdivision?: string | null;
3397
- /**
3398
- * Address
3399
- * @maxLength 200
3400
- */
3401
- addressLine?: string;
3402
- /**
3403
- * City
3404
- * @maxLength 85
3405
- */
3406
- city?: string;
3407
- /**
3408
- * ZIP/postal code
3409
- * @maxLength 50
3410
- */
3411
- zipCode?: string;
3412
- }
3413
- export interface AppliedCoupon {
3414
- /** Coupon ID */
3415
- couponId?: string;
3416
- /**
3417
- * Coupon name
3418
- * @maxLength 100
3419
- */
3420
- name?: string;
3421
- /**
3422
- * Coupon code
3423
- * @maxLength 100
3424
- */
3425
- code?: string;
3426
- }
3427
- /** Custom field */
3428
- export interface V1CustomField {
3429
- /**
3430
- * Free text that the customer entered in the custom field during the checkout process
3431
- * @maxLength 250
3432
- */
3433
- value?: string;
3434
- /**
3435
- * Title for the custom field
3436
- * @maxLength 200
3437
- */
3438
- title?: string;
3439
- /**
3440
- * The title translated according to the buyer language
3441
- * @maxLength 200
3442
- */
3443
- translatedTitle?: string;
3444
- }
3445
- export interface V1SubscriptionOptionInfo {
3446
- /** @format GUID */
3447
- _id?: string | null;
3448
- /**
3449
- * @minLength 1
3450
- * @maxLength 20
3451
- */
3452
- title?: string;
3453
- /** @maxLength 60 */
3454
- description?: string | null;
3455
- discount?: Discount;
3456
- }
3457
- export interface Discount {
3458
- /** Discount type. */
3459
- type?: DiscountDiscountTypeWithLiterals;
3460
- /** Discount value. */
3461
- value?: number;
3462
- }
3463
- export declare enum DiscountDiscountType {
3464
- UNDEFINED = "UNDEFINED",
3465
- /** No discount */
3466
- AMOUNT = "AMOUNT",
3467
- PERCENT = "PERCENT"
3468
- }
3469
- /** @enumType */
3470
- export type DiscountDiscountTypeWithLiterals = DiscountDiscountType | 'UNDEFINED' | 'AMOUNT' | 'PERCENT';
3471
- export interface ChannelInfo {
3472
- /** Sales channel that submitted the subscription */
3473
- type?: ChannelInfoChannelTypeWithLiterals;
3474
- }
3475
- export declare enum ChannelInfoChannelType {
3476
- UNSPECIFIED = "UNSPECIFIED",
3477
- WEB = "WEB",
3478
- OTHER_PLATFORM = "OTHER_PLATFORM",
3479
- WIX_APP_STORE = "WIX_APP_STORE"
3480
- }
3481
- /** @enumType */
3482
- export type ChannelInfoChannelTypeWithLiterals = ChannelInfoChannelType | 'UNSPECIFIED' | 'WEB' | 'OTHER_PLATFORM' | 'WIX_APP_STORE';
3483
- export interface V1SubscriptionSettings {
3484
- /** Frequency of recurring payment. */
3485
- frequency?: SubscriptionFrequencyWithLiterals;
3486
- /** Whether subscription is renewed automatically at the end of each period. */
3487
- autoRenewal?: boolean;
3488
- /**
3489
- * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
3490
- * @min 2
3491
- * @max 999
3492
- */
3493
- billingCycles?: number | null;
3494
- }
3495
- export interface BillingInfo {
3496
- /**
3497
- * Payment method used for this order
3498
- * @maxLength 50
3499
- */
3500
- paymentMethod?: string | null;
3501
- /**
3502
- * Transaction ID from payment gateway (e.g., Wix Payments)
3503
- * @maxLength 100
3504
- */
3505
- paymentGatewayTransactionId?: string | null;
3506
- /**
3507
- * Order ID from payment gateway (e.g., Wix Payments)
3508
- * @maxLength 100
3509
- */
3510
- paymentGatewayOrderId?: string | null;
3511
- }
3512
- export interface Empty {
3513
- }
3514
- export interface DomainEvent extends DomainEventBodyOneOf {
3515
- createdEvent?: EntityCreatedEvent;
3516
- updatedEvent?: EntityUpdatedEvent;
3517
- deletedEvent?: EntityDeletedEvent;
3518
- actionEvent?: ActionEvent;
3519
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3520
- _id?: string;
3521
- /**
3522
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3523
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
3524
- */
3525
- entityFqdn?: string;
3526
- /**
3527
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
3528
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
3529
- */
3530
- slug?: string;
3531
- /** ID of the entity associated with the event. */
3532
- entityId?: string;
3533
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3534
- eventTime?: Date | null;
3535
- /**
3536
- * Whether the event was triggered as a result of a privacy regulation application
3537
- * (for example, GDPR).
3538
- */
3539
- triggeredByAnonymizeRequest?: boolean | null;
3540
- /** If present, indicates the action that triggered the event. */
3541
- originatedFrom?: string | null;
3542
- /**
3543
- * 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.
3544
- * 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.
3545
- */
3546
- entityEventSequence?: string | null;
3547
- }
3548
- /** @oneof */
3549
- export interface DomainEventBodyOneOf {
3550
- createdEvent?: EntityCreatedEvent;
3551
- updatedEvent?: EntityUpdatedEvent;
3552
- deletedEvent?: EntityDeletedEvent;
3553
- actionEvent?: ActionEvent;
3554
- }
3555
- export interface EntityCreatedEvent {
3556
- entity?: string;
3557
- }
3558
- export interface RestoreInfo {
3559
- deletedDate?: Date | null;
3560
- }
3561
- export interface EntityUpdatedEvent {
3562
- /**
3563
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3564
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3565
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3566
- */
3567
- currentEntity?: string;
3568
- }
3569
- export interface EntityDeletedEvent {
3570
- /** Entity that was deleted. */
3571
- deletedEntity?: string | null;
3572
- }
3573
- export interface ActionEvent {
3574
- body?: string;
3575
- }
3576
- export interface MessageEnvelope {
3577
- /**
3578
- * App instance ID.
3579
- * @format GUID
3580
- */
3581
- instanceId?: string | null;
3582
- /**
3583
- * Event type.
3584
- * @maxLength 150
3585
- */
3586
- eventType?: string;
3587
- /** The identification type and identity data. */
3588
- identity?: IdentificationData;
3589
- /** Stringify payload. */
3590
- data?: string;
3591
- }
3592
- export interface IdentificationData extends IdentificationDataIdOneOf {
3593
- /**
3594
- * ID of a site visitor that has not logged in to the site.
3595
- * @format GUID
3596
- */
3597
- anonymousVisitorId?: string;
3598
- /**
3599
- * ID of a site visitor that has logged in to the site.
3600
- * @format GUID
3601
- */
3602
- memberId?: string;
3603
- /**
3604
- * ID of a Wix user (site owner, contributor, etc.).
3605
- * @format GUID
3606
- */
3607
- wixUserId?: string;
3608
- /**
3609
- * ID of an app.
3610
- * @format GUID
3611
- */
3612
- appId?: string;
3613
- /** @readonly */
3614
- identityType?: WebhookIdentityTypeWithLiterals;
3615
- }
3616
- /** @oneof */
3617
- export interface IdentificationDataIdOneOf {
3618
- /**
3619
- * ID of a site visitor that has not logged in to the site.
3620
- * @format GUID
3621
- */
3622
- anonymousVisitorId?: string;
3623
- /**
3624
- * ID of a site visitor that has logged in to the site.
3625
- * @format GUID
3626
- */
3627
- memberId?: string;
3628
- /**
3629
- * ID of a Wix user (site owner, contributor, etc.).
3630
- * @format GUID
3631
- */
3632
- wixUserId?: string;
3633
- /**
3634
- * ID of an app.
3635
- * @format GUID
3636
- */
3637
- appId?: string;
3638
- }
3639
- export declare enum WebhookIdentityType {
3640
- UNKNOWN = "UNKNOWN",
3641
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3642
- MEMBER = "MEMBER",
3643
- WIX_USER = "WIX_USER",
3644
- APP = "APP"
3645
- }
3646
- /** @enumType */
3647
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
3648
- export interface BaseEventMetadata {
3649
- /**
3650
- * App instance ID.
3651
- * @format GUID
3652
- */
3653
- instanceId?: string | null;
3654
- /**
3655
- * Event type.
3656
- * @maxLength 150
3657
- */
3658
- eventType?: string;
3659
- /** The identification type and identity data. */
3660
- identity?: IdentificationData;
3661
- }
3662
- export interface EventMetadata extends BaseEventMetadata {
3663
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3664
- _id?: string;
3665
- /**
3666
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3667
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
3668
- */
3669
- entityFqdn?: string;
3670
- /**
3671
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
3672
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
3673
- */
3674
- slug?: string;
3675
- /** ID of the entity associated with the event. */
3676
- entityId?: string;
3677
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3678
- eventTime?: Date | null;
3679
- /**
3680
- * Whether the event was triggered as a result of a privacy regulation application
3681
- * (for example, GDPR).
3682
- */
3683
- triggeredByAnonymizeRequest?: boolean | null;
3684
- /** If present, indicates the action that triggered the event. */
3685
- originatedFrom?: string | null;
3686
- /**
3687
- * 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.
3688
- * 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.
3689
- */
3690
- entityEventSequence?: string | null;
3691
- }
3692
- export interface CheckoutCompletedEnvelope {
3693
- data: CheckoutMarkedAsCompleted;
3694
- metadata: EventMetadata;
3695
- }
3696
- /**
3697
- * Triggered when an order created from this checkout is
3698
- * successfully paid for or when a checkout is marked as completed.
3699
- * @permissionScope Manage Stores - all permissions
3700
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3701
- * @permissionScope Manage Stores
3702
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3703
- * @permissionScope Read eCommerce - all read permissions
3704
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3705
- * @permissionScope Read Orders
3706
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3707
- * @permissionScope Read Stores - all read permissions
3708
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3709
- * @permissionScope Manage Restaurants - all permissions
3710
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3711
- * @permissionScope Manage eCommerce - all permissions
3712
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3713
- * @permissionScope Manage Orders
3714
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3715
- * @permissionId ECOM.READ_CHECKOUTS
3716
- * @webhook
3717
- * @eventType wix.ecom.v1.checkout_completed
3718
- * @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
3719
- * @slug completed
3720
- */
3721
- export declare function onCheckoutCompleted(handler: (event: CheckoutCompletedEnvelope) => void | Promise<void>): void;
3722
- export interface CheckoutCreatedEnvelope {
3723
- entity: Checkout;
3724
- metadata: EventMetadata;
3725
- }
3726
- /**
3727
- * Triggered when a checkout is created.
3728
- * @permissionScope Manage Stores - all permissions
3729
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3730
- * @permissionScope Manage Stores
3731
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3732
- * @permissionScope Read eCommerce - all read permissions
3733
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3734
- * @permissionScope Read Orders
3735
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3736
- * @permissionScope Read Stores - all read permissions
3737
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3738
- * @permissionScope Manage Restaurants - all permissions
3739
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3740
- * @permissionScope Manage eCommerce - all permissions
3741
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3742
- * @permissionScope Manage Orders
3743
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3744
- * @permissionId ECOM.READ_CHECKOUTS
3745
- * @webhook
3746
- * @eventType wix.ecom.v1.checkout_created
3747
- * @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
3748
- * @slug created
3749
- */
3750
- export declare function onCheckoutCreated(handler: (event: CheckoutCreatedEnvelope) => void | Promise<void>): void;
3751
- export interface CheckoutUpdatedEnvelope {
3752
- entity: Checkout;
3753
- metadata: EventMetadata;
3754
- }
3755
- /**
3756
- * Triggered when a checkout is updated.
3757
- * @permissionScope Manage Stores - all permissions
3758
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3759
- * @permissionScope Manage Stores
3760
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3761
- * @permissionScope Read eCommerce - all read permissions
3762
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3763
- * @permissionScope Read Orders
3764
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3765
- * @permissionScope Read Stores - all read permissions
3766
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3767
- * @permissionScope Manage Restaurants - all permissions
3768
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3769
- * @permissionScope Manage eCommerce - all permissions
3770
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3771
- * @permissionScope Manage Orders
3772
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3773
- * @permissionId ECOM.READ_CHECKOUTS
3774
- * @webhook
3775
- * @eventType wix.ecom.v1.checkout_updated
3776
- * @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
3777
- * @slug updated
3778
- */
3779
- export declare function onCheckoutUpdated(handler: (event: CheckoutUpdatedEnvelope) => void | Promise<void>): void;
3780
- type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.productName.original` | `lineItems.${number}.price.amount` | `lineItems.${number}.price.convertedAmount` | `lineItems.${number}.price.formattedAmount` | `lineItems.${number}.price.formattedConvertedAmount` | `lineItems.${number}.taxDetails.taxRate` | `lineItems.${number}.availability.status` | `lineItems.${number}.physicalProperties.shippable` | `lineItems.${number}.itemType.preset` | `lineItems.${number}.itemType.custom` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.freeTrialPeriod.frequency` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.freeTrialPeriod.interval` | `lineItems.${number}.subscriptionOptionInfo.title.original` | `lineItems.${number}.subscriptionOptionInfo.description.original` | `lineItems.${number}.paymentOption` | `lineItems.${number}.priceDescription.original` | `lineItems.${number}.customLineItem` | `lineItems.${number}.catalogOverrideFields.paymentOption.value` | `lineItems.${number}.priceUndetermined` | `lineItems.${number}.fixedQuantity` | `lineItems.${number}.savePaymentMethod` | `lineItems.${number}.taxableAddress.addressType` | `lineItems.${number}.membersOnly` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `shippingInfo.shippingDestination.address.streetAddress.number` | `shippingInfo.shippingDestination.address.streetAddress.name` | `shippingInfo.shippingDestination.contactDetails.vatId._id` | `shippingInfo.shippingDestination.contactDetails.vatId.type` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `conversionCurrency` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `customFields` | `customFields.${number}.title` | `weightUnit` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `currency` | `channelType` | `siteLanguage` | `buyerLanguage` | `completed` | `taxIncludedInPrice` | `createdBy.userId` | `createdBy.memberId` | `createdBy.visitorId` | `createdBy.appId` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships.memberships` | `membershipOptions.selectedMemberships.memberships.${number}._id` | `membershipOptions.selectedMemberships.memberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name` | `customSettings.lockGiftCard` | `customSettings.lockCouponCode` | `customSettings.disabledPolicyAgreementCheckbox` | `customSettings.disabledManualPayment` | `customContentReference.appId` | `customContentReference.componentId` | `externalReference.appId` | `payAfterFreeTrial.subtotal.amount` | `payAfterFreeTrial.subtotal.convertedAmount` | `payAfterFreeTrial.subtotal.formattedAmount` | `payAfterFreeTrial.subtotal.formattedConvertedAmount` | `paymentCurrency`;
3781
- /**
3782
- * Creates a checkout.
3783
- *
3784
- * A checkout must include at least 1 item in `lineItems` or `customLineItems`.
3785
- *
3786
- * If passing `checkoutInfo.customFields`, then `checkoutInfo.customFields.value` is a required field.
3787
- * @public
3788
- * @requiredField options.channelType
3789
- * @requiredField options.checkoutInfo.customFields.value
3790
- * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships._id
3791
- * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.appId
3792
- * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.lineItemIds
3793
- * @requiredField options.customLineItems.descriptionLines.name
3794
- * @requiredField options.customLineItems.descriptionLines.value
3795
- * @requiredField options.customLineItems.itemType
3796
- * @requiredField options.customLineItems.price
3797
- * @requiredField options.customLineItems.productName
3798
- * @requiredField options.customLineItems.quantity
3799
- * @requiredField options.lineItems.catalogReference
3800
- * @requiredField options.lineItems.catalogReference.appId
3801
- * @requiredField options.lineItems.catalogReference.catalogItemId
3802
- * @requiredField options.lineItems.quantity
3803
- * @param options - Checkout creation options.
3804
- * @permissionId ECOM.MODIFY_CHECKOUTS
3805
- * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
3806
- * @permissionScope Manage Stores - all permissions
3807
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3808
- * @permissionScope Manage Stores
3809
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3810
- * @permissionScope Manage Restaurants - all permissions
3811
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3812
- * @permissionScope Manage eCommerce - all permissions
3813
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3814
- * @permissionScope Manage Orders
3815
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3816
- * @permissionScope Manage Stores - all permissions
3817
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3818
- * @permissionScope Manage eCommerce - Admin Permissions
3819
- * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
3820
- * @permissionScope Manage Stores
3821
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3822
- * @permissionScope Manage Restaurants - all permissions
3823
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3824
- * @permissionScope Manage eCommerce - all permissions
3825
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3826
- * @applicableIdentity APP
3827
- * @applicableIdentity VISITOR
3828
- * @returns Newly created checkout.
3829
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout
3830
- */
3831
- export declare function createCheckout(options?: NonNullablePaths<CreateCheckoutOptions, `channelType` | `checkoutInfo.customFields.${number}.value` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}._id` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}.appId` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}.lineItemIds` | `customLineItems.${number}.descriptionLines` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.price` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
3832
- export interface CreateCheckoutOptions {
3833
- /** Checkout information. */
3834
- checkoutInfo?: Checkout;
3835
- /** Coupon code. */
3836
- couponCode?: string | null;
3837
- /**
3838
- * Catalog line items to add to the checkout.
3839
- * @maxSize 300
3840
- */
3841
- lineItems?: LineItem[];
3842
- /**
3843
- * Custom line items to add to the checkout. Custom line items don't trigger the Catalog service plugin.
3844
- *
3845
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
3846
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
3847
- * @maxSize 300
3848
- */
3849
- customLineItems?: CustomLineItem[];
3850
- /** Sales channel that submitted the order. */
3851
- channelType: ChannelTypeWithLiterals;
3852
- /**
3853
- * Gift card code.
3854
- *
3855
- * The checkout can only hold 1 `giftCardCode` at a time. If an additional `giftCardCode` is added, it will override the existing `giftCardCode`.
3856
- *
3857
- * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/setting-up-wix-gift-cards-9451439).
3858
- */
3859
- giftCardCode?: string | null;
3860
- /**
3861
- * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
3862
- *
3863
- * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
3864
- * to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
3865
- * standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
3866
- * @maxLength 1000
3867
- */
3868
- overrideCheckoutUrl?: string | null;
3869
- }
3870
- /**
3871
- * Retrieves a checkout.
3872
- * @param _id - Checkout ID.
3873
- * @public
3874
- * @requiredField _id
3875
- * @permissionId ECOM.READ_CHECKOUTS
3876
- * @permissionScope Manage Stores - all permissions
3877
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3878
- * @permissionScope Manage Stores
3879
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3880
- * @permissionScope Read eCommerce - all read permissions
3881
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3882
- * @permissionScope Read Orders
3883
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3884
- * @permissionScope Read Stores - all read permissions
3885
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3886
- * @permissionScope Manage Restaurants - all permissions
3887
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3888
- * @permissionScope Manage eCommerce - all permissions
3889
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3890
- * @permissionScope Manage Orders
3891
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3892
- * @applicableIdentity APP
3893
- * @applicableIdentity VISITOR
3894
- * @returns Retrieved checkout.
3895
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout
3896
- */
3897
- export declare function getCheckout(_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
3898
- /**
3899
- * Retrieves the checkout associated with a specified cart.
3900
- * @param _id - Cart ID.
3901
- * @public
3902
- * @requiredField _id
3903
- * @permissionId ECOM.READ_CHECKOUTS
3904
- * @permissionScope Manage Stores - all permissions
3905
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3906
- * @permissionScope Manage Stores
3907
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3908
- * @permissionScope Read eCommerce - all read permissions
3909
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3910
- * @permissionScope Read Orders
3911
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3912
- * @permissionScope Read Stores - all read permissions
3913
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3914
- * @permissionScope Manage Restaurants - all permissions
3915
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3916
- * @permissionScope Manage eCommerce - all permissions
3917
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3918
- * @permissionScope Manage Orders
3919
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3920
- * @applicableIdentity APP
3921
- * @applicableIdentity VISITOR
3922
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutByCartId
3923
- */
3924
- export declare function getCheckoutByCartId(_id: string): Promise<NonNullablePaths<GetCheckoutByCartIdResponse, {
3925
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
3926
- }[CheckoutNonNullablePaths]>>;
3927
- /**
3928
- * Deprecated and will be removed soon, use GetCheckoutURL
3929
- * @param _id - Checkout ID.
3930
- * @internal
3931
- * @documentationMaturity preview
3932
- * @requiredField _id
3933
- * @permissionId ECOM.READ_CHECKOUTS
3934
- * @permissionScope Manage Stores - all permissions
3935
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3936
- * @permissionScope Manage Stores
3937
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3938
- * @permissionScope Read eCommerce - all read permissions
3939
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3940
- * @permissionScope Read Orders
3941
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3942
- * @permissionScope Read Stores - all read permissions
3943
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3944
- * @permissionScope Manage Restaurants - all permissions
3945
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3946
- * @permissionScope Manage eCommerce - all permissions
3947
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3948
- * @permissionScope Manage Orders
3949
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3950
- * @applicableIdentity APP
3951
- * @applicableIdentity VISITOR
3952
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetWixCheckoutURL
3953
- */
3954
- export declare function getWixCheckoutUrl(_id: string): Promise<NonNullablePaths<GetWixCheckoutURLResponse, `checkoutUrl`>>;
3955
- /**
3956
- * Retrieves the checkout page URL of a specified checkout.
3957
- *
3958
- * By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.
3959
- * However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
3960
- * @param _id - Checkout ID.
3961
- * @public
3962
- * @requiredField _id
3963
- * @permissionId ECOM.READ_CHECKOUTS
3964
- * @permissionScope Manage Stores - all permissions
3965
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3966
- * @permissionScope Manage Stores
3967
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
3968
- * @permissionScope Read eCommerce - all read permissions
3969
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3970
- * @permissionScope Read Orders
3971
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3972
- * @permissionScope Read Stores - all read permissions
3973
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3974
- * @permissionScope Manage Restaurants - all permissions
3975
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3976
- * @permissionScope Manage eCommerce - all permissions
3977
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3978
- * @permissionScope Manage Orders
3979
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3980
- * @applicableIdentity APP
3981
- * @applicableIdentity VISITOR
3982
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutURL
3983
- */
3984
- export declare function getCheckoutUrl(_id: string): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`>>;
3985
- /**
3986
- * Updates a checkout.
3987
- *
3988
- * Use this method to update checkout fields such as billing and shipping info, or to add a coupon code or gift card.
3989
- *
3990
- * To update a checkout's `lineItems`, `completed` status, or to remove coupons and gift cards, see these methods:
3991
- * + Add to Checkout: Add line items to the checkout.
3992
- * + Update Line Items Quantity: Update the quantity of 1 or more line items in the checkout.
3993
- * + Remove Line Items: Remove a line item from the checkout.
3994
- * + Mark Checkout As Completed: To update `completed` to `true` if the checkout was completed through a non-Wix orders or payments system.
3995
- * + Remove Coupon: To remove an applied coupon from the checkout.
3996
- * + Remove Gift Card: To remove an applied gift card from the checkout.
3997
- *
3998
- * >**Notes:**
3999
- * > + If nothing is passed in the request, the call will fail.
4000
- * > + The `checkout.buyerInfo.email` may not be removed once it is set.
4001
- * @param _id - Checkout ID.
4002
- * @public
4003
- * @requiredField _id
4004
- * @requiredField checkout
4005
- * @requiredField checkout.customFields.value
4006
- * @requiredField checkout.membershipOptions.selectedMemberships.memberships._id
4007
- * @requiredField checkout.membershipOptions.selectedMemberships.memberships.appId
4008
- * @requiredField checkout.membershipOptions.selectedMemberships.memberships.lineItemIds
4009
- * @requiredField options.customLineItems.descriptionLines.name
4010
- * @requiredField options.customLineItems.descriptionLines.value
4011
- * @requiredField options.customLineItems.itemType
4012
- * @requiredField options.customLineItems.productName
4013
- * @requiredField options.customLineItems.quantity
4014
- * @requiredField options.lineItems.catalogReference
4015
- * @requiredField options.lineItems.catalogReference.appId
4016
- * @requiredField options.lineItems.catalogReference.catalogItemId
4017
- * @requiredField options.lineItems.quantity
4018
- * @param options - Checkout update options.
4019
- * @permissionId ECOM.MODIFY_CHECKOUTS
4020
- * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
4021
- * @permissionScope Manage Stores - all permissions
4022
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4023
- * @permissionScope Manage Stores
4024
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4025
- * @permissionScope Manage Restaurants - all permissions
4026
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4027
- * @permissionScope Manage eCommerce - all permissions
4028
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4029
- * @permissionScope Manage Orders
4030
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4031
- * @permissionScope Manage Stores - all permissions
4032
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4033
- * @permissionScope Manage eCommerce - Admin Permissions
4034
- * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
4035
- * @permissionScope Manage Stores
4036
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4037
- * @permissionScope Manage Restaurants - all permissions
4038
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4039
- * @permissionScope Manage eCommerce - all permissions
4040
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4041
- * @applicableIdentity APP
4042
- * @applicableIdentity VISITOR
4043
- * @returns Updated checkout.
4044
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateCheckout
4045
- */
4046
- export declare function updateCheckout(_id: string, checkout: NonNullablePaths<UpdateCheckout, `customFields.${number}.value` | `membershipOptions.selectedMemberships.memberships.${number}._id` | `membershipOptions.selectedMemberships.memberships.${number}.appId` | `membershipOptions.selectedMemberships.memberships.${number}.lineItemIds`>, options?: NonNullablePaths<UpdateCheckoutOptions, `customLineItems.${number}.descriptionLines` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
4047
- export interface UpdateCheckout {
4048
- /**
4049
- * Checkout ID.
4050
- * @format GUID
4051
- * @readonly
4052
- */
4053
- _id?: string | null;
4054
- /**
4055
- * Line items.
4056
- *
4057
- * Max: 300 items
4058
- * @minSize 1
4059
- * @maxSize 300
4060
- * @readonly
4061
- */
4062
- lineItems?: LineItem[];
4063
- /** Billing information. */
4064
- billingInfo?: AddressWithContact;
4065
- /** Shipping information. */
4066
- shippingInfo?: ShippingInfo;
4067
- /**
4068
- * [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.
4069
- * @maxLength 1000
4070
- */
4071
- buyerNote?: string | null;
4072
- /** Buyer information. */
4073
- buyerInfo?: BuyerInfo;
4074
- /**
4075
- * The currency selected by the buyer during the purchase flow, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
4076
- * @readonly
4077
- * @format CURRENCY
4078
- */
4079
- conversionCurrency?: string;
4080
- /**
4081
- * Calculated price summary for the checkout.
4082
- * @readonly
4083
- */
4084
- priceSummary?: PriceSummary;
4085
- /**
4086
- * Errors when calculating totals.
4087
- * @readonly
4088
- */
4089
- calculationErrors?: CalculationErrors;
4090
- /**
4091
- * Applied gift card details.
4092
- *
4093
- * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/setting-up-wix-gift-cards-9451439).
4094
- * @readonly
4095
- */
4096
- giftCard?: GiftCard;
4097
- /**
4098
- * Applied discounts.
4099
- * @readonly
4100
- */
4101
- appliedDiscounts?: AppliedDiscount[];
4102
- /** Custom fields. */
4103
- customFields?: CustomField[];
4104
- /**
4105
- * Weight measurement unit. Defaults to a site's weight unit.
4106
- * @readonly
4107
- */
4108
- weightUnit?: WeightUnitWithLiterals;
4109
- /**
4110
- * Tax summary.
4111
- * @readonly
4112
- */
4113
- taxSummary?: TaxSummary;
4114
- /**
4115
- * The site's default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
4116
- * @format CURRENCY
4117
- * @readonly
4118
- */
4119
- currency?: string;
4120
- /**
4121
- * Sales channel that submitted the order.
4122
- * @readonly
4123
- */
4124
- channelType?: ChannelTypeWithLiterals;
4125
- /**
4126
- * Site language in which original values are shown.
4127
- * @readonly
4128
- */
4129
- siteLanguage?: string;
4130
- /**
4131
- * Language for communication with the buyer. Defaults to the site language.
4132
- *
4133
- * For a site that supports multiple languages, this is the language the buyer selected.
4134
- * @readonly
4135
- */
4136
- buyerLanguage?: string;
4137
- /**
4138
- * Whether an order was successfully created from this checkout.
4139
- *
4140
- * For an order to be successful, it must be successfully paid for (unless the total is 0).
4141
- * @readonly
4142
- */
4143
- completed?: boolean;
4144
- /**
4145
- * Whether tax is included in line item prices.
4146
- * @readonly
4147
- */
4148
- taxIncludedInPrice?: boolean;
4149
- /**
4150
- * ID of the checkout's initiator.
4151
- * @readonly
4152
- */
4153
- createdBy?: CreatedBy;
4154
- /**
4155
- * Date and time the checkout was created.
4156
- * @readonly
4157
- */
4158
- _createdDate?: Date | null;
4159
- /**
4160
- * Date and time the checkout was updated.
4161
- * @readonly
4162
- */
4163
- _updatedDate?: Date | null;
4164
- /**
4165
- * Minimal amount to pay in order to place the order.
4166
- * @readonly
4167
- */
4168
- payNow?: PriceSummary;
4169
- /**
4170
- * Remaining amount for the order to be fully paid.
4171
- * @readonly
4172
- */
4173
- payLater?: PriceSummary;
4174
- /** Memberships to apply when creating the order. */
4175
- membershipOptions?: MembershipOptions;
4176
- /**
4177
- * Additional Fees.
4178
- * @maxSize 100
4179
- */
4180
- additionalFees?: AdditionalFee[];
4181
- /**
4182
- * Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart.
4183
- * @format GUID
4184
- */
4185
- cartId?: string | null;
4186
- /**
4187
- * List of validation violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
4188
- * @readonly
4189
- */
4190
- violations?: Violation[];
4191
- /**
4192
- * Custom field data for the checkout object.
4193
- *
4194
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
4195
- */
4196
- extendedFields?: ExtendedFields;
4197
- /**
4198
- * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
4199
- * @format GUID
4200
- * @readonly
4201
- */
4202
- purchaseFlowId?: string | null;
4203
- /**
4204
- * Additional settings for customization of the checkout process.
4205
- *
4206
- * > **Notes:**
4207
- * > * Custom settings can only be set when creating a checkout.
4208
- * > * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
4209
- * @immutable
4210
- */
4211
- customSettings?: CustomSettings;
4212
- /**
4213
- * Reference IDs for the app and component providing custom checkout page content.
4214
- *
4215
- * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
4216
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
4217
- */
4218
- customContentReference?: CustomContentReference;
4219
- /**
4220
- * References to an external app and resource associated with this checkout.
4221
- * Used for integration and tracking across different platforms.
4222
- * @immutable
4223
- */
4224
- externalReference?: ExternalReference;
4225
- /**
4226
- * Order ID.
4227
- *
4228
- * This field is empty until the checkout completes and becomes an order.
4229
- * @internal
4230
- * @format GUID
4231
- * @readonly
4232
- */
4233
- orderId?: string | null;
4234
- /**
4235
- * Payment for subscriptions after free trial period.
4236
- * @readonly
4237
- */
4238
- payAfterFreeTrial?: PriceSummary;
4239
- /**
4240
- * The business location ID associated with the checkout.
4241
- *
4242
- * To learn more, see the Locations API.
4243
- * @format GUID
4244
- */
4245
- businessLocationId?: string | null;
4246
- /**
4247
- * Whether payment is required to create an order.
4248
- *
4249
- * Payment is required if any of the following conditions are met:
4250
- * 1. At least one item requires a payment method. This can be because the item has the `savePaymentMethod` field set to `true`, or the item is a subscription with a price greater than zero.
4251
- * 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.
4252
- * @internal
4253
- * @readonly
4254
- */
4255
- paymentRequired?: boolean;
4256
- /**
4257
- * Charges information for each subscription in the checkout.
4258
- * @internal
4259
- * @readonly
4260
- * @maxSize 100
4261
- */
4262
- subscriptionCharges?: SubscriptionCharges[];
4263
- /**
4264
- * Currency used for payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
4265
- * @readonly
4266
- * @format CURRENCY
4267
- */
4268
- paymentCurrency?: string;
4269
- }
4270
- export interface UpdateCheckoutOptions {
4271
- /**
4272
- * Coupon code.
4273
- *
4274
- * The checkout can only hold 1 `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.
4275
- */
4276
- couponCode?: string | null;
4277
- /** Gift card code. */
4278
- giftCardCode?: string | null;
4279
- /**
4280
- * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
4281
- *
4282
- * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
4283
- * to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
4284
- * standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
4285
- * @maxLength 1000
4286
- */
4287
- overrideCheckoutUrl?: string | null;
4288
- /**
4289
- * Catalog line items.
4290
- * @maxSize 300
4291
- */
4292
- lineItems?: LineItem[];
4293
- /**
4294
- * Custom line items. Custom line items don't trigger the Catalog service plugin.
4295
- *
4296
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
4297
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
4298
- * @maxSize 300
4299
- */
4300
- customLineItems?: CustomLineItem[];
4301
- }
4302
- /**
4303
- * Removes the coupon from a specified checkout.
4304
- * @param _id - ID of the checkout to remove the coupon from.
4305
- * @public
4306
- * @requiredField _id
4307
- * @permissionId ECOM.MODIFY_CHECKOUTS
4308
- * @permissionScope Manage Stores - all permissions
4309
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4310
- * @permissionScope Manage Stores
4311
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4312
- * @permissionScope Manage Restaurants - all permissions
4313
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4314
- * @permissionScope Manage eCommerce - all permissions
4315
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4316
- * @permissionScope Manage Orders
4317
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4318
- * @applicableIdentity APP
4319
- * @applicableIdentity VISITOR
4320
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveCoupon
4321
- */
4322
- export declare function removeCoupon(_id: string): Promise<NonNullablePaths<RemoveCouponResponse, {
4323
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4324
- }[CheckoutNonNullablePaths]>>;
4325
- /**
4326
- * Removes the gift card from a specified checkout.
4327
- *
4328
- * A checkout can only hold 1 gift card.
4329
- * @param _id - ID of the checkout to remove the gift card from.
4330
- * @public
4331
- * @requiredField _id
4332
- * @permissionId ECOM.MODIFY_CHECKOUTS
4333
- * @permissionScope Manage Stores - all permissions
4334
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4335
- * @permissionScope Manage Stores
4336
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4337
- * @permissionScope Manage Restaurants - all permissions
4338
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4339
- * @permissionScope Manage eCommerce - all permissions
4340
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4341
- * @permissionScope Manage Orders
4342
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4343
- * @applicableIdentity APP
4344
- * @applicableIdentity VISITOR
4345
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveGiftCard
4346
- */
4347
- export declare function removeGiftCard(_id: string): Promise<NonNullablePaths<RemoveGiftCardResponse, {
4348
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4349
- }[CheckoutNonNullablePaths]>>;
4350
- /**
4351
- * Removes the `overrideCheckoutUrl` from a specified checkout.
4352
- *
4353
- * When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard
4354
- * Wix checkout page URL.
4355
- * @param _id - ID of the checkout to remove the override checkout url from.
4356
- * @public
4357
- * @requiredField _id
4358
- * @permissionId ECOM.MODIFY_CHECKOUTS
4359
- * @permissionScope Manage Stores - all permissions
4360
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4361
- * @permissionScope Manage Stores
4362
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4363
- * @permissionScope Manage Restaurants - all permissions
4364
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4365
- * @permissionScope Manage eCommerce - all permissions
4366
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4367
- * @permissionScope Manage Orders
4368
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4369
- * @applicableIdentity APP
4370
- * @applicableIdentity VISITOR
4371
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveOverrideCheckoutUrl
4372
- */
4373
- export declare function removeOverrideCheckoutUrl(_id: string): Promise<NonNullablePaths<RemoveOverrideCheckoutUrlResponse, {
4374
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4375
- }[CheckoutNonNullablePaths]>>;
4376
- /**
4377
- * Adds catalog line items and/or custom line items to a checkout.
4378
- *
4379
- * When adding catalog ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)) items
4380
- * to a checkout, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
4381
- * @param _id - Checkout ID.
4382
- * @public
4383
- * @requiredField _id
4384
- * @requiredField options.customLineItems.descriptionLines.name
4385
- * @requiredField options.customLineItems.descriptionLines.value
4386
- * @requiredField options.customLineItems.itemType
4387
- * @requiredField options.customLineItems.productName
4388
- * @requiredField options.customLineItems.quantity
4389
- * @requiredField options.lineItems.catalogReference
4390
- * @requiredField options.lineItems.catalogReference.appId
4391
- * @requiredField options.lineItems.catalogReference.catalogItemId
4392
- * @requiredField options.lineItems.quantity
4393
- * @param options - Items to be added to checkout.
4394
- * @permissionId ECOM.MODIFY_CHECKOUTS
4395
- * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
4396
- * @permissionScope Manage Stores - all permissions
4397
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4398
- * @permissionScope Manage Stores
4399
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4400
- * @permissionScope Manage Restaurants - all permissions
4401
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4402
- * @permissionScope Manage eCommerce - all permissions
4403
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4404
- * @permissionScope Manage Orders
4405
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4406
- * @permissionScope Manage Stores - all permissions
4407
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4408
- * @permissionScope Manage eCommerce - Admin Permissions
4409
- * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
4410
- * @permissionScope Manage Stores
4411
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4412
- * @permissionScope Manage Restaurants - all permissions
4413
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4414
- * @permissionScope Manage eCommerce - all permissions
4415
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4416
- * @applicableIdentity APP
4417
- * @applicableIdentity VISITOR
4418
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.AddToCheckout
4419
- */
4420
- export declare function addToCheckout(_id: string, options?: NonNullablePaths<AddToCheckoutOptions, `customLineItems.${number}.descriptionLines` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<AddToCheckoutResponse, {
4421
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4422
- }[CheckoutNonNullablePaths]>>;
4423
- export interface AddToCheckoutOptions {
4424
- /**
4425
- * Catalog line items.
4426
- * @maxSize 100
4427
- */
4428
- lineItems?: LineItem[];
4429
- /**
4430
- * Custom line items. Custom line items don't trigger the Catalog service plugin.
4431
- *
4432
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
4433
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
4434
- * @maxSize 100
4435
- */
4436
- customLineItems?: CustomLineItem[];
4437
- }
4438
- /**
4439
- * Removes line items from the specified checkout.
4440
- * @param _id - ID of the checkout to remove line items from.
4441
- * @param lineItemIds - IDs of the line items to remove from the checkout.
4442
- *
4443
- * To find the IDs of the checkout line items you'd like to remove,
4444
- * pass the checkout ID to Get Checkout and look for the IDs under
4445
- * `lineItems`.
4446
- * @public
4447
- * @requiredField _id
4448
- * @requiredField lineItemIds
4449
- * @permissionId ECOM.MODIFY_CHECKOUTS
4450
- * @permissionScope Manage Stores - all permissions
4451
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4452
- * @permissionScope Manage Stores
4453
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4454
- * @permissionScope Manage Restaurants - all permissions
4455
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4456
- * @permissionScope Manage eCommerce - all permissions
4457
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4458
- * @permissionScope Manage Orders
4459
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4460
- * @applicableIdentity APP
4461
- * @applicableIdentity VISITOR
4462
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveLineItems
4463
- */
4464
- export declare function removeLineItems(_id: string, lineItemIds: string[]): Promise<NonNullablePaths<RemoveLineItemsResponse, {
4465
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4466
- }[CheckoutNonNullablePaths]>>;
4467
- /**
4468
- * Creates an order from a specified checkout.
4469
- *
4470
- * For an order to be created from a checkout, the following requirements must be met:
4471
- * + A checkout cannot have calculation errors. Pass the checkout ID to Get Checkout and review the `calculationErrors` field.
4472
- * + A checkout must have at least 1 line item or custom line item.
4473
- * + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
4474
- * + If there is a payment to be made, meaning that `priceSummary.total` is greater than `0`, the `billingInfo.address` field are required.
4475
- * + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields are required.
4476
- * + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field are required.
4477
- * @param _id - Checkout ID.
4478
- * @public
4479
- * @requiredField _id
4480
- * @param options - Additional order creation options.
4481
- * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
4482
- * @permissionScope Manage Stores - all permissions
4483
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4484
- * @permissionScope Manage Stores
4485
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4486
- * @permissionScope Manage Restaurants - all permissions
4487
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4488
- * @permissionScope Manage eCommerce - all permissions
4489
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4490
- * @permissionScope Manage Orders
4491
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4492
- * @applicableIdentity APP
4493
- * @applicableIdentity VISITOR
4494
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrder
4495
- */
4496
- export declare function createOrder(_id: string, options?: CreateOrderOptions): Promise<NonNullablePaths<CreateOrderResponse, `orderId` | `subscriptionId`>>;
4497
- export interface CreateOrderOptions {
4498
- /** Whether the payment method should be saved on the order. */
4499
- savePaymentMethod?: boolean;
4500
- /** Whether to authorize the payment and delay the capture. */
4501
- delayCapture?: boolean;
4502
- }
4503
- /**
4504
- * Deprecated (use createOrder instead)
4505
- * @param _id - Checkout ID.
4506
- * @internal
4507
- * @documentationMaturity preview
4508
- * @requiredField _id
4509
- * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
4510
- * @permissionScope Manage Stores - all permissions
4511
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4512
- * @permissionScope Manage Stores
4513
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4514
- * @permissionScope Manage Restaurants - all permissions
4515
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4516
- * @permissionScope Manage eCommerce - all permissions
4517
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4518
- * @permissionScope Manage Orders
4519
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4520
- * @applicableIdentity APP
4521
- * @applicableIdentity VISITOR
4522
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrderAndCharge
4523
- */
4524
- export declare function createOrderAndCharge(_id: string, options?: CreateOrderAndChargeOptions): Promise<NonNullablePaths<CreateOrderAndChargeResponse, `orderId` | `subscriptionId`>>;
4525
- export interface CreateOrderAndChargeOptions {
4526
- /** Payment token. */
4527
- paymentToken?: string | null;
4528
- /** Whether the payment method should be saved on the order. */
4529
- savePaymentMethod?: boolean;
4530
- /** Whether to authorize the payment and delay the capture. */
4531
- delayCapture?: boolean;
4532
- }
4533
- /**
4534
- * Marks a checkout as completed and redirects to a specified URL.
4535
- * @param token - Server-signed JWT token with required information to complete checkout
4536
- * @public
4537
- * @documentationMaturity preview
4538
- * @requiredField token
4539
- * @permissionId ECOM.MODIFY_CHECKOUTS
4540
- * @permissionScope Manage Stores - all permissions
4541
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4542
- * @permissionScope Manage Stores
4543
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4544
- * @permissionScope Manage Restaurants - all permissions
4545
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4546
- * @permissionScope Manage eCommerce - all permissions
4547
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4548
- * @permissionScope Manage Orders
4549
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4550
- * @applicableIdentity APP
4551
- * @applicableIdentity VISITOR
4552
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompletedAndRedirectToUrl
4553
- */
4554
- export declare function markCheckoutAsCompletedAndRedirectToUrl(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`>>;
4555
- /**
4556
- * Sets `completed` to `true` to mark a checkout as completed.
4557
- *
4558
- * When an order is completed through Wix, the `completed` field in the associated checkout object
4559
- * will automatically be updated to `true`. If an order is completed through a separate system,
4560
- * use this method to manually mark the checkout as completed.
4561
- * @param _id - Checkout ID.
4562
- * @public
4563
- * @requiredField _id
4564
- * @permissionId ECOM.MODIFY_CHECKOUTS
4565
- * @permissionScope Manage Stores - all permissions
4566
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4567
- * @permissionScope Manage Stores
4568
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4569
- * @permissionScope Manage Restaurants - all permissions
4570
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4571
- * @permissionScope Manage eCommerce - all permissions
4572
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4573
- * @permissionScope Manage Orders
4574
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4575
- * @applicableIdentity APP
4576
- * @applicableIdentity VISITOR
4577
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompleted
4578
- */
4579
- export declare function markCheckoutAsCompleted(_id: string): Promise<void>;
4580
- /**
4581
- * Updates the quantity of one or more line items in a checkout.
4582
- *
4583
- * This method is only for updating the quantity of line items. To entirely remove a line item from
4584
- * the checkout, use the Remove Line Items method.
4585
- * To add a new line item to the checkout, use the Add to Checkout method.
4586
- *
4587
- * This method checks the amount of stock remaining for this line item. If the specified `quantity`
4588
- * is greater than the remaining stock, then the `quantity` returned in the response is the total amount
4589
- * of remaining stock.
4590
- * @param _id - Checkout ID.
4591
- * @param lineItems - Line item info to update.
4592
- * @public
4593
- * @requiredField _id
4594
- * @requiredField lineItems
4595
- * @requiredField lineItems._id
4596
- * @requiredField lineItems.quantity
4597
- * @permissionId ECOM.MODIFY_CHECKOUTS
4598
- * @permissionScope Manage Stores - all permissions
4599
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4600
- * @permissionScope Manage Stores
4601
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
4602
- * @permissionScope Manage Restaurants - all permissions
4603
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4604
- * @permissionScope Manage eCommerce - all permissions
4605
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4606
- * @permissionScope Manage Orders
4607
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4608
- * @applicableIdentity APP
4609
- * @applicableIdentity VISITOR
4610
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateLineItemsQuantity
4611
- */
4612
- export declare function updateLineItemsQuantity(_id: string, lineItems: NonNullablePaths<LineItemQuantityUpdate, `_id` | `quantity`>[]): Promise<NonNullablePaths<UpdateLineItemsQuantityResponse, {
4613
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4614
- }[CheckoutNonNullablePaths]>>;
4615
- /** @param _id - Checkout ID.
4616
- * @internal
4617
- * @documentationMaturity preview
4618
- * @requiredField _id
4619
- * @permissionId ECOM.READ_PAYMENT_SETTINGS
4620
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutPaymentSettings
4621
- */
4622
- export declare function getCheckoutPaymentSettings(_id: string): Promise<NonNullablePaths<GetCheckoutPaymentSettingsResponse, `blockedPaymentOptions`>>;
4623
- export {};