@wix/auto_sdk_ecom_checkout 1.0.34 → 1.0.36
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.
- package/build/cjs/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
- package/build/cjs/src/ecom-v1-checkout-checkout.http.js +31 -52
- package/build/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -1
- package/build/cjs/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
- package/build/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -1
- package/build/cjs/src/ecom-v1-checkout-checkout.types.d.ts +18 -2
- package/build/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -1
- package/build/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +120 -96
- package/build/cjs/src/ecom-v1-checkout-checkout.universal.js +36 -48
- package/build/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
- package/build/es/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
- package/build/es/src/ecom-v1-checkout-checkout.http.js +31 -52
- package/build/es/src/ecom-v1-checkout-checkout.http.js.map +1 -1
- package/build/es/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
- package/build/es/src/ecom-v1-checkout-checkout.public.js.map +1 -1
- package/build/es/src/ecom-v1-checkout-checkout.types.d.ts +18 -2
- package/build/es/src/ecom-v1-checkout-checkout.types.js.map +1 -1
- package/build/es/src/ecom-v1-checkout-checkout.universal.d.ts +120 -96
- package/build/es/src/ecom-v1-checkout-checkout.universal.js +36 -48
- package/build/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js +31 -52
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.d.ts +18 -2
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +106 -101
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js +36 -48
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
- package/build/internal/es/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
- package/build/internal/es/src/ecom-v1-checkout-checkout.http.js +31 -52
- package/build/internal/es/src/ecom-v1-checkout-checkout.http.js.map +1 -1
- package/build/internal/es/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
- package/build/internal/es/src/ecom-v1-checkout-checkout.public.js.map +1 -1
- package/build/internal/es/src/ecom-v1-checkout-checkout.types.d.ts +18 -2
- package/build/internal/es/src/ecom-v1-checkout-checkout.types.js.map +1 -1
- package/build/internal/es/src/ecom-v1-checkout-checkout.universal.d.ts +106 -101
- package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js +36 -48
- package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -20,7 +20,7 @@ export interface Checkout {
|
|
|
20
20
|
/** Shipping information. */
|
|
21
21
|
shippingInfo?: ShippingInfo;
|
|
22
22
|
/**
|
|
23
|
-
* [Buyer note](https://support.wix.com/en/article/
|
|
23
|
+
* [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.
|
|
24
24
|
* @maxLength 1000
|
|
25
25
|
*/
|
|
26
26
|
buyerNote?: string | null;
|
|
@@ -139,7 +139,7 @@ export interface Checkout {
|
|
|
139
139
|
*/
|
|
140
140
|
cartId?: string | null;
|
|
141
141
|
/**
|
|
142
|
-
* List of validation violations raised by the
|
|
142
|
+
* List of validation violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
|
|
143
143
|
* @readonly
|
|
144
144
|
*/
|
|
145
145
|
violations?: Violation[];
|
|
@@ -158,7 +158,9 @@ export interface Checkout {
|
|
|
158
158
|
/**
|
|
159
159
|
* Additional settings for customization of the checkout process.
|
|
160
160
|
*
|
|
161
|
-
*
|
|
161
|
+
* > **Notes:**
|
|
162
|
+
* > * Custom settings can only be set when creating a checkout.
|
|
163
|
+
* > * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
162
164
|
* @immutable
|
|
163
165
|
*/
|
|
164
166
|
customSettings?: CustomSettings;
|
|
@@ -236,7 +238,7 @@ export interface LineItem {
|
|
|
236
238
|
* @max 100000
|
|
237
239
|
*/
|
|
238
240
|
quantity?: number;
|
|
239
|
-
/** Catalog and item reference.
|
|
241
|
+
/** 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. */
|
|
240
242
|
catalogReference?: CatalogReference;
|
|
241
243
|
/**
|
|
242
244
|
* Item name.
|
|
@@ -292,7 +294,7 @@ export interface LineItem {
|
|
|
292
294
|
*/
|
|
293
295
|
discount?: MultiCurrencyPrice;
|
|
294
296
|
/**
|
|
295
|
-
* Line item description lines. Used for
|
|
297
|
+
* Line item description lines. Used for display purposes for the cart, checkout and order.
|
|
296
298
|
* @readonly
|
|
297
299
|
*/
|
|
298
300
|
descriptionLines?: DescriptionLine[];
|
|
@@ -322,11 +324,9 @@ export interface LineItem {
|
|
|
322
324
|
*/
|
|
323
325
|
subscriptionOptionInfo?: SubscriptionOptionInfo;
|
|
324
326
|
/**
|
|
325
|
-
* Type of selected payment option for current item.
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
* + `"MEMBERSHIP"`: Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
|
|
329
|
-
* + `"DEPOSIT_ONLINE"`: Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.
|
|
327
|
+
* Type of selected payment option for current item.
|
|
328
|
+
*
|
|
329
|
+
* Default: `FULL_PAYMENT_ONLINE`
|
|
330
330
|
* @readonly
|
|
331
331
|
*/
|
|
332
332
|
paymentOption?: PaymentOptionTypeWithLiterals;
|
|
@@ -427,14 +427,12 @@ export interface LineItem {
|
|
|
427
427
|
membersOnly?: boolean;
|
|
428
428
|
/**
|
|
429
429
|
* Modifier groups that were added to the item.
|
|
430
|
-
* @internal
|
|
431
430
|
* @readonly
|
|
432
|
-
* @maxSize
|
|
431
|
+
* @maxSize 25
|
|
433
432
|
*/
|
|
434
433
|
modifierGroups?: ModifierGroup[];
|
|
435
434
|
/**
|
|
436
435
|
* Total price of all item modifiers. Included in the item price.
|
|
437
|
-
* @internal
|
|
438
436
|
* @readonly
|
|
439
437
|
*/
|
|
440
438
|
modifiersTotalPrice?: MultiCurrencyPrice;
|
|
@@ -460,11 +458,9 @@ export interface CatalogReference {
|
|
|
460
458
|
*/
|
|
461
459
|
appId?: string;
|
|
462
460
|
/**
|
|
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.
|
|
461
|
+
* Additional item details in key:value pairs. 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
462
|
*
|
|
467
|
-
* For products and variants from
|
|
463
|
+
* For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
|
|
468
464
|
*/
|
|
469
465
|
options?: Record<string, any> | null;
|
|
470
466
|
}
|
|
@@ -694,7 +690,7 @@ export declare enum ItemAvailabilityStatus {
|
|
|
694
690
|
/** @enumType */
|
|
695
691
|
export type ItemAvailabilityStatusWithLiterals = ItemAvailabilityStatus | 'AVAILABLE' | 'NOT_FOUND' | 'NOT_AVAILABLE' | 'PARTIALLY_AVAILABLE';
|
|
696
692
|
export interface PhysicalProperties {
|
|
697
|
-
/** Line item weight. Measurement unit
|
|
693
|
+
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
698
694
|
weight?: number | null;
|
|
699
695
|
/**
|
|
700
696
|
* Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
@@ -995,7 +991,7 @@ export interface ModifierGroup {
|
|
|
995
991
|
/**
|
|
996
992
|
* List of modifiers in this group.
|
|
997
993
|
* @minSize 1
|
|
998
|
-
* @maxSize
|
|
994
|
+
* @maxSize 25
|
|
999
995
|
*/
|
|
1000
996
|
modifiers?: ItemModifier[];
|
|
1001
997
|
}
|
|
@@ -1389,19 +1385,19 @@ export interface OtherCharge {
|
|
|
1389
1385
|
}
|
|
1390
1386
|
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
1391
1387
|
/**
|
|
1392
|
-
* Visitor ID
|
|
1388
|
+
* Visitor ID (if site visitor is **not** a member).
|
|
1393
1389
|
* @format GUID
|
|
1394
1390
|
* @readonly
|
|
1395
1391
|
*/
|
|
1396
1392
|
visitorId?: string;
|
|
1397
1393
|
/**
|
|
1398
|
-
* Member ID
|
|
1394
|
+
* Member ID (if site visitor is a site member).
|
|
1399
1395
|
* @format GUID
|
|
1400
1396
|
* @readonly
|
|
1401
1397
|
*/
|
|
1402
1398
|
memberId?: string;
|
|
1403
1399
|
/**
|
|
1404
|
-
* Contact ID. For more information, see the Contacts API.
|
|
1400
|
+
* Contact ID. Auto-created if one does not yet exist. For more information, see the Contacts API.
|
|
1405
1401
|
* @format GUID
|
|
1406
1402
|
* @readonly
|
|
1407
1403
|
*/
|
|
@@ -1415,13 +1411,13 @@ export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
|
1415
1411
|
/** @oneof */
|
|
1416
1412
|
export interface BuyerInfoIdOneOf {
|
|
1417
1413
|
/**
|
|
1418
|
-
* Visitor ID
|
|
1414
|
+
* Visitor ID (if site visitor is **not** a member).
|
|
1419
1415
|
* @format GUID
|
|
1420
1416
|
* @readonly
|
|
1421
1417
|
*/
|
|
1422
1418
|
visitorId?: string;
|
|
1423
1419
|
/**
|
|
1424
|
-
* Member ID
|
|
1420
|
+
* Member ID (if site visitor is a site member).
|
|
1425
1421
|
* @format GUID
|
|
1426
1422
|
* @readonly
|
|
1427
1423
|
*/
|
|
@@ -1608,7 +1604,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
1608
1604
|
/** Discount type. */
|
|
1609
1605
|
discountType?: DiscountTypeWithLiterals;
|
|
1610
1606
|
/**
|
|
1611
|
-
* IDs of
|
|
1607
|
+
* IDs of line items the discount applies to.
|
|
1612
1608
|
* @format GUID
|
|
1613
1609
|
* @deprecated IDs of line items the discount applies to.
|
|
1614
1610
|
* @replacedBy line_items_discounts
|
|
@@ -1932,7 +1928,7 @@ export interface Membership {
|
|
|
1932
1928
|
/** The name of this membership. */
|
|
1933
1929
|
name?: MembershipName;
|
|
1934
1930
|
/**
|
|
1935
|
-
* Line item IDs which are "paid for
|
|
1931
|
+
* Line item IDs which are "paid" for by this membership.
|
|
1936
1932
|
* @minSize 1
|
|
1937
1933
|
* @maxSize 300
|
|
1938
1934
|
* @minLength 1
|
|
@@ -2249,7 +2245,7 @@ export interface UpdatedCheckoutMessage {
|
|
|
2249
2245
|
export interface CreateCheckoutRequest {
|
|
2250
2246
|
/** Checkout information. */
|
|
2251
2247
|
checkoutInfo?: Checkout;
|
|
2252
|
-
/**
|
|
2248
|
+
/** Coupon code. */
|
|
2253
2249
|
couponCode?: string | null;
|
|
2254
2250
|
/**
|
|
2255
2251
|
* Catalog line items to add to the checkout.
|
|
@@ -2277,7 +2273,9 @@ export interface CreateCheckoutRequest {
|
|
|
2277
2273
|
/**
|
|
2278
2274
|
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
2279
2275
|
*
|
|
2280
|
-
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used
|
|
2276
|
+
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
|
|
2277
|
+
* to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
|
|
2278
|
+
* standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
2281
2279
|
* @maxLength 1000
|
|
2282
2280
|
*/
|
|
2283
2281
|
overrideCheckoutUrl?: string | null;
|
|
@@ -2293,7 +2291,7 @@ export interface CustomLineItem {
|
|
|
2293
2291
|
*/
|
|
2294
2292
|
quantity?: number;
|
|
2295
2293
|
/**
|
|
2296
|
-
* Custom line item price. For security reasons, the `price` field should come from backend
|
|
2294
|
+
* Custom line item price. For security reasons, the `price` field should come from backend code, and not be passed from the frontend.
|
|
2297
2295
|
* @format DECIMAL_VALUE
|
|
2298
2296
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
2299
2297
|
*/
|
|
@@ -2301,7 +2299,7 @@ export interface CustomLineItem {
|
|
|
2301
2299
|
/** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
|
|
2302
2300
|
priceDescription?: PriceDescription;
|
|
2303
2301
|
/**
|
|
2304
|
-
* Custom line item description lines. Used for
|
|
2302
|
+
* Custom line item description lines. Used for display purposes for the cart, checkout and order.
|
|
2305
2303
|
* @maxSize 10
|
|
2306
2304
|
*/
|
|
2307
2305
|
descriptionLines?: DescriptionLine[];
|
|
@@ -2430,8 +2428,7 @@ export interface CustomLineItem {
|
|
|
2430
2428
|
taxableAddress?: TaxableAddress;
|
|
2431
2429
|
/**
|
|
2432
2430
|
* Modifier groups that were added to the item.
|
|
2433
|
-
* @
|
|
2434
|
-
* @maxSize 10
|
|
2431
|
+
* @maxSize 25
|
|
2435
2432
|
*/
|
|
2436
2433
|
modifierGroups?: V1ModifierGroup[];
|
|
2437
2434
|
}
|
|
@@ -2447,7 +2444,7 @@ export interface V1ModifierGroup {
|
|
|
2447
2444
|
/**
|
|
2448
2445
|
* List of modifiers in this group.
|
|
2449
2446
|
* @minSize 1
|
|
2450
|
-
* @maxSize
|
|
2447
|
+
* @maxSize 25
|
|
2451
2448
|
*/
|
|
2452
2449
|
modifiers?: V1ItemModifier[];
|
|
2453
2450
|
}
|
|
@@ -2481,7 +2478,7 @@ export interface MerchantDiscountInput {
|
|
|
2481
2478
|
*/
|
|
2482
2479
|
amount?: string;
|
|
2483
2480
|
/**
|
|
2484
|
-
* IDs of
|
|
2481
|
+
* IDs of line items the discount applies to.
|
|
2485
2482
|
* @format GUID
|
|
2486
2483
|
* @maxSize 300
|
|
2487
2484
|
*/
|
|
@@ -2558,14 +2555,20 @@ export interface GetCheckoutURLResponse {
|
|
|
2558
2555
|
export interface UpdateCheckoutRequest {
|
|
2559
2556
|
/** Checkout information. */
|
|
2560
2557
|
checkout: Checkout;
|
|
2561
|
-
/**
|
|
2558
|
+
/**
|
|
2559
|
+
* Coupon code.
|
|
2560
|
+
*
|
|
2561
|
+
* The checkout can only hold 1 `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.
|
|
2562
|
+
*/
|
|
2562
2563
|
couponCode?: string | null;
|
|
2563
2564
|
/** Gift card code. */
|
|
2564
2565
|
giftCardCode?: string | null;
|
|
2565
2566
|
/**
|
|
2566
2567
|
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
2567
2568
|
*
|
|
2568
|
-
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used
|
|
2569
|
+
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
|
|
2570
|
+
* to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
|
|
2571
|
+
* standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
2569
2572
|
* @maxLength 1000
|
|
2570
2573
|
*/
|
|
2571
2574
|
overrideCheckoutUrl?: string | null;
|
|
@@ -2652,6 +2655,10 @@ export interface RemoveLineItemsRequest {
|
|
|
2652
2655
|
_id: string;
|
|
2653
2656
|
/**
|
|
2654
2657
|
* IDs of the line items to remove from the checkout.
|
|
2658
|
+
*
|
|
2659
|
+
* To find the IDs of the checkout line items you'd like to remove,
|
|
2660
|
+
* pass the checkout ID to Get Checkout and look for the IDs under
|
|
2661
|
+
* `lineItems`.
|
|
2655
2662
|
* @format GUID
|
|
2656
2663
|
* @minSize 1
|
|
2657
2664
|
* @maxSize 300
|
|
@@ -2675,7 +2682,7 @@ export interface CreateOrderRequest {
|
|
|
2675
2682
|
}
|
|
2676
2683
|
export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
|
|
2677
2684
|
/**
|
|
2678
|
-
* ID of
|
|
2685
|
+
* ID of newly created order.
|
|
2679
2686
|
* @format GUID
|
|
2680
2687
|
*/
|
|
2681
2688
|
orderId?: string;
|
|
@@ -2688,10 +2695,11 @@ export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
|
|
|
2688
2695
|
* Payment gateway order ID.
|
|
2689
2696
|
*
|
|
2690
2697
|
* 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.
|
|
2698
|
+
* `paymentGatewayOrderId` will be returned if money needs to be charged.
|
|
2691
2699
|
*
|
|
2692
|
-
*
|
|
2693
|
-
* + When the total price (the `priceSummary.total.amount` field in the checkout/order objects) is 0
|
|
2694
|
-
* + If the total price is not 0
|
|
2700
|
+
* In some cases, money cannot be charged:
|
|
2701
|
+
* + 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.
|
|
2702
|
+
* + If the total price is not `0`, but the payment is covered by alternative payment methods, such as a gift card.
|
|
2695
2703
|
*/
|
|
2696
2704
|
paymentGatewayOrderId?: string | null;
|
|
2697
2705
|
}
|
|
@@ -2760,12 +2768,11 @@ export interface CreateOrderAndChargeResponse extends CreateOrderAndChargeRespon
|
|
|
2760
2768
|
/** Payment response token. */
|
|
2761
2769
|
paymentResponseToken?: string | null;
|
|
2762
2770
|
/**
|
|
2763
|
-
*
|
|
2764
|
-
*
|
|
2765
|
-
*
|
|
2766
|
-
*
|
|
2767
|
-
*
|
|
2768
|
-
* + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card.
|
|
2771
|
+
* The payment gateway is cashier.
|
|
2772
|
+
* payment_gateway_order_id will be returned given that money was charged.
|
|
2773
|
+
* In some cases, money will not be charged:
|
|
2774
|
+
* If the total price is 0 - For example, could be a free item or a an item with 100% discount
|
|
2775
|
+
* If the total price is not 0, but the payment is covered by alternative payment methods such as gift card
|
|
2769
2776
|
*/
|
|
2770
2777
|
paymentGatewayOrderId?: string | null;
|
|
2771
2778
|
/**
|
|
@@ -3774,14 +3781,9 @@ type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `
|
|
|
3774
3781
|
/**
|
|
3775
3782
|
* Creates a checkout.
|
|
3776
3783
|
*
|
|
3784
|
+
* A checkout must include at least 1 item in `lineItems` or `customLineItems`.
|
|
3777
3785
|
*
|
|
3778
|
-
*
|
|
3779
|
-
*
|
|
3780
|
-
* > **Notes:**
|
|
3781
|
-
* > + Checkout must include at least 1 item in the `options.lineItems` array.
|
|
3782
|
-
* > + `options.channelType` is required.
|
|
3783
|
-
* > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.
|
|
3784
|
-
* > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required.
|
|
3786
|
+
* If passing `checkoutInfo.customFields`, then `checkoutInfo.customFields.value` is a required field.
|
|
3785
3787
|
* @public
|
|
3786
3788
|
* @requiredField options.channelType
|
|
3787
3789
|
* @requiredField options.checkoutInfo.customFields.value
|
|
@@ -3823,14 +3825,14 @@ type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `
|
|
|
3823
3825
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3824
3826
|
* @applicableIdentity APP
|
|
3825
3827
|
* @applicableIdentity VISITOR
|
|
3826
|
-
* @returns
|
|
3828
|
+
* @returns Newly created checkout.
|
|
3827
3829
|
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout
|
|
3828
3830
|
*/
|
|
3829
3831
|
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>>;
|
|
3830
3832
|
export interface CreateCheckoutOptions {
|
|
3831
3833
|
/** Checkout information. */
|
|
3832
3834
|
checkoutInfo?: Checkout;
|
|
3833
|
-
/**
|
|
3835
|
+
/** Coupon code. */
|
|
3834
3836
|
couponCode?: string | null;
|
|
3835
3837
|
/**
|
|
3836
3838
|
* Catalog line items to add to the checkout.
|
|
@@ -3858,16 +3860,15 @@ export interface CreateCheckoutOptions {
|
|
|
3858
3860
|
/**
|
|
3859
3861
|
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
3860
3862
|
*
|
|
3861
|
-
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used
|
|
3863
|
+
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
|
|
3864
|
+
* to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
|
|
3865
|
+
* standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
3862
3866
|
* @maxLength 1000
|
|
3863
3867
|
*/
|
|
3864
3868
|
overrideCheckoutUrl?: string | null;
|
|
3865
3869
|
}
|
|
3866
3870
|
/**
|
|
3867
3871
|
* Retrieves a checkout.
|
|
3868
|
-
*
|
|
3869
|
-
*
|
|
3870
|
-
* The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.
|
|
3871
3872
|
* @param _id - Checkout ID.
|
|
3872
3873
|
* @public
|
|
3873
3874
|
* @requiredField _id
|
|
@@ -3890,7 +3891,7 @@ export interface CreateCheckoutOptions {
|
|
|
3890
3891
|
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3891
3892
|
* @applicableIdentity APP
|
|
3892
3893
|
* @applicableIdentity VISITOR
|
|
3893
|
-
* @returns
|
|
3894
|
+
* @returns Retrieved checkout.
|
|
3894
3895
|
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout
|
|
3895
3896
|
*/
|
|
3896
3897
|
export declare function getCheckout(_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
|
|
@@ -3984,8 +3985,15 @@ export declare function getCheckoutUrl(_id: string): Promise<NonNullablePaths<Ge
|
|
|
3984
3985
|
/**
|
|
3985
3986
|
* Updates a checkout.
|
|
3986
3987
|
*
|
|
3988
|
+
* Use this method to update checkout fields such as billing and shipping info, or to add a coupon code or gift card.
|
|
3987
3989
|
*
|
|
3988
|
-
*
|
|
3990
|
+
* To update a checkout's `lineItems`, `completed` status, or to remove coupons and gift cards, see these methods:
|
|
3991
|
+
* + Add to Checkout: Add line items to the checkout.
|
|
3992
|
+
* + Update Line Items Quantity: Update the quantity of 1 or more line items in the checkout.
|
|
3993
|
+
* + Remove Line Items: Remove a line item from the checkout.
|
|
3994
|
+
* + Mark Checkout As Completed: To update `completed` to `true` if the checkout was completed through a non-Wix orders or payments system.
|
|
3995
|
+
* + Remove Coupon: To remove an applied coupon from the checkout.
|
|
3996
|
+
* + Remove Gift Card: To remove an applied gift card from the checkout.
|
|
3989
3997
|
*
|
|
3990
3998
|
* >**Notes:**
|
|
3991
3999
|
* > + If nothing is passed in the request, the call will fail.
|
|
@@ -4057,7 +4065,7 @@ export interface UpdateCheckout {
|
|
|
4057
4065
|
/** Shipping information. */
|
|
4058
4066
|
shippingInfo?: ShippingInfo;
|
|
4059
4067
|
/**
|
|
4060
|
-
* [Buyer note](https://support.wix.com/en/article/
|
|
4068
|
+
* [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.
|
|
4061
4069
|
* @maxLength 1000
|
|
4062
4070
|
*/
|
|
4063
4071
|
buyerNote?: string | null;
|
|
@@ -4176,7 +4184,7 @@ export interface UpdateCheckout {
|
|
|
4176
4184
|
*/
|
|
4177
4185
|
cartId?: string | null;
|
|
4178
4186
|
/**
|
|
4179
|
-
* List of validation violations raised by the
|
|
4187
|
+
* List of validation violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
|
|
4180
4188
|
* @readonly
|
|
4181
4189
|
*/
|
|
4182
4190
|
violations?: Violation[];
|
|
@@ -4195,7 +4203,9 @@ export interface UpdateCheckout {
|
|
|
4195
4203
|
/**
|
|
4196
4204
|
* Additional settings for customization of the checkout process.
|
|
4197
4205
|
*
|
|
4198
|
-
*
|
|
4206
|
+
* > **Notes:**
|
|
4207
|
+
* > * Custom settings can only be set when creating a checkout.
|
|
4208
|
+
* > * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
4199
4209
|
* @immutable
|
|
4200
4210
|
*/
|
|
4201
4211
|
customSettings?: CustomSettings;
|
|
@@ -4258,14 +4268,20 @@ export interface UpdateCheckout {
|
|
|
4258
4268
|
paymentCurrency?: string;
|
|
4259
4269
|
}
|
|
4260
4270
|
export interface UpdateCheckoutOptions {
|
|
4261
|
-
/**
|
|
4271
|
+
/**
|
|
4272
|
+
* Coupon code.
|
|
4273
|
+
*
|
|
4274
|
+
* The checkout can only hold 1 `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.
|
|
4275
|
+
*/
|
|
4262
4276
|
couponCode?: string | null;
|
|
4263
4277
|
/** Gift card code. */
|
|
4264
4278
|
giftCardCode?: string | null;
|
|
4265
4279
|
/**
|
|
4266
4280
|
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
4267
4281
|
*
|
|
4268
|
-
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used
|
|
4282
|
+
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
|
|
4283
|
+
* to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
|
|
4284
|
+
* standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
4269
4285
|
* @maxLength 1000
|
|
4270
4286
|
*/
|
|
4271
4287
|
overrideCheckoutUrl?: string | null;
|
|
@@ -4285,11 +4301,6 @@ export interface UpdateCheckoutOptions {
|
|
|
4285
4301
|
}
|
|
4286
4302
|
/**
|
|
4287
4303
|
* Removes the coupon from a specified checkout.
|
|
4288
|
-
*
|
|
4289
|
-
*
|
|
4290
|
-
* The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.
|
|
4291
|
-
*
|
|
4292
|
-
* >**Note:** A checkout can only hold 1 coupon.
|
|
4293
4304
|
* @param _id - ID of the checkout to remove the coupon from.
|
|
4294
4305
|
* @public
|
|
4295
4306
|
* @requiredField _id
|
|
@@ -4314,10 +4325,7 @@ export declare function removeCoupon(_id: string): Promise<NonNullablePaths<Remo
|
|
|
4314
4325
|
/**
|
|
4315
4326
|
* Removes the gift card from a specified checkout.
|
|
4316
4327
|
*
|
|
4317
|
-
*
|
|
4318
|
-
* The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.
|
|
4319
|
-
*
|
|
4320
|
-
* >**Note:** A checkout can only hold 1 gift card.
|
|
4328
|
+
* A checkout can only hold 1 gift card.
|
|
4321
4329
|
* @param _id - ID of the checkout to remove the gift card from.
|
|
4322
4330
|
* @public
|
|
4323
4331
|
* @requiredField _id
|
|
@@ -4368,9 +4376,8 @@ export declare function removeOverrideCheckoutUrl(_id: string): Promise<NonNulla
|
|
|
4368
4376
|
/**
|
|
4369
4377
|
* Adds catalog line items and/or custom line items to a checkout.
|
|
4370
4378
|
*
|
|
4371
|
-
*
|
|
4372
|
-
*
|
|
4373
|
-
* > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
|
|
4379
|
+
* When adding catalog ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)) items
|
|
4380
|
+
* to a checkout, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
|
|
4374
4381
|
* @param _id - Checkout ID.
|
|
4375
4382
|
* @public
|
|
4376
4383
|
* @requiredField _id
|
|
@@ -4430,15 +4437,15 @@ export interface AddToCheckoutOptions {
|
|
|
4430
4437
|
}
|
|
4431
4438
|
/**
|
|
4432
4439
|
* Removes line items from the specified checkout.
|
|
4433
|
-
*
|
|
4434
|
-
*
|
|
4435
|
-
* The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.
|
|
4436
4440
|
* @param _id - ID of the checkout to remove line items from.
|
|
4441
|
+
* @param lineItemIds - IDs of the line items to remove from the checkout.
|
|
4442
|
+
*
|
|
4443
|
+
* To find the IDs of the checkout line items you'd like to remove,
|
|
4444
|
+
* pass the checkout ID to Get Checkout and look for the IDs under
|
|
4445
|
+
* `lineItems`.
|
|
4437
4446
|
* @public
|
|
4438
4447
|
* @requiredField _id
|
|
4439
4448
|
* @requiredField lineItemIds
|
|
4440
|
-
* @param lineItemIds - IDs of the line items to be removed.
|
|
4441
|
-
* 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`.
|
|
4442
4449
|
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
4443
4450
|
* @permissionScope Manage Stores - all permissions
|
|
4444
4451
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4460,20 +4467,17 @@ export declare function removeLineItems(_id: string, lineItemIds: string[]): Pro
|
|
|
4460
4467
|
/**
|
|
4461
4468
|
* Creates an order from a specified checkout.
|
|
4462
4469
|
*
|
|
4463
|
-
*
|
|
4464
|
-
*
|
|
4465
|
-
*
|
|
4466
|
-
*
|
|
4467
|
-
*
|
|
4468
|
-
*
|
|
4469
|
-
*
|
|
4470
|
-
* > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.
|
|
4471
|
-
* > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.
|
|
4472
|
-
* > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided.
|
|
4470
|
+
* For an order to be created from a checkout, the following requirements must be met:
|
|
4471
|
+
* + A checkout cannot have calculation errors. Pass the checkout ID to Get Checkout and review the `calculationErrors` field.
|
|
4472
|
+
* + A checkout must have at least 1 line item or custom line item.
|
|
4473
|
+
* + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
|
|
4474
|
+
* + If there is a payment to be made, meaning that `priceSummary.total` is greater than `0`, the `billingInfo.address` field are required.
|
|
4475
|
+
* + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields are required.
|
|
4476
|
+
* + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field are required.
|
|
4473
4477
|
* @param _id - Checkout ID.
|
|
4474
4478
|
* @public
|
|
4475
4479
|
* @requiredField _id
|
|
4476
|
-
* @param options -
|
|
4480
|
+
* @param options - Additional order creation options.
|
|
4477
4481
|
* @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
|
|
4478
4482
|
* @permissionScope Manage Stores - all permissions
|
|
4479
4483
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4549,10 +4553,11 @@ export interface CreateOrderAndChargeOptions {
|
|
|
4549
4553
|
*/
|
|
4550
4554
|
export declare function markCheckoutAsCompletedAndRedirectToUrl(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`>>;
|
|
4551
4555
|
/**
|
|
4552
|
-
*
|
|
4553
|
-
*
|
|
4556
|
+
* Sets `completed` to `true` to mark a checkout as completed.
|
|
4554
4557
|
*
|
|
4555
|
-
*
|
|
4558
|
+
* When an order is completed through Wix, the `completed` field in the associated checkout object
|
|
4559
|
+
* will automatically be updated to `true`. If an order is completed through a separate system,
|
|
4560
|
+
* use this method to manually mark the checkout as completed.
|
|
4556
4561
|
* @param _id - Checkout ID.
|
|
4557
4562
|
* @public
|
|
4558
4563
|
* @requiredField _id
|
|
@@ -4575,11 +4580,11 @@ export declare function markCheckoutAsCompleted(_id: string): Promise<void>;
|
|
|
4575
4580
|
/**
|
|
4576
4581
|
* Updates the quantity of one or more line items in a checkout.
|
|
4577
4582
|
*
|
|
4578
|
-
* This
|
|
4579
|
-
* the checkout, use
|
|
4580
|
-
* To add a new line item to the checkout, use
|
|
4583
|
+
* This method is only for updating the quantity of line items. To entirely remove a line item from
|
|
4584
|
+
* the checkout, use the Remove Line Items method.
|
|
4585
|
+
* To add a new line item to the checkout, use the Add to Checkout method.
|
|
4581
4586
|
*
|
|
4582
|
-
* This
|
|
4587
|
+
* This method checks the amount of stock remaining for this line item. If the specified `quantity`
|
|
4583
4588
|
* is greater than the remaining stock, then the `quantity` returned in the response is the total amount
|
|
4584
4589
|
* of remaining stock.
|
|
4585
4590
|
* @param _id - Checkout ID.
|