vtex.local – Pricing-Hub
This feature is in closed beta, available only for selected customers. If you have any questions, contact our .
In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.
In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.

Implementation
To connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:
Read the documentation on each repository to learn more about the required steps to use and customize the app.
The app used by Pricing Hub to connect must be a
major 0.
Specifications
See below all the specifications of the request and the response expected when communicating with Pricing Hub.
Price calculation request
The external prices calculation tool must provide an endpoint that will receive a POST request. This route retrieves and applies prices for the items that are passed in the request. Pricing Hub will select the pricing method that will be used for each item and will fetch their respective price from the selected pricing method.
⚠️ Responses from Pricing Hub tend to have a greater delay when compared to other VTEX systems. That is expected, however, due to the complexity of its nested requests. The timeout for this request is 900 milliseconds.
In this request, Pricing Hub provides a body in a specific format, exemplified below. This means that either the endpoint must be prepared to receive this body format, or the app must contain a parser to adapt it to the correct format.
Request body example
The request body should have the following properties:
External prices provider response
In response to the request sent by Pricing Hub, we expect an outcome in the following format:
The response should have the following properties:
Index - Pricing Hub API
POST
PUT
{ "item": { "index": 0, "skuId": "880011", "quantity": 1 }, "context":{ "email": "john@email.com" }}{ "item": { "price": 54035, "priceTables": "special", "index": 0, "skuId": "880011", "listPrice": 54035, "costPrice": 50000, "sellingPrice": 54035, "priceValidUntil": "2023-01-27T20:29:57Z", "tradePolicyId": "special" }}- Homepage
- https://api.apis.guru/v2/specs/vtex.local:Pricing-Hub/1.0.json
- Provider
- vtex.local:Pricing-Hub / Pricing-Hub
- OpenAPI version
- 3.0.0
- Spec (JSON)
- https://api.apis.guru/v2/specs/vtex.local/Pricing-Hub/1.0/openapi.json
- Spec (YAML)
- https://api.apis.guru/v2/specs/vtex.local/Pricing-Hub/1.0/openapi.yaml
Tools (4)
Extracted live via the executor SDK.
-
pricingHubPrices.configExternalPriceSourceThis route facilitates setting up an external price source in Pricing Hub. It also allows you to activate or deactivate that source in a given account.
ℹ️ This feature is in closed beta, available only for selected customers. If you have any questions, contact our .
-
pricingHubPrices.postApiPricingHubPricesThis route retrieves and applies prices for the items that are passed in the request. Pricing Hub will select the pricing method that will be used for each item and will fetch their respective price from the selected pricing method.
ℹ️ > This feature is in closed beta, available only for selected customers. If you have any questions, contact our .
-
openapi.previewSpecPreview an OpenAPI document before adding it as a source
-
openapi.addSourceAdd an OpenAPI source and register its operations as tools