[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides external marketplace integration canceled orders in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/getting-started)

---

Integration Guides

[Back office integration guide (ERP/PIM/WMS)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/erp-integration-guide)

[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/customer-credit-integration-guide)

[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-guide)

[Marketplace / Seller architecture](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-architecture)

[Store setup for VTEX Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-vtex-seller-setup)

[Creating an integration app from a Template](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-app-template)

[Catalog Integration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-catalog)

[Catalog logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-logs)

[Get product list for an initial load](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-product-load)

[How to get a new product to offer in the marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-new-products)

[How to get product updates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-product-updates)

[Product and Category Mappings](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-catalog-mapping)

[How to keep prices updated](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-price-update)

[How to keep stock updated](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-stock-update)

[Order Integration overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-orders)

[Recommendations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-recommendations)

[New Order Integration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-collect-orders)

[Update Order Status](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-update-order-status)

[How to validate if items are available for delivery](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-delivery-validation)

[Sending invoice and tracking code to the marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-invoice-tracking)

[How to update a canceled order’s status in VTEX](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders)

[External Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-seller-integration-guide)

[Gift Card](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/gift-card-integration-guide)

[Headless commerce](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/headless-commerce)

[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/login-integration-guide)

[Punchout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/punchout)

[Offer Management Integration Guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/sent-offers-integration-guide-connectors)

[Payments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/payments-integration-guide)

[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/search-integration-guide)

[Session Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/session-manager)

[Tax Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/tax-service-integration-guide)

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/pricing-hub)

[reCAPTCHA](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/recaptcha)

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/updates/release-notes)

Guides

[VTEX Platform Overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/vtex-platform-overview)

---

[API usage](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/api-usage)

---

[Getting started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/getting-started)

---

Integration Guides

[Back office integration guide (ERP/PIM/WMS)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/erp-integration-guide)

[Customer Credit](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/customer-credit-integration-guide)

[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-guide)

[Marketplace / Seller architecture](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-architecture)

[Store setup for VTEX Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-vtex-seller-setup)

[Creating an integration app from a Template](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-app-template)

[Catalog Integration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-catalog)

[Catalog logs](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-logs)

[Get product list for an initial load](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-product-load)

[How to get a new product to offer in the marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-new-products)

[How to get product updates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-product-updates)

[Product and Category Mappings](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-catalog-mapping)

[How to keep prices updated](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-price-update)

[How to keep stock updated](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-stock-update)

[Order Integration overview](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-orders)

[Recommendations](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-recommendations)

[New Order Integration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-collect-orders)

[Update Order Status](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-update-order-status)

[How to validate if items are available for delivery](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-delivery-validation)

[Sending invoice and tracking code to the marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-invoice-tracking)

[How to update a canceled order’s status in VTEX](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders)

[External Seller](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-seller-integration-guide)

[Gift Card](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/gift-card-integration-guide)

[Headless commerce](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/headless-commerce)

[Login (SSO)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/login-integration-guide)

[Punchout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/punchout)

[Offer Management Integration Guide](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/sent-offers-integration-guide-connectors)

[Payments](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/payments-integration-guide)

[Search Protocol](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/search-integration-guide)

[Session Manager](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/session-manager)

[Tax Service](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/tax-service-integration-guide)

[Pricing Hub](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/pricing-hub)

[reCAPTCHA](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/recaptcha)

---

[Catalog](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/catalog-integration)

---

[Checkout](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/checkout-api-overview)

---

[Master Data](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/master-data)

---

Payments

---

Orders

---

Logistics

---

B2B Suite

---

VTEX Sales App

---

UI Customization

---

Message Center

---

Pricing

---

Promotions

---

Infrastructure

---

Search

---

Storefront Permissions

---

[VTEX Activity Flow](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/activity-flow)

---

[VTEX Ads](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/vtex-ads)

---

VTEX Session

---

VTEX Shield

---

[Data Protection Plus](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/data-protection-plus)

---

Weni by VTEX

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides)

Integration Guides

[External Marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-guide)

[How to update a canceled order’s status in VTEX](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders)

How to update a canceled order’s status in VTEX

An order can be canceled by the marketplace, or by the VTEX Admin The diagram below describes the notification flow, for cancelling the order and updating the status in VTEX:

