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.
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:

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.
Pro Tip: Always use display_price for the final price shown to the user. This field has already been processed through the pricing engine, converted to the detected currency, and rounded according to currency rules.

Response Codes

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