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