@wix/auto_sdk_ecom_checkout 1.0.17 → 1.0.19

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