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