@wix/auto_sdk_ecom_checkout 1.0.14 → 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 -4494
  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 -4494
  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,4494 +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
- /** @oneof */
2668
- export interface CreateOrderAndChargeResponseIdOneOf {
2669
- /**
2670
- * ID of newly created order.
2671
- * @format GUID
2672
- */
2673
- orderId?: string;
2674
- /**
2675
- * ID of newly created subscription.
2676
- * @format GUID
2677
- */
2678
- subscriptionId?: string;
2679
- }
2680
- export interface MarkCheckoutAsCompletedAndRedirectToUrlRequest {
2681
- /**
2682
- * Server-signed JWT token with required information to complete checkout
2683
- * @maxLength 4096
2684
- */
2685
- token: string;
2686
- }
2687
- export interface RawHttpResponse {
2688
- body?: Uint8Array;
2689
- statusCode?: number | null;
2690
- headers?: HeadersEntry[];
2691
- }
2692
- export interface HeadersEntry {
2693
- key?: string;
2694
- value?: string;
2695
- }
2696
- export interface MarkCheckoutAsCompletedRequest {
2697
- /**
2698
- * Checkout ID.
2699
- * @format GUID
2700
- */
2701
- _id: string;
2702
- /**
2703
- * Order ID.
2704
- * @internal
2705
- * @format GUID
2706
- */
2707
- orderId?: string | null;
2708
- }
2709
- export interface MarkCheckoutAsCompletedResponse {
2710
- }
2711
- /** Triggered when an order created from this checkout is successfully paid for or when a checkout is marked as completed. */
2712
- export interface CheckoutMarkedAsCompleted {
2713
- checkout?: Checkout;
2714
- }
2715
- export interface UpdateLineItemsQuantityRequest {
2716
- /**
2717
- * Checkout ID.
2718
- * @format GUID
2719
- */
2720
- _id: string;
2721
- /**
2722
- * Line item info to update.
2723
- * @minSize 1
2724
- * @maxSize 100
2725
- */
2726
- lineItems: LineItemQuantityUpdate[];
2727
- }
2728
- export interface LineItemQuantityUpdate {
2729
- /**
2730
- * ID of the line item to update.
2731
- * @format GUID
2732
- */
2733
- _id?: string;
2734
- /**
2735
- * New total amount of the line item,
2736
- * not the amount to add to the current `quantity`.
2737
- *
2738
- * Min: `1`
2739
- *
2740
- * Max: `100000`
2741
- * @min 1
2742
- * @max 100000
2743
- */
2744
- quantity?: number;
2745
- }
2746
- export interface UpdateLineItemsQuantityResponse {
2747
- /** Updated checkout. */
2748
- checkout?: Checkout;
2749
- }
2750
- export interface GetCheckoutPaymentSettingsRequest {
2751
- /**
2752
- * Checkout ID.
2753
- * @format GUID
2754
- */
2755
- _id: string;
2756
- }
2757
- export interface GetCheckoutPaymentSettingsResponse {
2758
- blockedPaymentOptions?: GetCheckoutPaymentSettingsResponsePaymentOption[];
2759
- }
2760
- export declare enum GetCheckoutPaymentSettingsResponsePaymentOption {
2761
- UNKNOWN_PAYMENT_OPTION = "UNKNOWN_PAYMENT_OPTION",
2762
- MANUAL = "MANUAL"
2763
- }
2764
- export interface DeleteCheckoutRequest {
2765
- /**
2766
- * ID of the checkout to delete.
2767
- * @format GUID
2768
- */
2769
- _id?: string;
2770
- }
2771
- export interface DeleteCheckoutResponse {
2772
- }
2773
- export interface SubscriptionCreated {
2774
- subscription?: Subscription;
2775
- }
2776
- export interface Subscription {
2777
- /**
2778
- * Subscription id (auto-generated upon subscription creation)
2779
- * @readonly
2780
- */
2781
- _id?: string;
2782
- /**
2783
- * id of subscription in external system
2784
- * @format GUID
2785
- */
2786
- externalId?: string | null;
2787
- /**
2788
- * Subscription creation date
2789
- * @readonly
2790
- */
2791
- dateCreated?: Date | null;
2792
- /**
2793
- * The id of the cart this order was created from
2794
- * @format GUID
2795
- */
2796
- cartId?: string | null;
2797
- /**
2798
- * The id of the checkout this subscriptions was created from
2799
- * @format GUID
2800
- */
2801
- checkoutId?: string | null;
2802
- /** member or contact */
2803
- buyerInfo?: V1BuyerInfo;
2804
- /**
2805
- * Line items ordered
2806
- * @minSize 1
2807
- * @maxSize 1
2808
- */
2809
- lineItems?: V1LineItem[];
2810
- /** Totals for subscription's line items */
2811
- totals?: Totals;
2812
- /** site settings at the moment when subscription created */
2813
- storeSettings?: StoreSettings;
2814
- /** Full billing address */
2815
- billingAddress?: Address;
2816
- /** Delivery information */
2817
- shippingInfo?: V1ShippingInfo;
2818
- /** Coupon that was applied to subscription */
2819
- appliedCoupon?: AppliedCoupon;
2820
- /**
2821
- * Message from the customer (e.g., customization request)
2822
- * @maxLength 1000
2823
- */
2824
- buyerNote?: string | null;
2825
- /** Custom field */
2826
- customField?: V1CustomField;
2827
- /** Information about subscription option from which subscription was created */
2828
- subscriptionOptionInfo?: V1SubscriptionOptionInfo;
2829
- /** Sales channel that submitted this subscription */
2830
- channelInfo?: ChannelInfo;
2831
- /** defines when subscriber will be charged: for frequency=MONTH, billingCycles=6, interval=2 payment will be done every 2 month during one year */
2832
- subscriptionSettings?: V1SubscriptionSettings;
2833
- /**
2834
- * information about first subscription payment
2835
- * @readonly
2836
- */
2837
- billingInfo?: BillingInfo;
2838
- }
2839
- /** Buyer Info */
2840
- export interface V1BuyerInfo {
2841
- /**
2842
- * Wix customer ID
2843
- * @format GUID
2844
- */
2845
- _id?: string;
2846
- /** Customer type */
2847
- identityType?: IdentityType;
2848
- }
2849
- export declare enum IdentityType {
2850
- UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE",
2851
- /** Site member */
2852
- MEMBER = "MEMBER",
2853
- /** Contact */
2854
- CONTACT = "CONTACT"
2855
- }
2856
- export interface V1LineItem {
2857
- /** Line item ID (auto-generated) */
2858
- index?: number;
2859
- /**
2860
- * Line item quantity
2861
- * @min 1
2862
- * @max 100000
2863
- */
2864
- quantity?: number;
2865
- /**
2866
- * Line item variantId (from Stores Catalog)
2867
- * @format GUID
2868
- */
2869
- variantId?: string | null;
2870
- /**
2871
- * Line item options ordered
2872
- * @maxSize 6
2873
- */
2874
- options?: OptionSelection[];
2875
- /**
2876
- * Line item custom text field selections
2877
- * @maxSize 20
2878
- */
2879
- customTextFields?: CustomTextFieldSelection[];
2880
- /** Charges details */
2881
- chargeDetails?: ChargeDetails;
2882
- /** Product details */
2883
- productDetails?: ProductDetails;
2884
- }
2885
- export interface OptionSelection {
2886
- /**
2887
- * Option name
2888
- * @maxLength 200
2889
- */
2890
- option?: string;
2891
- /**
2892
- * Selected choice for this option
2893
- * @maxLength 500
2894
- */
2895
- selection?: string;
2896
- }
2897
- export interface CustomTextFieldSelection {
2898
- /**
2899
- * Custom text field name
2900
- * @maxLength 100
2901
- */
2902
- title?: string;
2903
- /**
2904
- * Custom text field value
2905
- * @maxLength 500
2906
- */
2907
- value?: string;
2908
- }
2909
- export interface ChargeDetails {
2910
- /**
2911
- * price of line item (depends on subscription option)
2912
- * @max 999999999.99
2913
- */
2914
- price?: number;
2915
- /**
2916
- * Total price charged to the customer (for this line items) after computation of quantity and discount
2917
- * @max 999999999.99
2918
- */
2919
- totalPrice?: number | null;
2920
- /**
2921
- * Discount applied for this line item
2922
- * @max 999999999.99
2923
- */
2924
- discount?: number | null;
2925
- /**
2926
- * Tax applied for this line item
2927
- * @max 999999999.99
2928
- */
2929
- tax?: number | null;
2930
- /** Is tax applied for this line item */
2931
- taxIncludedInPrice?: boolean;
2932
- /**
2933
- * Tax rate %, as a decimal point >= 0
2934
- * @decimalValue options { maxScale:6, gte:0 }
2935
- */
2936
- taxRate?: string | null;
2937
- }
2938
- export interface ProductDetails {
2939
- /**
2940
- * Line item product ID (optional for POS orders)
2941
- * @minLength 1
2942
- */
2943
- productId?: string | null;
2944
- /**
2945
- * Line item name
2946
- * @minLength 1
2947
- * @maxLength 100
2948
- */
2949
- name?: string;
2950
- /**
2951
- * Line item name translated to buyer's language
2952
- * @minLength 1
2953
- * @maxLength 100
2954
- */
2955
- translatedName?: string | null;
2956
- /** Line item type (may be extended) */
2957
- lineItemType?: LineItemType;
2958
- /** Line item primary media for preview */
2959
- mediaItem?: MediaItem;
2960
- /**
2961
- * Line item SKU
2962
- * @maxLength 40
2963
- */
2964
- sku?: string | null;
2965
- /**
2966
- * Line item weight
2967
- * @max 999999999.99
2968
- */
2969
- weight?: number | null;
2970
- /**
2971
- * Line item notes
2972
- * @maxLength 1000
2973
- */
2974
- notes?: string | null;
2975
- /**
2976
- * Line item fulfillerId from stores fulfillers. No value means self fulfilled
2977
- * @format GUID
2978
- */
2979
- fulfillerId?: string | null;
2980
- /**
2981
- * Tax group id
2982
- * @format GUID
2983
- */
2984
- taxGroupId?: string | null;
2985
- /**
2986
- * App id from the catalog reference
2987
- * @format GUID
2988
- */
2989
- appId?: string | null;
2990
- }
2991
- export declare enum LineItemType {
2992
- /** Line item type can't be classified, due to an error */
2993
- UNSPECIFIED_LINE_ITEM_TYPE = "UNSPECIFIED_LINE_ITEM_TYPE",
2994
- /** Physical item type */
2995
- PHYSICAL = "PHYSICAL",
2996
- /** Digital item type */
2997
- DIGITAL = "DIGITAL",
2998
- /** Custom item price */
2999
- CUSTOM_AMOUNT_ITEM = "CUSTOM_AMOUNT_ITEM"
3000
- }
3001
- export interface MediaItem {
3002
- /**
3003
- * Media type
3004
- * @readonly
3005
- */
3006
- mediaType?: MediaItemType;
3007
- /**
3008
- * Media URL
3009
- * @format WEB_URL
3010
- * @readonly
3011
- */
3012
- url?: string;
3013
- /**
3014
- * Media item width
3015
- * @max 5000
3016
- * @readonly
3017
- */
3018
- width?: number;
3019
- /**
3020
- * Media item height
3021
- * @max 5000
3022
- * @readonly
3023
- */
3024
- height?: number;
3025
- /** Media ID (for media items previously saved in Wix Media) */
3026
- _id?: string | null;
3027
- /** Media external URL */
3028
- externalImageUrl?: string | null;
3029
- /**
3030
- * Alternative text for presentation when media cannot be displayed
3031
- * @maxLength 256
3032
- */
3033
- altText?: string | null;
3034
- }
3035
- export declare enum MediaItemType {
3036
- /** Media item type can't be classified, due to an error */
3037
- UNSPECIFIED_MEDIA_TYPE_ITEM = "UNSPECIFIED_MEDIA_TYPE_ITEM",
3038
- /** Image item type */
3039
- IMAGE = "IMAGE"
3040
- }
3041
- export interface Totals {
3042
- /**
3043
- * Subtotal of all line items, before tax
3044
- * @max 999999999.99
3045
- */
3046
- subtotal?: number;
3047
- /**
3048
- * Total shipping price, including tax
3049
- * @max 999999999.99
3050
- */
3051
- shipping?: number;
3052
- /**
3053
- * Total tax
3054
- * @max 999999999.99
3055
- */
3056
- tax?: number;
3057
- /**
3058
- * Total calculated discount value
3059
- * @max 999999999.99
3060
- */
3061
- discount?: number;
3062
- /**
3063
- * Total price
3064
- * @max 999999999.99
3065
- */
3066
- total?: number;
3067
- /**
3068
- * Total weight
3069
- * @max 999999999.99
3070
- */
3071
- weight?: number | null;
3072
- /**
3073
- * Total line items quantity
3074
- * @readonly
3075
- */
3076
- quantity?: number;
3077
- }
3078
- export interface StoreSettings {
3079
- /**
3080
- * Currency used for pricing in this store
3081
- * @maxLength 3
3082
- * @format CURRENCY
3083
- */
3084
- currency?: string | null;
3085
- /** Weight unit used in this store */
3086
- weightUnit?: WeightUnit;
3087
- /**
3088
- * The language to be used when communicating with the buyer
3089
- * For a site that support multiple languages, this would be the language the buyer selected
3090
- * Otherwise this would be the site language
3091
- * @minLength 2
3092
- * @maxLength 2
3093
- */
3094
- buyerLanguage?: string | null;
3095
- }
3096
- export interface Address extends AddressAddressLine1OptionsOneOf {
3097
- /**
3098
- * Address line 1 (free text)
3099
- * @maxLength 1000
3100
- */
3101
- addressLine1?: string;
3102
- /** Address line 1 (street) */
3103
- street?: Street;
3104
- /** Addressee name */
3105
- fullName?: FullName;
3106
- /**
3107
- * Country code (2 letters)
3108
- * @format COUNTRY
3109
- */
3110
- country?: string | null;
3111
- /**
3112
- * State or district
3113
- * @maxLength 50
3114
- */
3115
- subdivision?: string | null;
3116
- /**
3117
- * City name
3118
- * @maxLength 150
3119
- */
3120
- city?: string | null;
3121
- /**
3122
- * ZIP/postal code
3123
- * @maxLength 200
3124
- */
3125
- zipCode?: string | null;
3126
- /**
3127
- * Phone number
3128
- * @maxLength 200
3129
- */
3130
- phone?: string | null;
3131
- /**
3132
- * Company name
3133
- * @maxLength 500
3134
- */
3135
- company?: string | null;
3136
- /**
3137
- * Email address
3138
- * @maxLength 500
3139
- */
3140
- email?: string | null;
3141
- /**
3142
- * address line
3143
- * @maxLength 250
3144
- */
3145
- addressLine2?: string | null;
3146
- /** Tax information (for Brazil only) */
3147
- vatId?: VatId;
3148
- }
3149
- /** @oneof */
3150
- export interface AddressAddressLine1OptionsOneOf {
3151
- /**
3152
- * Address line 1 (free text)
3153
- * @maxLength 1000
3154
- */
3155
- addressLine1?: string;
3156
- /** Address line 1 (street) */
3157
- street?: Street;
3158
- }
3159
- export interface FullName {
3160
- /**
3161
- * Customer's first name
3162
- * @maxLength 1000
3163
- */
3164
- firstName?: string;
3165
- /**
3166
- * Customer's last name
3167
- * @maxLength 1000
3168
- */
3169
- lastName?: string;
3170
- }
3171
- export interface Street {
3172
- /**
3173
- * Street number
3174
- * @maxLength 500
3175
- */
3176
- number?: string;
3177
- /**
3178
- * Street name
3179
- * @maxLength 1000
3180
- */
3181
- name?: string;
3182
- }
3183
- export interface VatId {
3184
- /**
3185
- * Customer's tax ID.
3186
- * @maxLength 50
3187
- */
3188
- number?: string;
3189
- /**
3190
- * Tax type.
3191
- * + `CPF`: For individual tax payers.
3192
- * + `CNPJ`: For corporations.
3193
- */
3194
- type?: VatType;
3195
- }
3196
- /** Brazilian tax info types */
3197
- export declare enum VatType {
3198
- /** When the tax info type can't be classified, due to an error */
3199
- UNSPECIFIED_TAX_TYPE = "UNSPECIFIED_TAX_TYPE",
3200
- /** CPF - for individual tax payers */
3201
- CPF = "CPF",
3202
- /** CNPJ - for corporations */
3203
- CNPJ = "CNPJ"
3204
- }
3205
- export interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {
3206
- /** Shipment details (when this object describes shipment) */
3207
- shipmentDetails?: ShipmentDetails;
3208
- /** Pickup details (when this object describes pickup) */
3209
- pickupDetails?: V1PickupDetails;
3210
- /**
3211
- * Delivery option name
3212
- * @maxLength 250
3213
- */
3214
- deliveryOption?: string;
3215
- /**
3216
- * Delivery option delivery time
3217
- * @maxLength 500
3218
- */
3219
- estimatedDeliveryTime?: string | null;
3220
- }
3221
- /** @oneof */
3222
- export interface V1ShippingInfoDetailsOneOf {
3223
- /** Shipment details (when this object describes shipment) */
3224
- shipmentDetails?: ShipmentDetails;
3225
- /** Pickup details (when this object describes pickup) */
3226
- pickupDetails?: V1PickupDetails;
3227
- }
3228
- export interface ShipmentDetails {
3229
- /** Shipping destination address */
3230
- address?: Address;
3231
- /**
3232
- * Discount applied for shipping
3233
- * @max 999999999.99
3234
- */
3235
- discount?: number | null;
3236
- /**
3237
- * Tax applied for shipping
3238
- * @max 999999999.99
3239
- */
3240
- tax?: number | null;
3241
- /** Whether tax is included in the price */
3242
- taxIncludedInPrice?: boolean;
3243
- /**
3244
- * Tax rate % for shipping, as a decimal point >= 0
3245
- * @decimalValue options { maxScale:6, gte:0 }
3246
- */
3247
- taxRate?: string | null;
3248
- }
3249
- export interface V1PickupDetails {
3250
- /** Pickup address */
3251
- address?: PickupAddress;
3252
- /**
3253
- * Store owner's pickup instructions
3254
- * @maxLength 1000
3255
- */
3256
- pickupInstructions?: string | null;
3257
- }
3258
- export interface PickupAddress {
3259
- /**
3260
- * Country code (2 letters)
3261
- * @format COUNTRY
3262
- */
3263
- country?: string;
3264
- /**
3265
- * State/District
3266
- * @maxLength 50
3267
- */
3268
- subdivision?: string | null;
3269
- /**
3270
- * Address
3271
- * @maxLength 200
3272
- */
3273
- addressLine?: string;
3274
- /**
3275
- * City
3276
- * @maxLength 85
3277
- */
3278
- city?: string;
3279
- /**
3280
- * ZIP/postal code
3281
- * @maxLength 50
3282
- */
3283
- zipCode?: string;
3284
- }
3285
- export interface AppliedCoupon {
3286
- /** Coupon ID */
3287
- couponId?: string;
3288
- /**
3289
- * Coupon name
3290
- * @maxLength 100
3291
- */
3292
- name?: string;
3293
- /**
3294
- * Coupon code
3295
- * @maxLength 100
3296
- */
3297
- code?: string;
3298
- }
3299
- /** Custom field */
3300
- export interface V1CustomField {
3301
- /**
3302
- * Free text that the customer entered in the custom field during the checkout process
3303
- * @maxLength 250
3304
- */
3305
- value?: string;
3306
- /**
3307
- * Title for the custom field
3308
- * @maxLength 200
3309
- */
3310
- title?: string;
3311
- /**
3312
- * The title translated according to the buyer language
3313
- * @maxLength 200
3314
- */
3315
- translatedTitle?: string;
3316
- }
3317
- export interface V1SubscriptionOptionInfo {
3318
- /** @format GUID */
3319
- _id?: string | null;
3320
- /**
3321
- * @minLength 1
3322
- * @maxLength 20
3323
- */
3324
- title?: string;
3325
- /** @maxLength 60 */
3326
- description?: string | null;
3327
- discount?: Discount;
3328
- }
3329
- export interface Discount {
3330
- /** Discount type. */
3331
- type?: DiscountDiscountType;
3332
- /** Discount value. */
3333
- value?: number;
3334
- }
3335
- export declare enum DiscountDiscountType {
3336
- UNDEFINED = "UNDEFINED",
3337
- /** No discount */
3338
- AMOUNT = "AMOUNT",
3339
- PERCENT = "PERCENT"
3340
- }
3341
- export interface ChannelInfo {
3342
- /** Sales channel that submitted the subscription */
3343
- type?: ChannelInfoChannelType;
3344
- }
3345
- export declare enum ChannelInfoChannelType {
3346
- UNSPECIFIED = "UNSPECIFIED",
3347
- WEB = "WEB",
3348
- OTHER_PLATFORM = "OTHER_PLATFORM",
3349
- WIX_APP_STORE = "WIX_APP_STORE"
3350
- }
3351
- export interface V1SubscriptionSettings {
3352
- /** Frequency of recurring payment. */
3353
- frequency?: SubscriptionFrequency;
3354
- /** Whether subscription is renewed automatically at the end of each period. */
3355
- autoRenewal?: boolean;
3356
- /**
3357
- * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
3358
- * @min 2
3359
- * @max 999
3360
- */
3361
- billingCycles?: number | null;
3362
- }
3363
- export interface BillingInfo {
3364
- /**
3365
- * Payment method used for this order
3366
- * @maxLength 50
3367
- */
3368
- paymentMethod?: string | null;
3369
- /**
3370
- * Transaction ID from payment gateway (e.g., Wix Payments)
3371
- * @maxLength 100
3372
- */
3373
- paymentGatewayTransactionId?: string | null;
3374
- /**
3375
- * Order ID from payment gateway (e.g., Wix Payments)
3376
- * @maxLength 100
3377
- */
3378
- paymentGatewayOrderId?: string | null;
3379
- }
3380
- export interface Empty {
3381
- }
3382
- export interface DomainEvent extends DomainEventBodyOneOf {
3383
- createdEvent?: EntityCreatedEvent;
3384
- updatedEvent?: EntityUpdatedEvent;
3385
- deletedEvent?: EntityDeletedEvent;
3386
- actionEvent?: ActionEvent;
3387
- /**
3388
- * Unique event ID.
3389
- * Allows clients to ignore duplicate webhooks.
3390
- */
3391
- _id?: string;
3392
- /**
3393
- * Assumes actions are also always typed to an entity_type
3394
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3395
- */
3396
- entityFqdn?: string;
3397
- /**
3398
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3399
- * This is although the created/updated/deleted notion is duplication of the oneof types
3400
- * Example: created/updated/deleted/started/completed/email_opened
3401
- */
3402
- slug?: string;
3403
- /** ID of the entity associated with the event. */
3404
- entityId?: string;
3405
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3406
- eventTime?: Date | null;
3407
- /**
3408
- * Whether the event was triggered as a result of a privacy regulation application
3409
- * (for example, GDPR).
3410
- */
3411
- triggeredByAnonymizeRequest?: boolean | null;
3412
- /** If present, indicates the action that triggered the event. */
3413
- originatedFrom?: string | null;
3414
- /**
3415
- * A sequence number defining the order of updates to the underlying entity.
3416
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
3417
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3418
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3419
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
3420
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3421
- */
3422
- entityEventSequence?: string | null;
3423
- }
3424
- /** @oneof */
3425
- export interface DomainEventBodyOneOf {
3426
- createdEvent?: EntityCreatedEvent;
3427
- updatedEvent?: EntityUpdatedEvent;
3428
- deletedEvent?: EntityDeletedEvent;
3429
- actionEvent?: ActionEvent;
3430
- }
3431
- export interface EntityCreatedEvent {
3432
- entity?: string;
3433
- }
3434
- export interface RestoreInfo {
3435
- deletedDate?: Date | null;
3436
- }
3437
- export interface EntityUpdatedEvent {
3438
- /**
3439
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3440
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3441
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3442
- */
3443
- currentEntity?: string;
3444
- }
3445
- export interface EntityDeletedEvent {
3446
- /** Entity that was deleted */
3447
- deletedEntity?: string | null;
3448
- }
3449
- export interface ActionEvent {
3450
- body?: string;
3451
- }
3452
- export interface MessageEnvelope {
3453
- /**
3454
- * App instance ID.
3455
- * @format GUID
3456
- */
3457
- instanceId?: string | null;
3458
- /**
3459
- * Event type.
3460
- * @maxLength 150
3461
- */
3462
- eventType?: string;
3463
- /** The identification type and identity data. */
3464
- identity?: IdentificationData;
3465
- /** Stringify payload. */
3466
- data?: string;
3467
- }
3468
- export interface IdentificationData extends IdentificationDataIdOneOf {
3469
- /**
3470
- * ID of a site visitor that has not logged in to the site.
3471
- * @format GUID
3472
- */
3473
- anonymousVisitorId?: string;
3474
- /**
3475
- * ID of a site visitor that has logged in to the site.
3476
- * @format GUID
3477
- */
3478
- memberId?: string;
3479
- /**
3480
- * ID of a Wix user (site owner, contributor, etc.).
3481
- * @format GUID
3482
- */
3483
- wixUserId?: string;
3484
- /**
3485
- * ID of an app.
3486
- * @format GUID
3487
- */
3488
- appId?: string;
3489
- /** @readonly */
3490
- identityType?: WebhookIdentityType;
3491
- }
3492
- /** @oneof */
3493
- export interface IdentificationDataIdOneOf {
3494
- /**
3495
- * ID of a site visitor that has not logged in to the site.
3496
- * @format GUID
3497
- */
3498
- anonymousVisitorId?: string;
3499
- /**
3500
- * ID of a site visitor that has logged in to the site.
3501
- * @format GUID
3502
- */
3503
- memberId?: string;
3504
- /**
3505
- * ID of a Wix user (site owner, contributor, etc.).
3506
- * @format GUID
3507
- */
3508
- wixUserId?: string;
3509
- /**
3510
- * ID of an app.
3511
- * @format GUID
3512
- */
3513
- appId?: string;
3514
- }
3515
- export declare enum WebhookIdentityType {
3516
- UNKNOWN = "UNKNOWN",
3517
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3518
- MEMBER = "MEMBER",
3519
- WIX_USER = "WIX_USER",
3520
- APP = "APP"
3521
- }
3522
- export interface BaseEventMetadata {
3523
- /**
3524
- * App instance ID.
3525
- * @format GUID
3526
- */
3527
- instanceId?: string | null;
3528
- /**
3529
- * Event type.
3530
- * @maxLength 150
3531
- */
3532
- eventType?: string;
3533
- /** The identification type and identity data. */
3534
- identity?: IdentificationData;
3535
- }
3536
- export interface EventMetadata extends BaseEventMetadata {
3537
- /**
3538
- * Unique event ID.
3539
- * Allows clients to ignore duplicate webhooks.
3540
- */
3541
- _id?: string;
3542
- /**
3543
- * Assumes actions are also always typed to an entity_type
3544
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3545
- */
3546
- entityFqdn?: string;
3547
- /**
3548
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3549
- * This is although the created/updated/deleted notion is duplication of the oneof types
3550
- * Example: created/updated/deleted/started/completed/email_opened
3551
- */
3552
- slug?: string;
3553
- /** ID of the entity associated with the event. */
3554
- entityId?: string;
3555
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3556
- eventTime?: Date | null;
3557
- /**
3558
- * Whether the event was triggered as a result of a privacy regulation application
3559
- * (for example, GDPR).
3560
- */
3561
- triggeredByAnonymizeRequest?: boolean | null;
3562
- /** If present, indicates the action that triggered the event. */
3563
- originatedFrom?: string | null;
3564
- /**
3565
- * A sequence number defining the order of updates to the underlying entity.
3566
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
3567
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3568
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3569
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
3570
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3571
- */
3572
- entityEventSequence?: string | null;
3573
- }
3574
- export interface CheckoutCompletedEnvelope {
3575
- data: CheckoutMarkedAsCompleted;
3576
- metadata: EventMetadata;
3577
- }
3578
- /**
3579
- * Triggered when an order created from this checkout is
3580
- * successfully paid for or when a checkout is marked as completed.
3581
- * @permissionScope Manage Stores - all permissions
3582
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3583
- * @permissionScope Read eCommerce - all read permissions
3584
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3585
- * @permissionScope Read Orders
3586
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3587
- * @permissionScope Read Stores - all read permissions
3588
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3589
- * @permissionScope Manage Restaurants - all permissions
3590
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3591
- * @permissionScope Manage eCommerce - all permissions
3592
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3593
- * @permissionScope Picasso private app mega scope
3594
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3595
- * @permissionScope Manage Orders
3596
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3597
- * @permissionId ECOM.READ_CHECKOUTS
3598
- * @webhook
3599
- * @eventType wix.ecom.v1.checkout_completed
3600
- * @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
3601
- * @slug completed
3602
- */
3603
- export declare function onCheckoutCompleted(handler: (event: CheckoutCompletedEnvelope) => void | Promise<void>): void;
3604
- export interface CheckoutCreatedEnvelope {
3605
- entity: Checkout;
3606
- metadata: EventMetadata;
3607
- }
3608
- /**
3609
- * Triggered when a checkout is created.
3610
- * @permissionScope Manage Stores - all permissions
3611
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3612
- * @permissionScope Read eCommerce - all read permissions
3613
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3614
- * @permissionScope Read Orders
3615
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3616
- * @permissionScope Read Stores - all read permissions
3617
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3618
- * @permissionScope Manage Restaurants - all permissions
3619
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3620
- * @permissionScope Manage eCommerce - all permissions
3621
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3622
- * @permissionScope Picasso private app mega scope
3623
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3624
- * @permissionScope Manage Orders
3625
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3626
- * @permissionId ECOM.READ_CHECKOUTS
3627
- * @webhook
3628
- * @eventType wix.ecom.v1.checkout_created
3629
- * @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
3630
- * @slug created
3631
- */
3632
- export declare function onCheckoutCreated(handler: (event: CheckoutCreatedEnvelope) => void | Promise<void>): void;
3633
- export interface CheckoutUpdatedEnvelope {
3634
- entity: Checkout;
3635
- metadata: EventMetadata;
3636
- }
3637
- /**
3638
- * Triggered when a checkout is updated.
3639
- * @permissionScope Manage Stores - all permissions
3640
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3641
- * @permissionScope Read eCommerce - all read permissions
3642
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3643
- * @permissionScope Read Orders
3644
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3645
- * @permissionScope Read Stores - all read permissions
3646
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3647
- * @permissionScope Manage Restaurants - all permissions
3648
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3649
- * @permissionScope Manage eCommerce - all permissions
3650
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3651
- * @permissionScope Picasso private app mega scope
3652
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3653
- * @permissionScope Manage Orders
3654
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3655
- * @permissionId ECOM.READ_CHECKOUTS
3656
- * @webhook
3657
- * @eventType wix.ecom.v1.checkout_updated
3658
- * @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
3659
- * @slug updated
3660
- */
3661
- export declare function onCheckoutUpdated(handler: (event: CheckoutUpdatedEnvelope) => void | Promise<void>): void;
3662
- 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`;
3663
- /**
3664
- * Creates a checkout.
3665
- *
3666
- *
3667
- * The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created.
3668
- *
3669
- * > **Notes:**
3670
- * > + Checkout must include at least 1 item in the `options.lineItems` array.
3671
- * > + `options.channelType` is required.
3672
- * > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.
3673
- * > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required.
3674
- * @public
3675
- * @requiredField options.channelType
3676
- * @requiredField options.checkoutInfo.customFields.value
3677
- * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships._id
3678
- * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.appId
3679
- * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.lineItemIds
3680
- * @requiredField options.customLineItems.descriptionLines.name
3681
- * @requiredField options.customLineItems.descriptionLines.value
3682
- * @requiredField options.customLineItems.itemType
3683
- * @requiredField options.customLineItems.price
3684
- * @requiredField options.customLineItems.productName
3685
- * @requiredField options.customLineItems.quantity
3686
- * @requiredField options.lineItems.catalogReference
3687
- * @requiredField options.lineItems.catalogReference.appId
3688
- * @requiredField options.lineItems.catalogReference.catalogItemId
3689
- * @requiredField options.lineItems.quantity
3690
- * @param options - Checkout creation options.
3691
- * @permissionId ECOM.MODIFY_CHECKOUTS
3692
- * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
3693
- * @permissionScope Manage Stores - all permissions
3694
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3695
- * @permissionScope Manage Restaurants - all permissions
3696
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3697
- * @permissionScope Manage eCommerce - all permissions
3698
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3699
- * @permissionScope Picasso private app mega scope
3700
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3701
- * @permissionScope Manage Orders
3702
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3703
- * @permissionScope Manage Stores - all permissions
3704
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3705
- * @permissionScope Manage eCommerce - Admin Permissions
3706
- * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
3707
- * @permissionScope Manage Restaurants - all permissions
3708
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3709
- * @permissionScope Manage eCommerce - all permissions
3710
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3711
- * @permissionScope Picasso private app mega scope
3712
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3713
- * @applicableIdentity APP
3714
- * @applicableIdentity VISITOR
3715
- * @returns Fulfilled - the newly created checkout.
3716
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout
3717
- */
3718
- 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>>;
3719
- export interface CreateCheckoutOptions {
3720
- /** Checkout information. */
3721
- checkoutInfo?: Checkout;
3722
- /** 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). */
3723
- couponCode?: string | null;
3724
- /**
3725
- * Catalog line items to add to the checkout.
3726
- * @maxSize 300
3727
- */
3728
- lineItems?: LineItem[];
3729
- /**
3730
- * Custom line items to add to the checkout. Custom line items don't trigger the Catalog service plugin.
3731
- *
3732
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
3733
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
3734
- * @maxSize 300
3735
- */
3736
- customLineItems?: CustomLineItem[];
3737
- /** Sales channel that submitted the order. */
3738
- channelType: ChannelType;
3739
- /**
3740
- * Gift card code.
3741
- *
3742
- * The checkout can only hold 1 `giftCardCode` at a time. If an additional `giftCardCode` is added, it will override the existing `giftCardCode`.
3743
- *
3744
- * >**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).
3745
- */
3746
- giftCardCode?: string | null;
3747
- /**
3748
- * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
3749
- *
3750
- * 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`.
3751
- * @maxLength 1000
3752
- */
3753
- overrideCheckoutUrl?: string | null;
3754
- }
3755
- /**
3756
- * Retrieves a checkout.
3757
- *
3758
- *
3759
- * The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.
3760
- * @param _id - Checkout ID.
3761
- * @public
3762
- * @requiredField _id
3763
- * @permissionId ECOM.READ_CHECKOUTS
3764
- * @permissionScope Manage Stores - all permissions
3765
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3766
- * @permissionScope Read eCommerce - all read permissions
3767
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3768
- * @permissionScope Read Orders
3769
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3770
- * @permissionScope Read Stores - all read permissions
3771
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3772
- * @permissionScope Manage Restaurants - all permissions
3773
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3774
- * @permissionScope Manage eCommerce - all permissions
3775
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3776
- * @permissionScope Picasso private app mega scope
3777
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3778
- * @permissionScope Manage Orders
3779
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3780
- * @applicableIdentity APP
3781
- * @applicableIdentity VISITOR
3782
- * @returns Fulfilled - the requested checkout.
3783
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout
3784
- */
3785
- export declare function getCheckout(_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
3786
- /**
3787
- * Retrieves the checkout associated with a specified cart.
3788
- * @param _id - Cart ID.
3789
- * @public
3790
- * @requiredField _id
3791
- * @permissionId ECOM.READ_CHECKOUTS
3792
- * @permissionScope Manage Stores - all permissions
3793
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3794
- * @permissionScope Read eCommerce - all read permissions
3795
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3796
- * @permissionScope Read Orders
3797
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3798
- * @permissionScope Read Stores - all read permissions
3799
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3800
- * @permissionScope Manage Restaurants - all permissions
3801
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3802
- * @permissionScope Manage eCommerce - all permissions
3803
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3804
- * @permissionScope Picasso private app mega scope
3805
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3806
- * @permissionScope Manage Orders
3807
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3808
- * @applicableIdentity APP
3809
- * @applicableIdentity VISITOR
3810
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutByCartId
3811
- */
3812
- export declare function getCheckoutByCartId(_id: string): Promise<NonNullablePaths<GetCheckoutByCartIdResponse, {
3813
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
3814
- }[CheckoutNonNullablePaths]>>;
3815
- /**
3816
- * Deprecated and will be removed soon, use GetCheckoutURL
3817
- * @param _id - Checkout ID.
3818
- * @internal
3819
- * @documentationMaturity preview
3820
- * @requiredField _id
3821
- * @permissionId ECOM.READ_CHECKOUTS
3822
- * @permissionScope Manage Stores - all permissions
3823
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3824
- * @permissionScope Read eCommerce - all read permissions
3825
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3826
- * @permissionScope Read Orders
3827
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3828
- * @permissionScope Read Stores - all read permissions
3829
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3830
- * @permissionScope Manage Restaurants - all permissions
3831
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3832
- * @permissionScope Manage eCommerce - all permissions
3833
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3834
- * @permissionScope Picasso private app mega scope
3835
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3836
- * @permissionScope Manage Orders
3837
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3838
- * @applicableIdentity APP
3839
- * @applicableIdentity VISITOR
3840
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetWixCheckoutURL
3841
- */
3842
- export declare function getWixCheckoutUrl(_id: string): Promise<NonNullablePaths<GetWixCheckoutURLResponse, `checkoutUrl`>>;
3843
- /**
3844
- * Retrieves the checkout page URL of a specified checkout.
3845
- *
3846
- * By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.
3847
- * However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
3848
- * @param _id - Checkout ID.
3849
- * @public
3850
- * @requiredField _id
3851
- * @permissionId ECOM.READ_CHECKOUTS
3852
- * @permissionScope Manage Stores - all permissions
3853
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3854
- * @permissionScope Read eCommerce - all read permissions
3855
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3856
- * @permissionScope Read Orders
3857
- * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3858
- * @permissionScope Read Stores - all read permissions
3859
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3860
- * @permissionScope Manage Restaurants - all permissions
3861
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3862
- * @permissionScope Manage eCommerce - all permissions
3863
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3864
- * @permissionScope Picasso private app mega scope
3865
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3866
- * @permissionScope Manage Orders
3867
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3868
- * @applicableIdentity APP
3869
- * @applicableIdentity VISITOR
3870
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutURL
3871
- */
3872
- export declare function getCheckoutUrl(_id: string): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`>>;
3873
- /**
3874
- * Updates a checkout.
3875
- *
3876
- *
3877
- * The `updateCheckout()` function returns a Promise that resolves to the updated checkout when the specified properties are updated.
3878
- *
3879
- * >**Notes:**
3880
- * > + If nothing is passed in the request, the call will fail.
3881
- * > + The `checkout.buyerInfo.email` may not be removed once it is set.
3882
- * @param _id - Checkout ID.
3883
- * @public
3884
- * @requiredField _id
3885
- * @requiredField checkout
3886
- * @requiredField checkout.customFields.value
3887
- * @requiredField checkout.membershipOptions.selectedMemberships.memberships._id
3888
- * @requiredField checkout.membershipOptions.selectedMemberships.memberships.appId
3889
- * @requiredField checkout.membershipOptions.selectedMemberships.memberships.lineItemIds
3890
- * @requiredField options.customLineItems.descriptionLines.name
3891
- * @requiredField options.customLineItems.descriptionLines.value
3892
- * @requiredField options.customLineItems.itemType
3893
- * @requiredField options.customLineItems.productName
3894
- * @requiredField options.customLineItems.quantity
3895
- * @requiredField options.lineItems.catalogReference
3896
- * @requiredField options.lineItems.catalogReference.appId
3897
- * @requiredField options.lineItems.catalogReference.catalogItemId
3898
- * @requiredField options.lineItems.quantity
3899
- * @param options - Checkout update options.
3900
- * @permissionId ECOM.MODIFY_CHECKOUTS
3901
- * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
3902
- * @permissionScope Manage Stores - all permissions
3903
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3904
- * @permissionScope Manage Restaurants - all permissions
3905
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3906
- * @permissionScope Manage eCommerce - all permissions
3907
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3908
- * @permissionScope Picasso private app mega scope
3909
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3910
- * @permissionScope Manage Orders
3911
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3912
- * @permissionScope Manage Stores - all permissions
3913
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3914
- * @permissionScope Manage eCommerce - Admin Permissions
3915
- * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
3916
- * @permissionScope Manage Restaurants - all permissions
3917
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3918
- * @permissionScope Manage eCommerce - all permissions
3919
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3920
- * @permissionScope Picasso private app mega scope
3921
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
3922
- * @applicableIdentity APP
3923
- * @applicableIdentity VISITOR
3924
- * @returns Updated checkout.
3925
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateCheckout
3926
- */
3927
- 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>>;
3928
- export interface UpdateCheckout {
3929
- /**
3930
- * Checkout ID.
3931
- * @format GUID
3932
- * @readonly
3933
- */
3934
- _id?: string | null;
3935
- /**
3936
- * Line items.
3937
- *
3938
- * Max: 300 items
3939
- * @minSize 1
3940
- * @maxSize 300
3941
- * @readonly
3942
- */
3943
- lineItems?: LineItem[];
3944
- /** Billing information. */
3945
- billingInfo?: AddressWithContact;
3946
- /** Shipping information. */
3947
- shippingInfo?: ShippingInfo;
3948
- /**
3949
- * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
3950
- * @maxLength 1000
3951
- */
3952
- buyerNote?: string | null;
3953
- /** Buyer information. */
3954
- buyerInfo?: BuyerInfo;
3955
- /**
3956
- * All converted prices are displayed in this currency in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
3957
- * @readonly
3958
- * @format CURRENCY
3959
- */
3960
- conversionCurrency?: string;
3961
- /**
3962
- * Calculated price summary for the checkout.
3963
- * @readonly
3964
- */
3965
- priceSummary?: PriceSummary;
3966
- /**
3967
- * Errors when calculating totals.
3968
- * @readonly
3969
- */
3970
- calculationErrors?: CalculationErrors;
3971
- /**
3972
- * Applied gift card details.
3973
- *
3974
- * >**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).
3975
- * @readonly
3976
- */
3977
- giftCard?: GiftCard;
3978
- /**
3979
- * Applied discounts.
3980
- * @readonly
3981
- */
3982
- appliedDiscounts?: AppliedDiscount[];
3983
- /** Custom fields. */
3984
- customFields?: CustomField[];
3985
- /**
3986
- * Weight measurement unit. Defaults to a site's weight unit.
3987
- * @readonly
3988
- */
3989
- weightUnit?: WeightUnit;
3990
- /**
3991
- * Tax summary.
3992
- * @readonly
3993
- */
3994
- taxSummary?: TaxSummary;
3995
- /**
3996
- * The currency used when submitting the order.
3997
- * @format CURRENCY
3998
- * @readonly
3999
- */
4000
- currency?: string;
4001
- /**
4002
- * Sales channel that submitted the order.
4003
- * @readonly
4004
- */
4005
- channelType?: ChannelType;
4006
- /**
4007
- * Site language in which original values are shown.
4008
- * @readonly
4009
- */
4010
- siteLanguage?: string;
4011
- /**
4012
- * Language for communication with the buyer. Defaults to the site language.
4013
- * For a site that supports multiple languages, this is the language the buyer selected.
4014
- * @readonly
4015
- */
4016
- buyerLanguage?: string;
4017
- /**
4018
- * Whether an order was successfully created from this checkout.
4019
- * For an order to be successful, it must be successfully paid for (unless the total is 0).
4020
- * @readonly
4021
- */
4022
- completed?: boolean;
4023
- /**
4024
- * Whether tax is included in line item prices.
4025
- * @readonly
4026
- */
4027
- taxIncludedInPrice?: boolean;
4028
- /**
4029
- * ID of the checkout's initiator.
4030
- * @readonly
4031
- */
4032
- createdBy?: CreatedBy;
4033
- /**
4034
- * Date and time the checkout was created.
4035
- * @readonly
4036
- */
4037
- _createdDate?: Date | null;
4038
- /**
4039
- * Date and time the checkout was updated.
4040
- * @readonly
4041
- */
4042
- _updatedDate?: Date | null;
4043
- /**
4044
- * Minimal amount to pay in order to place the order.
4045
- * @readonly
4046
- */
4047
- payNow?: PriceSummary;
4048
- /**
4049
- * Remaining amount for the order to be fully paid.
4050
- * @readonly
4051
- */
4052
- payLater?: PriceSummary;
4053
- /** Memberships to apply when creating the order. */
4054
- membershipOptions?: MembershipOptions;
4055
- /**
4056
- * Additional Fees.
4057
- * @maxSize 100
4058
- */
4059
- additionalFees?: AdditionalFee[];
4060
- /**
4061
- * Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart.
4062
- * @format GUID
4063
- */
4064
- cartId?: string | null;
4065
- /**
4066
- * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).
4067
- * @readonly
4068
- */
4069
- violations?: Violation[];
4070
- /**
4071
- * Custom field data for the checkout object.
4072
- *
4073
- * [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.
4074
- */
4075
- extendedFields?: ExtendedFields;
4076
- /**
4077
- * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
4078
- * @format GUID
4079
- * @readonly
4080
- */
4081
- purchaseFlowId?: string | null;
4082
- /**
4083
- * Additional settings for customization of the checkout process.
4084
- *
4085
- * Custom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout).
4086
- * @immutable
4087
- */
4088
- customSettings?: CustomSettings;
4089
- /**
4090
- * Reference IDs for the app and component providing custom checkout page content.
4091
- *
4092
- * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
4093
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
4094
- */
4095
- customContentReference?: CustomContentReference;
4096
- /**
4097
- * Order ID.
4098
- *
4099
- * This field is empty until the checkout completes and becomes an order.
4100
- * @internal
4101
- * @format GUID
4102
- * @readonly
4103
- */
4104
- orderId?: string | null;
4105
- /**
4106
- * Payment for subscriptions after free trial period.
4107
- * @internal
4108
- * @readonly
4109
- */
4110
- payAfterFreeTrial?: PriceSummary;
4111
- /**
4112
- * The business location ID associated with the checkout.
4113
- *
4114
- * To learn more, see the Locations API.
4115
- * @format GUID
4116
- */
4117
- businessLocationId?: string | null;
4118
- /**
4119
- * Whether payment is required to create an order.
4120
- *
4121
- * Payment is required if any of the following conditions are met:
4122
- * 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.
4123
- * 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.
4124
- * @internal
4125
- * @readonly
4126
- */
4127
- paymentRequired?: boolean;
4128
- /**
4129
- * Charges information for each subscription in the checkout.
4130
- * @internal
4131
- * @readonly
4132
- * @maxSize 100
4133
- */
4134
- subscriptionCharges?: SubscriptionCharges[];
4135
- }
4136
- export interface UpdateCheckoutOptions {
4137
- /** 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). */
4138
- couponCode?: string | null;
4139
- /** Gift card code. */
4140
- giftCardCode?: string | null;
4141
- /**
4142
- * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
4143
- *
4144
- * 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`.
4145
- * @maxLength 1000
4146
- */
4147
- overrideCheckoutUrl?: string | null;
4148
- /**
4149
- * Catalog line items.
4150
- * @maxSize 300
4151
- */
4152
- lineItems?: LineItem[];
4153
- /**
4154
- * Custom line items. Custom line items don't trigger the Catalog service plugin.
4155
- *
4156
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
4157
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
4158
- * @maxSize 300
4159
- */
4160
- customLineItems?: CustomLineItem[];
4161
- }
4162
- /**
4163
- * Removes the coupon from a specified checkout.
4164
- *
4165
- *
4166
- * The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.
4167
- *
4168
- * >**Note:** A checkout can only hold 1 coupon.
4169
- * @param _id - ID of the checkout to remove the coupon from.
4170
- * @public
4171
- * @requiredField _id
4172
- * @permissionId ECOM.MODIFY_CHECKOUTS
4173
- * @permissionScope Manage Stores - all permissions
4174
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4175
- * @permissionScope Manage Restaurants - all permissions
4176
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4177
- * @permissionScope Manage eCommerce - all permissions
4178
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4179
- * @permissionScope Picasso private app mega scope
4180
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4181
- * @permissionScope Manage Orders
4182
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4183
- * @applicableIdentity APP
4184
- * @applicableIdentity VISITOR
4185
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveCoupon
4186
- */
4187
- export declare function removeCoupon(_id: string): Promise<NonNullablePaths<RemoveCouponResponse, {
4188
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4189
- }[CheckoutNonNullablePaths]>>;
4190
- /**
4191
- * Removes the gift card from a specified checkout.
4192
- *
4193
- *
4194
- * The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.
4195
- *
4196
- * >**Note:** A checkout can only hold 1 gift card.
4197
- * @param _id - ID of the checkout to remove the gift card from.
4198
- * @public
4199
- * @requiredField _id
4200
- * @permissionId ECOM.MODIFY_CHECKOUTS
4201
- * @permissionScope Manage Stores - all permissions
4202
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4203
- * @permissionScope Manage Restaurants - all permissions
4204
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4205
- * @permissionScope Manage eCommerce - all permissions
4206
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4207
- * @permissionScope Picasso private app mega scope
4208
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4209
- * @permissionScope Manage Orders
4210
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4211
- * @applicableIdentity APP
4212
- * @applicableIdentity VISITOR
4213
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveGiftCard
4214
- */
4215
- export declare function removeGiftCard(_id: string): Promise<NonNullablePaths<RemoveGiftCardResponse, {
4216
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4217
- }[CheckoutNonNullablePaths]>>;
4218
- /**
4219
- * Removes the `overrideCheckoutUrl` from a specified checkout.
4220
- *
4221
- * When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard
4222
- * Wix checkout page URL.
4223
- * @param _id - ID of the checkout to remove the override checkout url from.
4224
- * @public
4225
- * @requiredField _id
4226
- * @permissionId ECOM.MODIFY_CHECKOUTS
4227
- * @permissionScope Manage Stores - all permissions
4228
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4229
- * @permissionScope Manage Restaurants - all permissions
4230
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4231
- * @permissionScope Manage eCommerce - all permissions
4232
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4233
- * @permissionScope Picasso private app mega scope
4234
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4235
- * @permissionScope Manage Orders
4236
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4237
- * @applicableIdentity APP
4238
- * @applicableIdentity VISITOR
4239
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveOverrideCheckoutUrl
4240
- */
4241
- export declare function removeOverrideCheckoutUrl(_id: string): Promise<NonNullablePaths<RemoveOverrideCheckoutUrlResponse, {
4242
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4243
- }[CheckoutNonNullablePaths]>>;
4244
- /**
4245
- * Adds catalog line items and/or custom line items to a checkout.
4246
- *
4247
- *
4248
- * The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added.
4249
- * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
4250
- * @param _id - Checkout ID.
4251
- * @public
4252
- * @requiredField _id
4253
- * @requiredField options.customLineItems.descriptionLines.name
4254
- * @requiredField options.customLineItems.descriptionLines.value
4255
- * @requiredField options.customLineItems.itemType
4256
- * @requiredField options.customLineItems.productName
4257
- * @requiredField options.customLineItems.quantity
4258
- * @requiredField options.lineItems.catalogReference
4259
- * @requiredField options.lineItems.catalogReference.appId
4260
- * @requiredField options.lineItems.catalogReference.catalogItemId
4261
- * @requiredField options.lineItems.quantity
4262
- * @param options - Items to be added to checkout.
4263
- * @permissionId ECOM.MODIFY_CHECKOUTS
4264
- * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
4265
- * @permissionScope Manage Stores - all permissions
4266
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4267
- * @permissionScope Manage Restaurants - all permissions
4268
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4269
- * @permissionScope Manage eCommerce - all permissions
4270
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4271
- * @permissionScope Picasso private app mega scope
4272
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4273
- * @permissionScope Manage Orders
4274
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4275
- * @permissionScope Manage Stores - all permissions
4276
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4277
- * @permissionScope Manage eCommerce - Admin Permissions
4278
- * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
4279
- * @permissionScope Manage Restaurants - all permissions
4280
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4281
- * @permissionScope Manage eCommerce - all permissions
4282
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4283
- * @permissionScope Picasso private app mega scope
4284
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4285
- * @applicableIdentity APP
4286
- * @applicableIdentity VISITOR
4287
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.AddToCheckout
4288
- */
4289
- 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, {
4290
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4291
- }[CheckoutNonNullablePaths]>>;
4292
- export interface AddToCheckoutOptions {
4293
- /**
4294
- * Catalog line items.
4295
- * @maxSize 100
4296
- */
4297
- lineItems?: LineItem[];
4298
- /**
4299
- * Custom line items. Custom line items don't trigger the Catalog service plugin.
4300
- *
4301
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
4302
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
4303
- * @maxSize 100
4304
- */
4305
- customLineItems?: CustomLineItem[];
4306
- }
4307
- /**
4308
- * Removes line items from the specified checkout.
4309
- *
4310
- *
4311
- * The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.
4312
- * @param _id - ID of the checkout to remove line items from.
4313
- * @public
4314
- * @requiredField _id
4315
- * @requiredField lineItemIds
4316
- * @param lineItemIds - IDs of the line items to be removed.
4317
- * 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`.
4318
- * @permissionId ECOM.MODIFY_CHECKOUTS
4319
- * @permissionScope Manage Stores - all permissions
4320
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4321
- * @permissionScope Manage Restaurants - all permissions
4322
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4323
- * @permissionScope Manage eCommerce - all permissions
4324
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4325
- * @permissionScope Picasso private app mega scope
4326
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4327
- * @permissionScope Manage Orders
4328
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4329
- * @applicableIdentity APP
4330
- * @applicableIdentity VISITOR
4331
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveLineItems
4332
- */
4333
- export declare function removeLineItems(_id: string, lineItemIds: string[]): Promise<NonNullablePaths<RemoveLineItemsResponse, {
4334
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4335
- }[CheckoutNonNullablePaths]>>;
4336
- /**
4337
- * Creates an order from a specified checkout.
4338
- *
4339
- * The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created.
4340
- * 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.
4341
- *
4342
- * > **Note:** The following requirements must be met for an order to be created from a checkout.
4343
- * > + 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.
4344
- * > + A checkout must have at least 1 line item.
4345
- * > + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
4346
- * > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.
4347
- * > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.
4348
- * > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided.
4349
- * @param _id - Checkout ID.
4350
- * @public
4351
- * @requiredField _id
4352
- * @param options - Further order creation options.
4353
- * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
4354
- * @permissionScope Manage Stores - all permissions
4355
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4356
- * @permissionScope Manage Restaurants - all permissions
4357
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4358
- * @permissionScope Manage eCommerce - all permissions
4359
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4360
- * @permissionScope Picasso private app mega scope
4361
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4362
- * @permissionScope Manage Orders
4363
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4364
- * @applicableIdentity APP
4365
- * @applicableIdentity VISITOR
4366
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrder
4367
- */
4368
- export declare function createOrder(_id: string, options?: CreateOrderOptions): Promise<NonNullablePaths<CreateOrderResponse, `orderId` | `subscriptionId`>>;
4369
- export interface CreateOrderOptions {
4370
- /** Whether the payment method should be saved on the order. */
4371
- savePaymentMethod?: boolean;
4372
- /** Whether to authorize the payment and delay the capture. */
4373
- delayCapture?: boolean;
4374
- }
4375
- /**
4376
- * Deprecated (use createOrder instead)
4377
- * @param _id - Checkout ID.
4378
- * @internal
4379
- * @documentationMaturity preview
4380
- * @requiredField _id
4381
- * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
4382
- * @permissionScope Manage Stores - all permissions
4383
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4384
- * @permissionScope Manage Restaurants - all permissions
4385
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4386
- * @permissionScope Manage eCommerce - all permissions
4387
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4388
- * @permissionScope Picasso private app mega scope
4389
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4390
- * @permissionScope Manage Orders
4391
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4392
- * @applicableIdentity APP
4393
- * @applicableIdentity VISITOR
4394
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrderAndCharge
4395
- */
4396
- export declare function createOrderAndCharge(_id: string, options?: CreateOrderAndChargeOptions): Promise<NonNullablePaths<CreateOrderAndChargeResponse, `orderId` | `subscriptionId`>>;
4397
- export interface CreateOrderAndChargeOptions {
4398
- /** Payment token. */
4399
- paymentToken?: string | null;
4400
- /** Whether the payment method should be saved on the order. */
4401
- savePaymentMethod?: boolean;
4402
- /** Whether to authorize the payment and delay the capture. */
4403
- delayCapture?: boolean;
4404
- }
4405
- /**
4406
- * Marks a checkout as completed and redirects to a specified URL.
4407
- * @param token - Server-signed JWT token with required information to complete checkout
4408
- * @internal
4409
- * @documentationMaturity preview
4410
- * @requiredField token
4411
- * @permissionId ECOM.MODIFY_CHECKOUTS
4412
- * @permissionScope Manage Stores - all permissions
4413
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4414
- * @permissionScope Manage Restaurants - all permissions
4415
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4416
- * @permissionScope Manage eCommerce - all permissions
4417
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4418
- * @permissionScope Picasso private app mega scope
4419
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4420
- * @permissionScope Manage Orders
4421
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4422
- * @applicableIdentity APP
4423
- * @applicableIdentity VISITOR
4424
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompletedAndRedirectToUrl
4425
- */
4426
- export declare function markCheckoutAsCompletedAndRedirectToUrl(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`>>;
4427
- /**
4428
- * Marks a checkout as completed - `checkout.complete` boolean is set to `true`.
4429
- *
4430
- *
4431
- * The `markCheckoutAsCompleted()` function returns a Promise that resolves when the specified checkout is marked as completed.
4432
- * @param _id - Checkout ID.
4433
- * @public
4434
- * @requiredField _id
4435
- * @permissionId ECOM.MODIFY_CHECKOUTS
4436
- * @permissionScope Manage Stores - all permissions
4437
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4438
- * @permissionScope Manage Restaurants - all permissions
4439
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4440
- * @permissionScope Manage eCommerce - all permissions
4441
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4442
- * @permissionScope Picasso private app mega scope
4443
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4444
- * @permissionScope Manage Orders
4445
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4446
- * @applicableIdentity APP
4447
- * @applicableIdentity VISITOR
4448
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompleted
4449
- */
4450
- export declare function markCheckoutAsCompleted(_id: string): Promise<void>;
4451
- /**
4452
- * Updates the quantity of one or more line items in a checkout.
4453
- *
4454
- * This endpoint is only for updating the quantity of line items. To entirely remove a line item from
4455
- * the checkout, use [`removeLineItems()`](#removelineitems).
4456
- * To add a new line item to the checkout, use [`addToCheckout()`](#addtocheckout).
4457
- *
4458
- * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity`
4459
- * is greater than the remaining stock, then the `quantity` returned in the response is the total amount
4460
- * of remaining stock.
4461
- * @param _id - Checkout ID.
4462
- * @param lineItems - Line item info to update.
4463
- * @public
4464
- * @requiredField _id
4465
- * @requiredField lineItems
4466
- * @requiredField lineItems._id
4467
- * @requiredField lineItems.quantity
4468
- * @permissionId ECOM.MODIFY_CHECKOUTS
4469
- * @permissionScope Manage Stores - all permissions
4470
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4471
- * @permissionScope Manage Restaurants - all permissions
4472
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4473
- * @permissionScope Manage eCommerce - all permissions
4474
- * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4475
- * @permissionScope Picasso private app mega scope
4476
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
4477
- * @permissionScope Manage Orders
4478
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4479
- * @applicableIdentity APP
4480
- * @applicableIdentity VISITOR
4481
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateLineItemsQuantity
4482
- */
4483
- export declare function updateLineItemsQuantity(_id: string, lineItems: NonNullablePaths<LineItemQuantityUpdate, `_id` | `quantity`>[]): Promise<NonNullablePaths<UpdateLineItemsQuantityResponse, {
4484
- [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4485
- }[CheckoutNonNullablePaths]>>;
4486
- /** @param _id - Checkout ID.
4487
- * @internal
4488
- * @documentationMaturity preview
4489
- * @requiredField _id
4490
- * @permissionId ECOM.READ_PAYMENT_SETTINGS
4491
- * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutPaymentSettings
4492
- */
4493
- export declare function getCheckoutPaymentSettings(_id: string): Promise<NonNullablePaths<GetCheckoutPaymentSettingsResponse, `blockedPaymentOptions`>>;
4494
- export {};