@wix/auto_sdk_ecom_checkout 1.0.15 → 1.0.16

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