POST

Create Checkout


Creates a checkout.

Note: For more information on what to pass to lineItems.catalogReference, see eCommerce Integration in the Wix Stores Catalog API.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Manage eCommerce - Admin Permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/ecom/v1/checkouts

Body Params
checkoutInfoCheckoutInfo

Checkout information.


couponCodestring

Coupon code.


lineItemsArray <LineItem>maxItems 300

Catalog line items to add to the checkout.


customLineItemsArray <CustomLineItem>betamaxItems 300

Custom line items to add to the checkout. Custom line items don't trigger the Catalog service plugin.

To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about permission scopes.


channelTypestringRequired

Sales channel that submitted the order.

  • "UNSPECIFIED": Unspecified sales channel. This value is not supported.
  • "WEB": A web client.
  • "POS": Point of sale solutions
  • "EBAY": eBay
  • "AMAZON": Amazon
  • "WISH": Wish
  • "WIX_INVOICES": Wix Invoices app in your dashboard
  • "WIX_APP_STORE": Wix Owner app
  • "BACKOFFICE_MERCHANT": Wix merchant backoffice
  • "OTHER_PLATFORM": Other sales platform.

giftCardCodestring

Gift card code.

The checkout can only hold 1 giftCardCode at a time. If an additional giftCardCode is added, it will override the existing giftCardCode.

Note: Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about Wix Gift Cards.


overrideCheckoutUrlstringmaxLength 1000

overrideCheckoutUrl allows the flexibility to redirect customers to a customized checkout page.

This field overrides the checkoutUrl in a cart or checkout. checkoutUrl is used in the Abandoned Checkout API 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.

Response Object
checkoutCheckout

Newly created checkout.

Request
cURL
curl -X POST \ 'https://www.wixapis.com/ecom/v1/checkouts' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ -d '{ "lineItems": [ { "quantity": 10, "catalogReference": { "catalogItemId": "36d373dc-d992-2fe0-42be-887754c730b9", "appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" } } ], "channelType": "WEB" }'
Response
JSON
{ "checkout": { "id": "98efbd87-8097-44e9-9005-72093d7a21d5", "lineItems": [ { "id": "00000000-0000-0000-0000-000000000001", "quantity": 10, "catalogReference": { "catalogItemId": "6b332137-422d-c53b-57b1-5130e01c7e0c", "appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e" }, "productName": { "original": "T-shirt", "translated": "T-shirt" }, "url": { "relativePath": "/product-page/t-shirt", "url": "https://wixsite.com/coffeestore" }, "price": { "amount": "45", "convertedAmount": "45", "formattedAmount": "$45.00", "formattedConvertedAmount": "$45.00" }, "fullPrice": { "amount": "50", "convertedAmount": "50", "formattedAmount": "$50.00", "formattedConvertedAmount": "$50.00" }, "totalPriceAfterTax": { "amount": "450", "convertedAmount": "450", "formattedAmount": "$450.00", "formattedConvertedAmount": "$450.00" }, "totalPriceBeforeTax": { "amount": "450", "convertedAmount": "450", "formattedAmount": "$450.00", "formattedConvertedAmount": "$450.00" }, "taxDetails": { "taxableAmount": { "amount": "450", "convertedAmount": "450", "formattedAmount": "$450.00", "formattedConvertedAmount": "$450.00" }, "taxRate": "0", "totalTax": { "amount": "0", "convertedAmount": "0", "formattedAmount": "$0.00", "formattedConvertedAmount": "$0.00" }, "rateBreakdown": [] }, "discount": { "amount": "0", "convertedAmount": "0", "formattedAmount": "$0.00", "formattedConvertedAmount": "$0.00" }, "descriptionLines": [], "media": { "id": "47ab5a_b162aea573dd4e708e2e6c21536a0f5e~mv2.png", "url": "https://static.wixstatic.com/media/47ab5a_b162aea573dd4e708e2e6c21536a0f5e~mv2.png/v1/fit/w_4032,h_3024,q_90/file.png", "height": 3024, "width": 4032 }, "availability": { "status": "AVAILABLE" }, "physicalProperties": { "weight": 0.1, "sku": "1234", "shippable": true }, "couponScopes": [ { "namespace": "stores", "group": { "name": "product", "entityId": "6b332137-422d-c53b-57b1-5130e01c7e0c" } } ], "itemType": { "preset": "PHYSICAL" } } ], "shippingInfo": { "carrierServiceOptions": [] }, "buyerInfo": { "visitorId": "9cef4c21-ad14-4a3b-8526-0d8628160965" }, "conversionCurrency": "USD", "priceSummary": { "subtotal": { "amount": "450", "convertedAmount": "450", "formattedAmount": "$450.00", "formattedConvertedAmount": "$450.00" }, "shipping": { "amount": "0", "convertedAmount": "0", "formattedAmount": "$0.00", "formattedConvertedAmount": "$0.00" }, "tax": { "amount": "0", "convertedAmount": "0", "formattedAmount": "$0.00", "formattedConvertedAmount": "$0.00" }, "discount": { "amount": "0", "convertedAmount": "0", "formattedAmount": "$0.00", "formattedConvertedAmount": "$0.00" }, "total": { "amount": "450", "convertedAmount": "450", "formattedAmount": "$450.00", "formattedConvertedAmount": "$450.00" } }, "calculationErrors": {}, "appliedDiscounts": [], "customFields": [], "weightUnit": "KG", "currency": "USD", "channelType": "WEB", "siteLanguage": "en", "buyerLanguage": "en", "completed": false, "taxIncludedInPrice": true, "createdBy": { "visitorId": "9cef4c21-ad14-4a3b-8526-0d8628160965" } } }
Errors
404Not Found

There are 4 errors with this status code.

428Failed Precondition

There are 9 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?