Skip to main content
The PricingService class (accessed via client.pricing) provides high-performance price calculations. It acts as a single source of truth, enriching product data with real-time regional discounts, segment/volume pricing rules, and multi-currency conversion.
Customer Segment & Tier are determined automatically. customer_segment and customer_tier are not accepted as request parameters — they are resolved automatically from the customer_id you provide. Sending them as parameters has no effect. To apply segment-specific pricing, pass customerId only.

Integration Highlights

  • Consistent with the catalog: Returns the same product and variant data structures as the Products API, so you can use one shape across discovery and checkout.
  • Media included: Returns thumbnail_url and media (including variant-level media) alongside pricing.
  • Multi-Variant Support: Automatically calculates prices, discounts, and breakdowns for every variant in a product.
  • Geographic Detection: Accurate currency selection based on the customer’s location, worldwide.

Methods

getProductPrices

Retrieve resolved prices for a list of products. Optimized for catalog browsing, this returns a flat structure using the default variant for each product. Includes thumbnail_url for fast rendering.
Response
Pass a non-US location to convert into that region’s currency — Galactic Core detects the currency from the coordinates (or a placeName like 'London, UK') and applies the exchange rate:
The same catalog comes back priced in the detected currency — display_price converted, display_currency and currency_symbol changed, and pricing_context.exchange_rate showing the rate applied.

getProductPrice

Retrieve an ultra-detailed price breakdown for a single item. Handles both simple and multi-variant products with hierarchical responses. Each priced product already includes media gallery arrays.
  • Aggregate Pricing: For products with variants, it provides an accurate price_range (min/max) in the customer’s currency.
  • Per-Variant Breakdown: Each item in the variants array contains its own base_price, resolved_price, and display_price.
  • Media Resolution: Includes both root-level gallery media and variant-specific media proxies.

getProductPriceBySlug

Retrieve pricing using an SEO-friendly slug. Identical to getProductPrice but uses slugs for cleaner URL routing in frontend applications.

🎨 Advanced Field Filtering

The Pricing Service supports dot notation for filtering variant pricing data, enabling significant bandwidth savings for complex product pages.

Pricing Engine Logic

Tybrite calculates prices in a specific waterfall priority:
  1. Direct Overrides: Manual price overrides set on specific product variants.
  2. Customer Segments: Price rules targeting groups like “Wholesalers” (Champions, Loyal, etc.).
  3. Regional Rules: Region-specific discounts or markups (e.g., a UK promotional discount, an EU regional rule).
  4. Volume Tiers: Price reductions triggered by the quantity parameter.
  5. Order Value Rules: Discounts that depend on what the shopper is spending overall, such as “5% off orders over $100”, triggered by the orderTotal parameter.
An order-value rule can only be evaluated when orderTotal is present, so send the shopper’s current cart subtotal on pricing calls made once there is a cart. Without it those rules are skipped and the shopper sees the undiscounted price — the request still succeeds, which is why a missing orderTotal shows up as a discount that silently never applies rather than as an error.
display_price is the field to render as the shopper-facing price. It has already passed through the pricing engine, been converted to the detected currency, and been rounded according to that currency’s rules.

Response Codes

All pricing endpoints are GET and accept both publishable and secret keys.