Documentation
Feedback
Guides
API Reference

Guides
Guides

Deploying Checkout extensions

Deploy your Checkout extensions to production, generate preview deploys, and troubleshoot build failures.

This feature is only available for stores using B2B Buyer Portal, which is currently available to selected accounts.

After creating Checkout extensions, deploy them to make the changes available in your store. A Checkout extensions project supports two deployment methods:

  • Production deploy: Deploys the extensions to your store in the production environment. It occurs each time a commit is pushed to the main branch.
  • Preview deploy: Generates an optimized production build without deploying it to your store. It occurs each time a commit is pushed to a branch other than main (for example, feat/totalizer-extension).

Requirements

Before deploying, make sure you have set up Buyer Portal Checkout and configured FastStore WebOps for your account.

Deploying Checkout extensions with WebOps does not require the discovery module. You can use WebOps exclusively to deploy Checkout extensions if needed.

Deploying to production

A deployment starts when you push a commit to the main branch. When FastStore WebOps detects changes in the Checkout module, it automatically builds and deploys the extensions to VTEX. No separate manual build step is required. In about 5-10 minutes, the changes are applied to your Checkout, the time needed for cache propagation. You can monitor the deployment process in the FastStore WebOps page of your store's account admin.

Once a commit is pushed to the main branch, the changes are applied to production. To revert a change, create a new commit that reverses the previous one, then push it to main.

Generating preview deploys

Before pushing to production, generating a preview deploy is recommended. A preview deploy follows the same process as a production deployment, except that the build is not applied to your store in production. This lets you test how the changes behave by instructing Checkout to load the preview build instead of the production assets.

To preview a build, you need:

  • The URL of your store's Checkout in production (a production or QA/dev account URL, such as secure.store-a.com/checkout/cart).
  • The build ID of the preview deploy, which is the commit ID that triggered it. See Finding the build ID.

Pass the build ID to your Checkout URL as the __previewId query string:


_10
https://secure.store-a.com/checkout/cart?__previewId=7fb760a66ae567f1eb2059cb3c3f01c1d4badca4

This instructs Checkout to load the extensions from the specified deployment. The deployment does not necessarily need to be a preview deploy; it could also be a production deployment, which is helpful for double-checking a previous production build that is no longer the default.

In this release, preview deploys have limited functionality. You currently cannot access ready-made links to view extensions in your store's Checkout, so you need to manually locate the build ID and add it as a query string.

Finding the build ID

The build ID of a deployment is the commit SHA generated by Git. To find it, use one of the following methods:

  • Run git log and look for the commit <id> pattern. For example:

_10
commit 9eeae390cf57b07a018713716ebc71cd020073e8 # ⬅️ This is the commit ID
_10
Author: Username <user@email.com>
_10
Date: Fri Oct 25 16:08:38 2024 -0300
_10
_10
Updated totalizer

  • In GitHub, click Copy full SHA in the commit list.

Handling build failures

If the build fails, the issue is usually in your extension code or configuration. Common causes include type-checking errors and typos.

FastStore WebOps shows when a build fails, but Checkout build logs are not available there. To inspect the logs, check the GitHub Checks for the failed commit by selecting the status icon ("✔️", "❌", or "🟡") next to the commit description and opening the Details link for FastStore WebOps.

You can also run the following command. Remember to replace {account-name} with the name of your account.


_10
yarn fsp build {account-name} checkout


_10
npx fsp build {account-name} checkout

This command builds the Checkout extension for the specified account and displays any local build errors. If the command succeeds locally, check your GitHub repository for issues in the build workflow.

Contributors
1
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
Was this helpful?
Suggest edits (GitHub)
On this page