![{"base64":"  ","img":{"width":3801,"height":1298,"type":"jpg","mime":"image/jpeg","wUnits":"px","hUnits":"px","length":262361,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/external-marketplace-integration-canceled-orders-0.jpg"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/external-marketplace-integration-canceled-orders-0.jpg)

## Cancelling the Order and Updating the status

Follow the steps below, once receiving the notification:

1. Connector receives **Cancel Order notification** from the marketplace.
We suggest that connectors store notifications in a queue by store for processing.
2. Connectors record the **order integration status**, to validate if the order has been integrated to VTEX, avoiding reprocessing of orders.
3. **For orders that have been integrated in VTEX:**a. Connectors should verify the order status in VTEX through the [Get Order API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/orders-api/%23get-/api/oms/pvt/orders/-orderId-). Orders with the `invoiced` status cannot be canceled in VTEX right away. Connectors must first issue a return invoice, through the [Order Invoice Notification API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/orders-api/%23post-/api/oms/pvt/orders/-orderId-/invoice), use the `“type”=”input”` parameter in the call, to issue a return invoice. b. For orders with statuses other than `invoiced`, call the [Cancel Order API](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/orders-api%23post-/api/oms/pvt/orders/-orderId-/cancel). c. VTEX OMS will receive the request and cancel the order. d.VTEX notifies the connector through the endpoint `/pvt/orders/{orderId}/cancel`. e. Connectors receive the notification and respond with 200 and the payload described below. f. Once receiving the response, VTEX updates the order status to `canceled`.
4. **For orders that have not been integrated in VTEX:**a. Inform the user that the order is already canceled in VTEX.

`1

{

2

 "orderId": string, //ID do pedido na VTEX

3

 "receipt": string, //GUID gerado pelo integrador

4

 "date": string //Data em que a notificação foi recebido

5

}

`

> Note that if the order status in VTEX is `invoiced`, a return invoice must be sent through the Order Invoice Notification API, before following the Cancel Order flow described below. Use the `"type"="input"` parameter in the call, to issue a return invoice.

## API Reference

Use the endpoints described below to perform this step. It is important to note that when consuming this API, the connector must have a valid VTEX App Key and App Token.

![{"base64":"  ","img":{"width":5262,"height":3389,"type":"jpg","mime":"image/jpeg","wUnits":"px","hUnits":"px","length":460342,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/external-marketplace-integration-canceled-orders-1.jpg"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/external-marketplace-integration-canceled-orders-1.jpg)

> All parameters in the endpoints below must be declared in the request. In case one of the parameters does not have a value, you must still send it as `null`.

### Cancel Order

Check out our [Cancel Order](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/orders-api%23post-/api/oms/pvt/orders/-orderId-/cancel) API Reference to know more details about this call.

### Order Invoice Notification

Use the request example below to generate an order invoice. Check out our [Order Invoice Notification](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/api-reference/orders-api%23post-/api/oms/pvt/orders/-orderId-/invoice) API Reference to know more details.

`1

{

2

 "type": "Output",

3

 "invoiceNumber": "NFe-00001",

4

 "courier": "",

5

 "trackingNumber": "",

6

 "trackingUrl": "",

7

 "items": [

8

 {

9

 "id": "345117",

10

 "quantity": 1,

11

 "price": 9003

12

 }

13

 ],

14

 "issuanceDate": "2019-11-21T00:00:00",

15

 "invoiceValue": 9508

16

}

`

## Scenario 1: customer cancels order in marketplace

This scenario occurs when the marketplace’s customer cancels an order in the marketplace, and the connector sends the cancellation request to VTEX.

When to perform: after receiving the cancellation notification from the marketplace

Connectors should:

1. Validate if order has been integrated in VTEX.
2. Validate if order status allows cancellation (all but `invoiced`).
3. If steps 1 and 2 are attended, call the Cancel Order API.
4. Store VTEX's response to the call.
5. Receive cancelling confirmation from VTEX and respond with `200` status, along with the response received in step 4.
6. Log status for cancellation action.

## Scenario 2: orders canceled in VTEX

This scenario occurs when VTEX cancels an order, and connectors should update the marketplace.

1. VTEX OMS sends Order Cancel notification.
2. Connector stores VTEX's response to the call.
3. Receive cancelling confirmation from VTEX and respond with `200` status, along with the response received in step 2.
4. Log status for cancellation action.

## Scenario 3: orders integrated in VTEX with the “canceled” status

This scenario occurs when connectors list marketplace orders, and orders that had already been integrated in VTEX have been canceled in the marketplace

Connectors should:

1. Validate if order has been integrated in VTEX.
2. Validate if order status allows cancellation (all but `invoiced`).
3. If steps 1 and 2 are attended, call the Cancel Order API.
4. Log status for cancellation action.

Contributors

3

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F77292838%3Fv%3D4%26w=64%26q=75)](https://github.com/julia-rabello)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F7108339%3Fv%3D4%26w=64%26q=75)](https://github.com/brunoamui)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Integration-Guides/external-marketplace-integration-guide/external-marketplace-integration-canceled-orders.md)

[Sending invoice and tracking code to the marketplace« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders//docs/guides/external-marketplace-integration-invoice-tracking)[External SellerNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders//docs/guides/external-seller-integration-guide)

Contributors

3

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F77292838%3Fv%3D4%26w=64%26q=75)](https://github.com/julia-rabello)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F7108339%3Fv%3D4%26w=64%26q=75)](https://github.com/brunoamui)

ON THIS PAGE

[Cancelling the Order and Updating the status](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23cancelling-the-order-and-updating-the-status)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23api-reference)

[Cancel Order](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23cancel-order)[Order Invoice Notification](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23order-invoice-notification)

[Scenario 1: customer cancels order in marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23scenario-1-customer-cancels-order-in-marketplace)

[Scenario 2: orders canceled in VTEX](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23scenario-2-orders-canceled-in-vtex)

[Scenario 3: orders integrated in VTEX with the “canceled” status](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23scenario-3-orders-integrated-in-vtex-with-the-canceled-status)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/Integration-Guides/external-marketplace-integration-guide/external-marketplace-integration-canceled-orders.md)

Copy page

On this page

ON THIS PAGE

[Cancelling the Order and Updating the status](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23cancelling-the-order-and-updating-the-status)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23api-reference)

[Cancel Order](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23cancel-order)[Order Invoice Notification](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23order-invoice-notification)

[Scenario 1: customer cancels order in marketplace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23scenario-1-customer-cancels-order-in-marketplace)

[Scenario 2: orders canceled in VTEX](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23scenario-2-orders-canceled-in-vtex)

[Scenario 3: orders integrated in VTEX with the “canceled” status](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/external-marketplace-integration-canceled-orders/docs/guides/external-marketplace-integration-canceled-orders%23scenario-3-orders-integrated-in-vtex-with-the-canceled-status)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides vtex io documentation vtex io cli plugins in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/updates/release-notes)

App Development

[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-what-is-vtex-io)

---

[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-what-is-a-vtex-app)

---

[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/governance-and-shared-security-in-vtex-io-apps)

---

[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/code-samples)

---

[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-getting-started)

---

Project structure

---

[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)

[Installing VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-install)

[Updating VTEX IO's CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-update)

[Using VTEX IO's CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-usage)

[Managing plugins](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins)

[Command reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-command-reference)

[Uninstalling VTEX IO's CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-uninstall)

---

[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-workspace)

---

Managing apps

---

Development guides

---

[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/app-development-guides)

---

[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/graphql-in-vtex-io)

---

[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-policies)

---

[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/ab-tests)

---

[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)

---

[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-app-store)

---

[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/managing-edition-apps)

---

[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-frequently-asked-questions)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/updates/release-notes)

App Development

[What is VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-what-is-vtex-io)

---

[What is a VTEX App](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-what-is-a-vtex-app)

---

[Governance and shared security in VTEX IO apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/governance-and-shared-security-in-vtex-io-apps)

---

[Code samples and templates](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/code-samples)

---

[Getting Started](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-getting-started)

---

Project structure

---

[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)

[Installing VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-install)

[Updating VTEX IO's CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-update)

[Using VTEX IO's CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-usage)

[Managing plugins](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins)

[Command reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-command-reference)

[Uninstalling VTEX IO's CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-uninstall)

---

[Workspace](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-workspace)

---

Managing apps

---

Development guides

---

[Node apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/app-development-guides)

---

[GraphQL in VTEX IO](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/graphql-in-vtex-io)

---

[Policies and permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-policies)

---

[A/B tests](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/ab-tests)

---

[Deployment](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-making-your-new-app-version-publicly-available)

---

[VTEX App Store](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-app-store)

---

[Edition Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/managing-edition-apps)

---

[Frequently asked questions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-frequently-asked-questions)

---

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/app-development)

[VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference)

[Managing plugins](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins)

Managing plugins

VTEX IO CLI 3.x has a plug-in architecture that makes it more flexible and extensible to inject new commands and functionalities. This way, you can go beyond VTEX IO's CLI default commands and add specific plugins to achieve a more comprehensive experience.

Check the [Command Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-command-reference%23plugins) for a detailed description of all plugins developed by VTEX.

> The following plugins are native to VTEX IO'S CLI. Therefore, you do not need to install them: `abtest`, `autoupdate`, `deploy`, `deps`, `edition`, `plugins`, `whoami`, `workspace`.

## Checking plugin commands

Check all commands related to plugins by running the following command.

`1

vtex plugins

`

![{"base64":"  ","img":{"width":2206,"height":1054,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":221665,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-0.png"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-0.png)

## Listing all VTEX plugins

List all plugins available by VTEX by running the following command.

`1

vtex plugins source

`

![{"base64":"  ","img":{"width":2206,"height":1028,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":181639,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-1.png"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-1.png)

> If you already have downloaded a plugin, it will be highlighted in green.

## Installing a plugin

Install a new plugin by running the following command.

`1

vtex plugins install {pluginName}

`

Replace the value between curly brackets with the name of the plugin you want to install.

* For `vtex` plugins, use just the plugin name. For example, `vtex plugins install infra`.
> Tip: you can run `vtex plugins source` to check the available VTEX plugins.
* For third parties plugins, use the following format: `@{org-name}/{plugin-name}`.

![{"base64":"  ","img":{"width":2206,"height":574,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":125783,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-2.png"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-2.png)

## Listing installed plugins

List all plugins installed in your machine by running the following command.

`1

vtex plugins list

`

![{"base64":"  ","img":{"width":2206,"height":608,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":130759,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-3.png"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-3.png)

## Updating installed plugins

Update all plugins installed in your machine by running the following command.

`1

vtex plugins update

`

![{"base64":"  ","img":{"width":2206,"height":574,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":117781,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-4.png"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-4.png)

## Uninstalling a plugin

Delete a plugin from your machine by running the following command.

`1

vtex plugins uninstall {pluginName}

`

> Replace the value between curly brackets with the name of the plugin you want to uninstall. You can run `vtex plugins list` to check which plugins are installed in your machine.

![{"base64":"  ","img":{"width":2206,"height":574,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":119488,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-5.png"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-vtex-io-cli-plugins-5.png)

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/Reference/vtex-io-documentation-vtex-io-cli-installation-and-command-reference/vtex-io-documentation-vtex-io-cli-plugins.md)

[Using VTEX IO's CLI« Previous](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins//docs/guides/vtex-io-documentation-vtex-io-cli-usage)[Command referenceNext »](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins//docs/guides/vtex-io-documentation-vtex-io-cli-command-reference)

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

ON THIS PAGE

[Checking plugin commands](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23checking-plugin-commands)

[Listing all VTEX plugins](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23listing-all-vtex-plugins)

[Installing a plugin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23installing-a-plugin)

[Listing installed plugins](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23listing-installed-plugins)

[Updating installed plugins](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23updating-installed-plugins)

[Uninstalling a plugin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23uninstalling-a-plugin)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/Reference/vtex-io-documentation-vtex-io-cli-installation-and-command-reference/vtex-io-documentation-vtex-io-cli-plugins.md)

Copy page

On this page

ON THIS PAGE

[Checking plugin commands](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23checking-plugin-commands)

[Listing all VTEX plugins](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23listing-all-vtex-plugins)

[Installing a plugin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23installing-a-plugin)

[Listing installed plugins](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23listing-installed-plugins)

[Updating installed plugins](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23updating-installed-plugins)

[Uninstalling a plugin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-plugins/docs/guides/vtex-io-documentation-vtex-io-cli-plugins%23uninstalling-a-plugin)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] Provide a guide on guides vtex storefront permissions ui in VTEX.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/updates/release-notes)

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/updates/release-notes)

Storefront Permissions UI

**Storefront Permissions UI** provides an interface for the [Storefront Permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions) app, which is part of VTEX’s [B2B Suite](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-b2b-suite) solution, a collection of apps that allow stores to manage organizations, storefront roles and permissions, and checkout settings for B2B commerce relationships.

B2B customers often play distinct roles within their organization, such as professional buyer, manager, or supervisor. Each role is associated with a different set of permissions, depending on the actions the user needs to perform.

This app communicates with the backstage **Storefront Permissions** app and provides the following features for this scenario:

* [Roles management](#roles-management): allow VTEX Admin users to manage B2B roles and associated app permissions through an interface.
* [Theme blocks configuration](#theme-blocks-configuration): enable conditional theme blocks so that only users with the required permissions can access determined parts of the content in your storefront.

We recommend that you use it alongside the other apps in the [B2B Suite](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-b2b-suite) for all functionalities to work as expected.

## Before you begin

Make sure you have the [VTEX IO CLI (Command Line Interface)](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-install) installed in your machine.

## Installation

You can install the app by running `vtex install vtex.storefront-permissions-ui` in your terminal, using the [VTEX IO CLI](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-vtex-io-cli-installation-and-command-reference).

After this command, the app will be installed in your VTEX Admin, and you can access it on **Account Settings** \> **Storefront Permissions**.

> Installing **Storefront Permissions UI** has the effect of automatically installing the [Storefront Permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions) app as a dependency, in case it is not already installed.

## Roles management

To manage roles and their respective app permissions using the Storefront Permissions UI, follow the steps below after installing the app.

1. At the VTEX Admin, navigate to **Account Settings** \> **Storefront Permissions**.
2. Click on one of the [available storefront roles](#available-storefront-roles).
3. Click on one of the listed apps.
> Only apps that are integrated with **Storefront Permissions** will be on the list – check our [Storefront Permissions](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions%23advanced-app-integration-optional) documentation for more information.
4. Select which permissions you want to enable for the role, as illustrated below.
5. Once you are done, click on `Save`.

![{"base64":"  ","img":{"width":1891,"height":815,"type":"gif","mime":"image/gif","wUnits":"px","hUnits":"px","length":436878,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-storefront-permissions-ui-0.gif"}}](https://read.calvincode.net/reader?url=https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-storefront-permissions-ui-0.gif)

After associating roles with the desired permissions, you may then assign roles to users. To learn more about this, read our [B2B Organizations documentation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-b2b-organizations%23users).

### Available storefront roles

In the following table, you can see the available storefront roles, their key used for identification in the app’s code, and their description.

| **Role**              | **Key**              | **Description**                                                                                |
| --------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Store Admin           | store-admin          | Store administrator, that is, a user who has access to the VTEX Admin.                                                                                |
| Sales Admin           | sales-admin          | Sales administrator user who can manage all sales users.                                                                                |
| Sales Manager         | sales-manager        | Sales manager user who can manage sales users in the same organization, as well as assist or impersonate buyers during navigation or purchase.                              |
| Sales Representative  | sales-representative | Sales representative user who can assist or impersonate buyers in the same cost center during navigation or purchase.                                                       |
| Organization Admin    | customer-admin       | Main organization user who manages the organization information, as well as its members and cost centers.                                                                   |
| Organization Approver | customer-approver    | Organization user who can take a saved cart or quote that was created by an **Organization Buyer** and use it to place an order.                                            |
| Organization Buyer    | customer-buyer       | Organization user who has the ability to add items to cart. If the **B2B Quotes** app is installed, they are also able to save their cart for future use or create a quote. |

## Theme blocks configuration

If you only want users with roles that have the required permissions to be able to access determined parts of the content in your storefront, you can also configure conditional blocks in your store’s theme. These types of blocks allow you to validate information in order to display or hide content in your storefront.

In case you need more information on how to start building your own theme, read our [documentation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-io-documentation-1-basicsetup) before you proceed.

If you are experienced in developing and customizing your store’s theme, follow the steps below to declare the conditional blocks enabled by **Storefront Permissions UI**.

1. Open your store theme app’s repository in your local files.
2. In the `manifest.json` file, under `dependencies`, add `"vtex.storefront-permissions-ui": "1.x"`, like in the example below.
`1
 "dependencies": {
2
 "vtex.storefront-permissions-ui": "1.x"
3
 },
`
3. Now, you can use the `check-permission`, `allowed-content` and `disallowed-content` blocks on any files you want in your store’s theme. See more information on these blocks below.
| **Block name**     | **Description**                                                                                |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| check-permission   | Checks if the current user has the required permissions to access the content wrapped with this block.You can wrap content blocks with check-permission when declaring them to validate if the user has the required permissions to see that content. Example: check-permission#carousel |
| allowed-content    | Allows you to define on children blocks the content that will be shown for allowed users – users with roles that have the required permissions to view the block.                                                                                |
| disallowed-content | Optional block that allows you to define on children blocks the content that will be shown for disallowed users – users with roles that do not have the required permissions to view the block.                                                                                |
This component will check if the user has permission to see the `allowed-content`, otherwise they will see the `disallowed-content`.
The `check-permission` block has a prop named `roles`, which lets you define an array of roles that are allowed to see the blocks defined under the children blocks of `allowed-content`.
| **Prop name** | **Type**         | **Description**                                                                                | **Required** | **Example**                      |
| ------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------- |
| roles         | array of strings | List of the allowed roles, identified by their key. Learn more about each role and its key in the [Available storefront roles](#available-storefront-roles) section. | true         | \["store-admin", "sales-admin"\] |

#### Example

In the example below, in a store’s home, a carousel with banners will only be visible to logged in users with the `store-admin` or `sales-admin` roles. Users with other roles will see a warning message (`**You don't have access to this content**`) instead.

`1

{

2

 "store.home": {

3

 "blocks": [

4

+ "check-permission#carousel",

5

 "shelf#home",

6

 "info-card#home",

7

 "rich-text#question",

8

 "rich-text#link"

9

 ]

10

 },

11

+ "check-permission#carousel": {

12

+ "props": {

13

+ "roles": ["store-admin", "sales-admin"]

14

+ },

15

+ "blocks": ["allowed-content#carousel","disallowed-content#carousel"]

16

+ },

17

+ "allowed-content#carousel": {

18

+ "children": ["carousel#home"]

19

+ },

20

+ "disallowed-content#carousel": {

21

+ "children": ["rich-text#disallowed"]

22

+ },

23

+ "rich-text#disallowed": {

24

+ "props": {

25

+ "text": "**You don't have access to this content**"

26

+ }

27

+ },

28

 "carousel#home": {

29

 "props": {

30

 "autoPlay": false,

31

 "banners": [

32

 {

33

 "image": "https://storecomponents.vteximg.com.br/arquivos/banner-principal.png",

34

 "mobileImage": "https://storecomponents.vteximg.com.br/arquivos/banner-principal-mobile.jpg"

35

 },

36

 {

37

 "image": "https://storecomponents.vteximg.com.br/arquivos/banner.jpg",

38

 "mobileImage": "https://storecomponents.vteximg.com.br/arquivos/banner-principal-mobile.jpg"

39

 }

40

 ],

41

 "height": 720,

42

 "showArrows": true,

43

 "showDots": true

44

 }

45

 },

`

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

Was this helpful?

Yes

No

[Suggest Edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/Store-Framework-Apps/vtex-b2b-suite/vtex-storefront-permissions-ui.md)

Contributors

1

[![Photo of the contributor](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/_next/image?url=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F60782333%3Fv%3D4%26w=64%26q=75)](https://github.com/carolinamenezes)

ON THIS PAGE

[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides/vtex-storefront-permissions-ui%23before-you-begin)

[Installation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides/vtex-storefront-permissions-ui%23installation)

[Roles management](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides/vtex-storefront-permissions-ui%23roles-management)

[Available storefront roles](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides/vtex-storefront-permissions-ui%23available-storefront-roles)

[Theme blocks configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides/vtex-storefront-permissions-ui%23theme-blocks-configuration)

Was this helpful?

 Send feedback

[Suggest edits (GitHub)](https://read.calvincode.net/reader?url=https://github.com/vtexdocs/dev-portal-content/edit/main/docs/guides/vtex-io/Store-Framework-Apps/vtex-b2b-suite/vtex-storefront-permissions-ui.md)

Copy page

On this page

ON THIS PAGE

[Before you begin](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides/vtex-storefront-permissions-ui%23before-you-begin)

[Installation](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides/vtex-storefront-permissions-ui%23installation)

[Roles management](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides/vtex-storefront-permissions-ui%23roles-management)

[Available storefront roles](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides/vtex-storefront-permissions-ui%23available-storefront-roles)

[Theme blocks configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/guides/vtex-storefront-permissions-ui/docs/guides/vtex-storefront-permissions-ui%23theme-blocks-configuration)

On this page

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)


[System] You are a VTEX documentation expert. You provide accurate, detailed information about VTEX platform, APIs, apps, and Store Framework development.

[User] How do I use the VTEX store components buybutton app? Provide documentation and configuration details.

[Assistant]
Documentation

[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)

[GuidesLearn how to use our APIs and extend the VTEX platform.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides)

[API ReferenceExplore detailed information about our endpoints.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/api-reference)

[App DevelopmentLearn how to build cloud-based apps and integrations.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/app-development)

[Storefront DevelopmentExpress your brand identity creating unique storefronts.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/storefront-development)

[VTEX IO AppsFind pre-built solutions to grow your business.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/vtex-io-apps)

[TroubleshootingFind practical solutions to common development issues.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/troubleshooting)

[Release NotesStay up to date with our latest releases and bug fixes.](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/updates/release-notes)

VTEX IO Apps

[Basic components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/basic-components)

---

[Store Components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/store-components)

---

[Advanced components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/advanced-components)

---

[B2B components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/b2b-components)

---

[B2B Suite](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/apps/vtex.b2b-suite)

---

[Functional Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/functional-apps)

---

[Layout Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/layout-apps)

---

[Pixel Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/pixel-apps)

---

[My Account - StoreV2 version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/apps/vtex.my-account)

---

[VTEX IO deprecated apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/vtex-io-deprecated-apps)

---

[Guides](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides)

[API Reference](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/api-reference)

[App Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/app-development)

[Storefront Development](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/storefront-development)

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/vtex-io-apps)

[Troubleshooting](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/troubleshooting)

---

[Release Notes](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/updates/release-notes)

VTEX IO Apps

[Basic components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/basic-components)

---

[Store Components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/store-components)

---

[Advanced components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/advanced-components)

---

[B2B components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/b2b-components)

---

[B2B Suite](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/apps/vtex.b2b-suite)

---

[Functional Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/functional-apps)

---

[Layout Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/layout-apps)

---

[Pixel Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/pixel-apps)

---

[My Account - StoreV2 version](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/apps/vtex.my-account)

---

[VTEX IO deprecated apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/guides/vtex-io-deprecated-apps)

---

[VTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/vtex-io-apps)

Buy Button

[vtex.store-components](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components)

Version: 3.178.5

Latest version: 3.178.5

> Warning
>
> **The Buy Button block has been deprecated in favor of the [Add To Cart Button app](https://read.calvincode.net/reader?url=https://developers.vtex.com/vtex-developer-docs/docs/vtex-add-to-cart-button/).** Although support for this block is still granted, we strongly recommend you to update your store theme with the Add to Cart Button's blocks in order to keep up with the component's evolution.

![{"base64":"  ","img":{"width":73,"height":20,"type":"svg","mime":"image/svg+xml","wUnits":"px","hUnits":"px","url":"https://img.shields.io/badge/-Deprecated-red"}}](https://read.calvincode.net/reader?url=https://img.shields.io/badge/-Deprecated-red)

The `buy-button` block displays a button that allows users to add products in the [Minicart](https://read.calvincode.net/reader?url=https://developers.vtex.com/vtex-developer-docs/docs/vtex-minicart) (`minicart.v1`).

> Warning
>
> **The Buy Button block only works for stores using the Minicart v1**. If your store uses the Minicart v2, please refer to the [Add To Cart Button](https://read.calvincode.net/reader?url=https://developers.vtex.com/vtex-developer-docs/docs/vtex-add-to-cart-button) instead.

![{"base64":"  ","img":{"width":2094,"height":1052,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":407330,"url":"https://user-images.githubusercontent.com/284515/70233985-69e13700-173e-11ea-91f7-6675a6a0e73b.png"}}](https://read.calvincode.net/reader?url=https://user-images.githubusercontent.com/284515/70233985-69e13700-173e-11ea-91f7-6675a6a0e73b.png)

## Configuration

1. Import the `vtex.store-components` app to your theme's dependencies in the `manifest.json` file as in the following example:

`1

 "dependencies": {

2

+ "vtex.store-components": "3.x"

3

 }

`

1. Add the `buy-button` to other theme block using the product context, such as the `product-summary.shelf`. In the following example, the `buy-button` component was added to the `flex-layout.row` block from the `store.product` template (which uses the product context):

`1

 "store.product": {

2

 "children": [

3

 "flex-layout.row#product",

4

 ]

5

 },

6

 "flex-layout.row#product": {

7

 "children": [

8

+ "buy-button#product"

9

 ]

10

 },

`

1. Then, declare the `buy-button` block using the props stated in the [Props](#props) table. For example:

`1

 "buy-button#product": {

2

 "props": {

3

 "isOneClickBuy": true,

4

 "showTooltipOnSkuNotSelected": false

5

 }

6

 },

`

### Props

| Prop name                   | Type    | Description                                                                                | Default value    |
| --------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| available                   | boolean | Whether the Buy Button block is available for using (true) or not (false).                                                      | true             |
| customToastURL              | string  | Defines the link to where users will be redirected when the Buy Button is clicked on and the isOneClickBuy prop is set to true. | /checkout/#/cart |
| isOneClickBuy               | boolean | Whether the user should be redirected to the checkout page (true) or not (false) when the Add To Cart Button is clicked on.     | false            |
| large                       | boolean | Whether the Buy Button should fill its whole width (true) or not (false).                                                       | false            |
| shouldOpenMinicart          | boolean | Whether the Minicart should be opened when the Buy Button is clicked on (true) or not (false).                                  | false            |
| shouldAddToCart             | boolean | Whether the Buy Button should add products to the minicart when clicked on (true) or not (false).                               | true             |
| showItemsPrice              | boolean | Whether the total price of items added to the cart should be displayed (true) or not (false).                                   | false            |
| showToast                   | boolean | Whether a Toast (pop-up notification) should be displayed when adding an item to the minicart (true) or not (false)             | false            |
| showTooltipOnSkuNotSelected | boolean | Whether a tooltip should be displayed when the Buy Button is clicked on with no SKU was selected (true) or not (false).         | true             |

## Customization

To apply CSS customizations in this and other blocks, follow the [Using CSS handles for store customization](https://read.calvincode.net/reader?url=https://developers.vtex.com/vtex-developer-docs/docs/vtex-io-documentation-using-css-handles-for-store-customization) guide.

| CSS Handles         |
| ------------------- |
| buttonDataContainer |
| buttonItemsPrice    |
| buyButtonText       |

See also

[Vtex.store ComponentsVTEX IO Apps](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/apps/vtex.store-components)[VTEX App StoreVTEX IO Apps](https://read.calvincode.net/reader?url=https://apps.vtex.com/)

ON THIS PAGE

[Configuration](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/apps/vtex.store-components/buybutton%23configuration)

[Props](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/apps/vtex.store-components/buybutton%23props)

[Customization](https://read.calvincode.net/reader?url=https://developers.vtex.com/docs/apps/vtex.store-components/buybutton/docs/apps/vtex.store-components/buybutton%23customization)

Was this helpful?

[Github](https://read.calvincode.net/reader?url=https://github.com/vtex-apps)[Help Center](https://read.calvincode.net/reader?url=https://help.vtex.com/)[Community](https://read.calvincode.net/reader?url=https://community.vtex.com/?%5Fga=2.198523433.743584735.1647618303-1974737580.1645714642)[Feedback](https://read.calvincode.net/reader?url=https://docs.google.com/forms/d/e/1FAIpQLSfmnotPvPjw-SjiE7lt2Nt3RQgNUe10ixXZmuO2v9enOJReoQ/viewform?entry.1972292648=developers.vtex.com%26entry.1799503232=)