@wix/auto_sdk_ecom_checkout 1.0.35 → 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.universal.d.ts +102 -94
- 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.universal.d.ts +102 -94
- 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.universal.d.ts +102 -94
- 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.universal.d.ts +102 -94
- 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;
|
|
@@ -458,11 +458,9 @@ export interface CatalogReference {
|
|
|
458
458
|
*/
|
|
459
459
|
appId?: string;
|
|
460
460
|
/**
|
|
461
|
-
* Additional item details in key:value pairs.
|
|
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.
|
|
462
462
|
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
* 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).
|
|
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)).
|
|
466
464
|
*/
|
|
467
465
|
options?: Record<string, any> | null;
|
|
468
466
|
}
|
|
@@ -692,7 +690,7 @@ export declare enum ItemAvailabilityStatus {
|
|
|
692
690
|
/** @enumType */
|
|
693
691
|
export type ItemAvailabilityStatusWithLiterals = ItemAvailabilityStatus | 'AVAILABLE' | 'NOT_FOUND' | 'NOT_AVAILABLE' | 'PARTIALLY_AVAILABLE';
|
|
694
692
|
export interface PhysicalProperties {
|
|
695
|
-
/** Line item weight. Measurement unit
|
|
693
|
+
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
696
694
|
weight?: number | null;
|
|
697
695
|
/**
|
|
698
696
|
* Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
@@ -1387,19 +1385,19 @@ export interface OtherCharge {
|
|
|
1387
1385
|
}
|
|
1388
1386
|
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
1389
1387
|
/**
|
|
1390
|
-
* Visitor ID
|
|
1388
|
+
* Visitor ID (if site visitor is **not** a member).
|
|
1391
1389
|
* @format GUID
|
|
1392
1390
|
* @readonly
|
|
1393
1391
|
*/
|
|
1394
1392
|
visitorId?: string;
|
|
1395
1393
|
/**
|
|
1396
|
-
* Member ID
|
|
1394
|
+
* Member ID (if site visitor is a site member).
|
|
1397
1395
|
* @format GUID
|
|
1398
1396
|
* @readonly
|
|
1399
1397
|
*/
|
|
1400
1398
|
memberId?: string;
|
|
1401
1399
|
/**
|
|
1402
|
-
* 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.
|
|
1403
1401
|
* @format GUID
|
|
1404
1402
|
* @readonly
|
|
1405
1403
|
*/
|
|
@@ -1413,13 +1411,13 @@ export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
|
1413
1411
|
/** @oneof */
|
|
1414
1412
|
export interface BuyerInfoIdOneOf {
|
|
1415
1413
|
/**
|
|
1416
|
-
* Visitor ID
|
|
1414
|
+
* Visitor ID (if site visitor is **not** a member).
|
|
1417
1415
|
* @format GUID
|
|
1418
1416
|
* @readonly
|
|
1419
1417
|
*/
|
|
1420
1418
|
visitorId?: string;
|
|
1421
1419
|
/**
|
|
1422
|
-
* Member ID
|
|
1420
|
+
* Member ID (if site visitor is a site member).
|
|
1423
1421
|
* @format GUID
|
|
1424
1422
|
* @readonly
|
|
1425
1423
|
*/
|
|
@@ -1606,7 +1604,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
1606
1604
|
/** Discount type. */
|
|
1607
1605
|
discountType?: DiscountTypeWithLiterals;
|
|
1608
1606
|
/**
|
|
1609
|
-
* IDs of
|
|
1607
|
+
* IDs of line items the discount applies to.
|
|
1610
1608
|
* @format GUID
|
|
1611
1609
|
* @deprecated IDs of line items the discount applies to.
|
|
1612
1610
|
* @replacedBy line_items_discounts
|
|
@@ -1930,7 +1928,7 @@ export interface Membership {
|
|
|
1930
1928
|
/** The name of this membership. */
|
|
1931
1929
|
name?: MembershipName;
|
|
1932
1930
|
/**
|
|
1933
|
-
* Line item IDs which are "paid for
|
|
1931
|
+
* Line item IDs which are "paid" for by this membership.
|
|
1934
1932
|
* @minSize 1
|
|
1935
1933
|
* @maxSize 300
|
|
1936
1934
|
* @minLength 1
|
|
@@ -2247,7 +2245,7 @@ export interface UpdatedCheckoutMessage {
|
|
|
2247
2245
|
export interface CreateCheckoutRequest {
|
|
2248
2246
|
/** Checkout information. */
|
|
2249
2247
|
checkoutInfo?: Checkout;
|
|
2250
|
-
/**
|
|
2248
|
+
/** Coupon code. */
|
|
2251
2249
|
couponCode?: string | null;
|
|
2252
2250
|
/**
|
|
2253
2251
|
* Catalog line items to add to the checkout.
|
|
@@ -2275,7 +2273,9 @@ export interface CreateCheckoutRequest {
|
|
|
2275
2273
|
/**
|
|
2276
2274
|
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
2277
2275
|
*
|
|
2278
|
-
* 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`.
|
|
2279
2279
|
* @maxLength 1000
|
|
2280
2280
|
*/
|
|
2281
2281
|
overrideCheckoutUrl?: string | null;
|
|
@@ -2291,7 +2291,7 @@ export interface CustomLineItem {
|
|
|
2291
2291
|
*/
|
|
2292
2292
|
quantity?: number;
|
|
2293
2293
|
/**
|
|
2294
|
-
* 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.
|
|
2295
2295
|
* @format DECIMAL_VALUE
|
|
2296
2296
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
2297
2297
|
*/
|
|
@@ -2299,7 +2299,7 @@ export interface CustomLineItem {
|
|
|
2299
2299
|
/** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
|
|
2300
2300
|
priceDescription?: PriceDescription;
|
|
2301
2301
|
/**
|
|
2302
|
-
* Custom line item description lines. Used for
|
|
2302
|
+
* Custom line item description lines. Used for display purposes for the cart, checkout and order.
|
|
2303
2303
|
* @maxSize 10
|
|
2304
2304
|
*/
|
|
2305
2305
|
descriptionLines?: DescriptionLine[];
|
|
@@ -2478,7 +2478,7 @@ export interface MerchantDiscountInput {
|
|
|
2478
2478
|
*/
|
|
2479
2479
|
amount?: string;
|
|
2480
2480
|
/**
|
|
2481
|
-
* IDs of
|
|
2481
|
+
* IDs of line items the discount applies to.
|
|
2482
2482
|
* @format GUID
|
|
2483
2483
|
* @maxSize 300
|
|
2484
2484
|
*/
|
|
@@ -2555,14 +2555,20 @@ export interface GetCheckoutURLResponse {
|
|
|
2555
2555
|
export interface UpdateCheckoutRequest {
|
|
2556
2556
|
/** Checkout information. */
|
|
2557
2557
|
checkout: Checkout;
|
|
2558
|
-
/**
|
|
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
|
+
*/
|
|
2559
2563
|
couponCode?: string | null;
|
|
2560
2564
|
/** Gift card code. */
|
|
2561
2565
|
giftCardCode?: string | null;
|
|
2562
2566
|
/**
|
|
2563
2567
|
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
2564
2568
|
*
|
|
2565
|
-
* 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`.
|
|
2566
2572
|
* @maxLength 1000
|
|
2567
2573
|
*/
|
|
2568
2574
|
overrideCheckoutUrl?: string | null;
|
|
@@ -2649,6 +2655,10 @@ export interface RemoveLineItemsRequest {
|
|
|
2649
2655
|
_id: string;
|
|
2650
2656
|
/**
|
|
2651
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`.
|
|
2652
2662
|
* @format GUID
|
|
2653
2663
|
* @minSize 1
|
|
2654
2664
|
* @maxSize 300
|
|
@@ -2672,7 +2682,7 @@ export interface CreateOrderRequest {
|
|
|
2672
2682
|
}
|
|
2673
2683
|
export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
|
|
2674
2684
|
/**
|
|
2675
|
-
* ID of
|
|
2685
|
+
* ID of newly created order.
|
|
2676
2686
|
* @format GUID
|
|
2677
2687
|
*/
|
|
2678
2688
|
orderId?: string;
|
|
@@ -2685,10 +2695,11 @@ export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
|
|
|
2685
2695
|
* Payment gateway order ID.
|
|
2686
2696
|
*
|
|
2687
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.
|
|
2688
2699
|
*
|
|
2689
|
-
*
|
|
2690
|
-
* + When the total price (the `priceSummary.total.amount` field in the checkout/order objects) is 0
|
|
2691
|
-
* + 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.
|
|
2692
2703
|
*/
|
|
2693
2704
|
paymentGatewayOrderId?: string | null;
|
|
2694
2705
|
}
|
|
@@ -2757,12 +2768,11 @@ export interface CreateOrderAndChargeResponse extends CreateOrderAndChargeRespon
|
|
|
2757
2768
|
/** Payment response token. */
|
|
2758
2769
|
paymentResponseToken?: string | null;
|
|
2759
2770
|
/**
|
|
2760
|
-
*
|
|
2761
|
-
*
|
|
2762
|
-
*
|
|
2763
|
-
*
|
|
2764
|
-
*
|
|
2765
|
-
* + 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
|
|
2766
2776
|
*/
|
|
2767
2777
|
paymentGatewayOrderId?: string | null;
|
|
2768
2778
|
/**
|
|
@@ -3771,14 +3781,9 @@ type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `
|
|
|
3771
3781
|
/**
|
|
3772
3782
|
* Creates a checkout.
|
|
3773
3783
|
*
|
|
3784
|
+
* A checkout must include at least 1 item in `lineItems` or `customLineItems`.
|
|
3774
3785
|
*
|
|
3775
|
-
*
|
|
3776
|
-
*
|
|
3777
|
-
* > **Notes:**
|
|
3778
|
-
* > + Checkout must include at least 1 item in the `options.lineItems` array.
|
|
3779
|
-
* > + `options.channelType` is required.
|
|
3780
|
-
* > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.
|
|
3781
|
-
* > + 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.
|
|
3782
3787
|
* @public
|
|
3783
3788
|
* @requiredField options.channelType
|
|
3784
3789
|
* @requiredField options.checkoutInfo.customFields.value
|
|
@@ -3820,14 +3825,14 @@ type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `
|
|
|
3820
3825
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3821
3826
|
* @applicableIdentity APP
|
|
3822
3827
|
* @applicableIdentity VISITOR
|
|
3823
|
-
* @returns
|
|
3828
|
+
* @returns Newly created checkout.
|
|
3824
3829
|
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout
|
|
3825
3830
|
*/
|
|
3826
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>>;
|
|
3827
3832
|
export interface CreateCheckoutOptions {
|
|
3828
3833
|
/** Checkout information. */
|
|
3829
3834
|
checkoutInfo?: Checkout;
|
|
3830
|
-
/**
|
|
3835
|
+
/** Coupon code. */
|
|
3831
3836
|
couponCode?: string | null;
|
|
3832
3837
|
/**
|
|
3833
3838
|
* Catalog line items to add to the checkout.
|
|
@@ -3855,16 +3860,15 @@ export interface CreateCheckoutOptions {
|
|
|
3855
3860
|
/**
|
|
3856
3861
|
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
3857
3862
|
*
|
|
3858
|
-
* 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`.
|
|
3859
3866
|
* @maxLength 1000
|
|
3860
3867
|
*/
|
|
3861
3868
|
overrideCheckoutUrl?: string | null;
|
|
3862
3869
|
}
|
|
3863
3870
|
/**
|
|
3864
3871
|
* Retrieves a checkout.
|
|
3865
|
-
*
|
|
3866
|
-
*
|
|
3867
|
-
* The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.
|
|
3868
3872
|
* @param _id - Checkout ID.
|
|
3869
3873
|
* @public
|
|
3870
3874
|
* @requiredField _id
|
|
@@ -3887,7 +3891,7 @@ export interface CreateCheckoutOptions {
|
|
|
3887
3891
|
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3888
3892
|
* @applicableIdentity APP
|
|
3889
3893
|
* @applicableIdentity VISITOR
|
|
3890
|
-
* @returns
|
|
3894
|
+
* @returns Retrieved checkout.
|
|
3891
3895
|
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout
|
|
3892
3896
|
*/
|
|
3893
3897
|
export declare function getCheckout(_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
|
|
@@ -3981,8 +3985,15 @@ export declare function getCheckoutUrl(_id: string): Promise<NonNullablePaths<Ge
|
|
|
3981
3985
|
/**
|
|
3982
3986
|
* Updates a checkout.
|
|
3983
3987
|
*
|
|
3988
|
+
* Use this method to update checkout fields such as billing and shipping info, or to add a coupon code or gift card.
|
|
3984
3989
|
*
|
|
3985
|
-
*
|
|
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.
|
|
3986
3997
|
*
|
|
3987
3998
|
* >**Notes:**
|
|
3988
3999
|
* > + If nothing is passed in the request, the call will fail.
|
|
@@ -4054,7 +4065,7 @@ export interface UpdateCheckout {
|
|
|
4054
4065
|
/** Shipping information. */
|
|
4055
4066
|
shippingInfo?: ShippingInfo;
|
|
4056
4067
|
/**
|
|
4057
|
-
* [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.
|
|
4058
4069
|
* @maxLength 1000
|
|
4059
4070
|
*/
|
|
4060
4071
|
buyerNote?: string | null;
|
|
@@ -4173,7 +4184,7 @@ export interface UpdateCheckout {
|
|
|
4173
4184
|
*/
|
|
4174
4185
|
cartId?: string | null;
|
|
4175
4186
|
/**
|
|
4176
|
-
* 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)).
|
|
4177
4188
|
* @readonly
|
|
4178
4189
|
*/
|
|
4179
4190
|
violations?: Violation[];
|
|
@@ -4192,7 +4203,9 @@ export interface UpdateCheckout {
|
|
|
4192
4203
|
/**
|
|
4193
4204
|
* Additional settings for customization of the checkout process.
|
|
4194
4205
|
*
|
|
4195
|
-
*
|
|
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).
|
|
4196
4209
|
* @immutable
|
|
4197
4210
|
*/
|
|
4198
4211
|
customSettings?: CustomSettings;
|
|
@@ -4255,14 +4268,20 @@ export interface UpdateCheckout {
|
|
|
4255
4268
|
paymentCurrency?: string;
|
|
4256
4269
|
}
|
|
4257
4270
|
export interface UpdateCheckoutOptions {
|
|
4258
|
-
/**
|
|
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
|
+
*/
|
|
4259
4276
|
couponCode?: string | null;
|
|
4260
4277
|
/** Gift card code. */
|
|
4261
4278
|
giftCardCode?: string | null;
|
|
4262
4279
|
/**
|
|
4263
4280
|
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
4264
4281
|
*
|
|
4265
|
-
* 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`.
|
|
4266
4285
|
* @maxLength 1000
|
|
4267
4286
|
*/
|
|
4268
4287
|
overrideCheckoutUrl?: string | null;
|
|
@@ -4282,11 +4301,6 @@ export interface UpdateCheckoutOptions {
|
|
|
4282
4301
|
}
|
|
4283
4302
|
/**
|
|
4284
4303
|
* Removes the coupon from a specified checkout.
|
|
4285
|
-
*
|
|
4286
|
-
*
|
|
4287
|
-
* The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.
|
|
4288
|
-
*
|
|
4289
|
-
* >**Note:** A checkout can only hold 1 coupon.
|
|
4290
4304
|
* @param _id - ID of the checkout to remove the coupon from.
|
|
4291
4305
|
* @public
|
|
4292
4306
|
* @requiredField _id
|
|
@@ -4311,10 +4325,7 @@ export declare function removeCoupon(_id: string): Promise<NonNullablePaths<Remo
|
|
|
4311
4325
|
/**
|
|
4312
4326
|
* Removes the gift card from a specified checkout.
|
|
4313
4327
|
*
|
|
4314
|
-
*
|
|
4315
|
-
* The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.
|
|
4316
|
-
*
|
|
4317
|
-
* >**Note:** A checkout can only hold 1 gift card.
|
|
4328
|
+
* A checkout can only hold 1 gift card.
|
|
4318
4329
|
* @param _id - ID of the checkout to remove the gift card from.
|
|
4319
4330
|
* @public
|
|
4320
4331
|
* @requiredField _id
|
|
@@ -4365,9 +4376,8 @@ export declare function removeOverrideCheckoutUrl(_id: string): Promise<NonNulla
|
|
|
4365
4376
|
/**
|
|
4366
4377
|
* Adds catalog line items and/or custom line items to a checkout.
|
|
4367
4378
|
*
|
|
4368
|
-
*
|
|
4369
|
-
*
|
|
4370
|
-
* > **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.
|
|
4371
4381
|
* @param _id - Checkout ID.
|
|
4372
4382
|
* @public
|
|
4373
4383
|
* @requiredField _id
|
|
@@ -4427,15 +4437,15 @@ export interface AddToCheckoutOptions {
|
|
|
4427
4437
|
}
|
|
4428
4438
|
/**
|
|
4429
4439
|
* Removes line items from the specified checkout.
|
|
4430
|
-
*
|
|
4431
|
-
*
|
|
4432
|
-
* The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.
|
|
4433
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`.
|
|
4434
4446
|
* @public
|
|
4435
4447
|
* @requiredField _id
|
|
4436
4448
|
* @requiredField lineItemIds
|
|
4437
|
-
* @param lineItemIds - IDs of the line items to be removed.
|
|
4438
|
-
* 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`.
|
|
4439
4449
|
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
4440
4450
|
* @permissionScope Manage Stores - all permissions
|
|
4441
4451
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4457,20 +4467,17 @@ export declare function removeLineItems(_id: string, lineItemIds: string[]): Pro
|
|
|
4457
4467
|
/**
|
|
4458
4468
|
* Creates an order from a specified checkout.
|
|
4459
4469
|
*
|
|
4460
|
-
*
|
|
4461
|
-
*
|
|
4462
|
-
*
|
|
4463
|
-
*
|
|
4464
|
-
*
|
|
4465
|
-
*
|
|
4466
|
-
*
|
|
4467
|
-
* > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.
|
|
4468
|
-
* > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.
|
|
4469
|
-
* > + 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.
|
|
4470
4477
|
* @param _id - Checkout ID.
|
|
4471
4478
|
* @public
|
|
4472
4479
|
* @requiredField _id
|
|
4473
|
-
* @param options -
|
|
4480
|
+
* @param options - Additional order creation options.
|
|
4474
4481
|
* @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
|
|
4475
4482
|
* @permissionScope Manage Stores - all permissions
|
|
4476
4483
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4546,10 +4553,11 @@ export interface CreateOrderAndChargeOptions {
|
|
|
4546
4553
|
*/
|
|
4547
4554
|
export declare function markCheckoutAsCompletedAndRedirectToUrl(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`>>;
|
|
4548
4555
|
/**
|
|
4549
|
-
*
|
|
4550
|
-
*
|
|
4556
|
+
* Sets `completed` to `true` to mark a checkout as completed.
|
|
4551
4557
|
*
|
|
4552
|
-
*
|
|
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.
|
|
4553
4561
|
* @param _id - Checkout ID.
|
|
4554
4562
|
* @public
|
|
4555
4563
|
* @requiredField _id
|
|
@@ -4572,11 +4580,11 @@ export declare function markCheckoutAsCompleted(_id: string): Promise<void>;
|
|
|
4572
4580
|
/**
|
|
4573
4581
|
* Updates the quantity of one or more line items in a checkout.
|
|
4574
4582
|
*
|
|
4575
|
-
* This
|
|
4576
|
-
* the checkout, use
|
|
4577
|
-
* 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.
|
|
4578
4586
|
*
|
|
4579
|
-
* This
|
|
4587
|
+
* This method checks the amount of stock remaining for this line item. If the specified `quantity`
|
|
4580
4588
|
* is greater than the remaining stock, then the `quantity` returned in the response is the total amount
|
|
4581
4589
|
* of remaining stock.
|
|
4582
4590
|
* @param _id - Checkout ID.
|