Checkout API
Check the new Checkout onboarding guide. We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about the Checkout and is organized by focusing on the developer's journey.
The Checkout API allows you to obtain and configure information about the shopping cart and its attachments, personalization of custom fields, orderForm structure, fulfillment data, order management, and identification of the sellers delivery region.
Data modification operations (
POST,PATCH,PUTorDELETEendpoints) shall not be performed in parallel in the Checkout APIs. They need to be enqueued by the client/requester. Otherwise, old values can be overwritten incorrectly or competition errors may occur.
All endpoints that consult or edit the orderForm can change the authentication depending on the customer context. If you are handling information from a customer with a complete profile on the store, authentication will be required. You can only access or modify the customer data for these profiles with an authenticated request.
Shopping cart
Allows merchants to simulate, configure and customize shopping cart information.
- POST - Cart Simulation: simulate a cart in VTEX Checkout.
- GET - Get current or create a new cart: get your current shopping cart information or to create a new cart.
- GET - Get cart information by ID: get all information associated to a given shopping cart.
- POST - Add cart items: add a new item to the shopping cart.
- POST - Update cart items: change the quantity of one or more items in a specific cart or remove an item from the cart.
- PATCH - Handle cart items: change the quantity or price of one or more items to the shopping cart or add a new item to the shopping cart.
- POST - Remove all items: removes all items from a given cart, leaving it empty.
- PUT - Change price: changes the price of an SKU in a cart.
- GET - Cart installments: retrieves possible amount of installments and respective values for a given cart with a given payment method.
Cart attachments
Allows merchants to obtain client profiles and add information to a given shopping cart.
- GET - Get client profile by email: retrieve a client's profile information by providing an email address.
- POST - Add client profile: include client profile information to a given shopping cart.
- Patch - Ignore profile data: disable the automatic inclusion of profile information in a shopping cart when a shopper provides an email address at checkout.
- GET - Remove all personal data: removes all user information, making a cart anonymous while leaving the items.
- POST - Add client preferences: include client preferences information to a given shopping cart.
- POST - Add shipping address and select delivery option: include shipping information and/or selected delivery option to a given shopping cart.
- POST - Add marketing data: include marketing information to a given shopping cart.
- POST - Add payment data: include payment information to a given shopping cart.
- POST - Add merchant context data: add to the cart any relevant information that is related to the context of a specific order.
- POST - Add coupons to the cart: add coupons to a given shopping cart.
Custom data
Allows merchants to manage custom fields that were created by an app in their account.
- PUT - Set multiple custom field values: allows you to update the values of custom fields created in your account's apps.
- PUT - Set single custom field value: allows you to update the value of a specific custom field created in your account's apps.
- DELETE - Remove single custom field value: allows you to remove the value of a specific custom field created in your account's apps.
- PUT - Batch add custom fields: Add multiple custom fields to an
orderFormin a single request. - PUT - Add order custom field: Add a custom field to the order level of an
orderForm. - PUT - Add item custom field: Add a custom field to a specific item in an
orderForm. - PUT - Add item custom field: Add a custom field to a specific item in an
orderForm. - DELETE - Remove item custom field: Remove a specific custom field from an item in an
orderForm. - PUT - Add address custom field: Add a custom field to a specific address in an
orderForm.
Configuration
Allows merchants to configure orderForm in the account and seller exchange on a given order.
- GET - Get orderForm configuration: retrieves the settings that are currently applied to every
orderFormin the account. - POST - Update orderForm configuration: determines settings that will apply to every
orderFormin the account. - GET - Get window to change seller: retrieves a marketplace’s window to change seller.
- POST - Update window to change seller: updates a marketplace’s window to change seller.
- POST - Clear orderForm messages: removes all messages from the
messagesfield of theorderForm.
Fulfillment
Allows merchants to obtain pickup points and address information.
- GET - List pickup points by location: retrieves information on pickup points close to a given location determined by geocoordinates or postal code.
- GET - Get address by postal code: retrieves address information for a given postal code and country.
Order placement
Allows merchants to place and process orders by creating a new cart or using an existing cart.
- POST - Place order from an existing cart: places an order from an existing
orderFormobject, meaning an existing cart. - PUT - Place order: places order without having any prior cart information.
- POST - Process order: order processing callback request, which is made after an order's payment is approved.
Region
Allows merchants to obtain a list of sellers serving a specific delivery region.
- GET - Get sellers by region or address": retrieves a list of sellers that cater to a specific region or address.
Common parameters in the documentation
| Parameter name | Description |
|---|---|
{{accountName}} |
Store account name |
{{environment}} |
The environment that will be called. Change for vtexcommercestable or vtexcommmercebeta |
{{X-VTEX-API-AppKey}} |
Located in the headers of the requests, user authentication key |
{{X-VTEX-API-AppToken}} |
Located in the headers of the requests, authentication password |
Endpoints
Shopping cart
| Summary | Method | Path |
|---|---|---|
| Cart simulation | POST | /api/checkout/pub/orderForms/simulation |
| Get current or create a new cart | GET | /api/checkout/pub/orderForm |
| Get cart information by ID | GET | /api/checkout/pub/orderForm/{orderFormId} |
| Remove all items from shopping cart | POST | /api/checkout/pub/orderForm/{orderFormId}/items/removeAll |
| Remove all personal data from shopping cart | GET | /checkout/changeToAnonymousUser/{orderFormId} |
| Update cart items | POST | /api/checkout/pub/orderForm/{orderFormId}/items/update |
| Add cart items | POST | /api/checkout/pub/orderForm/{orderFormId}/items |
| Handle cart items | PATCH | /api/checkout/pub/orderForm/{orderFormId}/items |
| Change price of an SKU in a cart | PUT | /api/checkout/pub/orderForm/{orderFormId}/items/{itemIndex}/price |
| Ignore profile data on checkout | PATCH | /api/checkout/pub/orderForm/{orderFormId}/profile |
| Cart installments | GET | /api/checkout/pub/orderForm/{orderFormId}/installments |
| Add coupons to the cart | POST | /api/checkout/pub/orderForm/{orderFormId}/coupons |
Cart attachments
| Summary | Method | Path |
|---|---|---|
| Get client profile by email | GET | /api/checkout/pub/profiles |
| Add client profile | POST | /api/checkout/pub/orderForm/{orderFormId}/attachments/clientProfileData |
| Add shipping address and select delivery option | POST | /api/checkout/pub/orderForm/{orderFormId}/attachments/shippingData |
| Add client preferences | POST | /api/checkout/pub/orderForm/{orderFormId}/attachments/clientPreferencesData |
| Add marketing data | POST | /api/checkout/pub/orderForm/{orderFormId}/attachments/marketingData |
| Add payment data | POST | /api/checkout/pub/orderForm/{orderFormId}/attachments/paymentData |
| Add merchant context data | POST | /api/checkout/pub/orderForm/{orderFormId}/attachments/merchantContextData |
| Attach invoice data | POST | /api/checkout/pub/orderForm/{orderFormId}/attachments/invoiceData |
Custom data
| Summary | Method | Path |
|---|---|---|
| Set multiple custom field values | PUT | /api/checkout/pub/orderForm/{orderFormId}/customData/{appId} |
| Set single custom field value | PUT | /api/checkout/pub/orderForm/{orderFormId}/customData/{appId}/{appFieldName} |
| Remove single custom field value | DELETE | /api/checkout/pub/orderForm/{orderFormId}/customData/{appId}/{appFieldName} |
| Batch add custom fields | PUT | /api/checkout/pub/orderForm/{orderFormId}/customFields |
| Add order custom field | PUT | /api/checkout/pub/orderForm/{orderFormId}/customFields/order |
| Add item custom field | PUT | /api/checkout/pub/orderForm/{orderFormId}/customFields/item/{itemId} |
| Remove item custom field | DELETE | /api/checkout/pub/orderForm/{orderFormId}/customFields/item/{itemId} |
| Add address custom field | PUT | /api/checkout/pub/orderForm/{orderFormId}/customFields/address/{addressId} |
Configuration
| Summary | Method | Path |
|---|---|---|
| Get order form configuration | GET | /api/checkout/pvt/configuration/orderForm |
| Update order form configuration | POST | /api/checkout/pvt/configuration/orderForm |
| Get window to change seller | GET | /api/checkout/pvt/configuration/window-to-change-seller |
| Update window to change seller | POST | /api/checkout/pvt/configuration/window-to-change-seller |
| Clear order form messages | POST | /api/checkout/pub/orderForm/{orderFormId}/messages/clear |
Fulfillment
| Summary | Method | Path |
|---|---|---|
| List pickup points by location | GET | /api/checkout/pub/pickup-points |
| Get address by postal code | GET | /api/checkout/pub/postal-code/{countryCode}/{postalCode} |
Order placement
| Summary | Method | Path |
|---|---|---|
| Place order from an existing cart | POST | /api/checkout/pub/orderForm/{orderFormId}/transaction |
| Place order | PUT | /api/checkout/pub/orders |
| Process order | POST | /api/checkout/pub/gatewayCallback/{orderGroup} |
Region
| Summary | Method | Path |
|---|---|---|
| Get sellers by region or address | GET | /api/checkout/pub/regions/{regionId} |