> For the complete documentation index, see [llms.txt](https://docs.peakcommerce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peakcommerce.com/developers/api-groups/pricing.md).

# Pricing

The **Pricing API** evaluates the tenant's pricing-rule engine for a given product + buyer context and returns the resolved unit price along with a transparent breakdown of which rules fired. It is the single source of truth for "what should we charge this customer right now"; checkout flows, quoting tools, and the [Preview](https://docs.peakcommerce.com/developers/api-groups/preview.md) endpoints all defer to it.

The engine combines:

* catalog list price (from the product's plan / charge),
* targeting rules in `pricing_rules` (segment / locale / partner / quantity / journey),
* tier tables for volume pricing,
* partner-specific overrides via `partner_rules`.

Reads require the `read` scope. The endpoint is read-only and side-effect free; safe to call from a browser.

## Endpoints

### `GET /api/v1/pricing/resolve`

{% openapi src="<https://api.peakcommerce.app/api/v1/openapi.json>" path="/pricing/resolve" method="get" %}
<https://api.peakcommerce.app/api/v1/openapi.json>
{% endopenapi %}

Resolves the effective unit price for `productId` given the supplied buyer context. Pass any subset of the optional discriminators — `segment`, `locale`, `partner`, `quantity` — and the engine narrows the rule set accordingly.

The response includes:

* `price` — the resolved unit price in cents.
* `currency` — the currency the price is denominated in (driven by the locale match, falling back to the product default).
* `breakdown` — an ordered list of `{ ruleId, ruleType, adjustment }` entries showing which `pricing_rules` rows fired and what each contributed.
* `tier` (when applicable) — the matched row from the rule's `tier_table` for volume pricing.

Returns `404` when the product is not found in the tenant's catalog. Cache aggressively client-side: the response is deterministic for a given `(productId, segment, locale, partner, quantity)` tuple until the tenant edits a rule.

Requires the `read` scope.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.peakcommerce.com/developers/api-groups/pricing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
