Updating Custom Portals for Shopify Markets compatiblity
Recharge portals Affinity and Unity are fully compatible with Shopify Markets once the feature is enabled.
If you use a different customer portal, such as the Theme Engine, Novum, Prima, or custom portals built with the SDK or API, you must ensure that product pricing and availability reflect the correct Shopify Market.
How it works
All requests made to the Recharge Products API for product data must include market-specific filters:
country_codecurrencycheck_market_availability
These parameters ensure that:
- Product prices match the customer’s Shopify Market region and currency.
- Products unavailable in the customer’s market are correctly filtered.
Note
country_codeandcurrencyshould always come from the customer’s subscription address (or the next charge address when no subscription object is present).
When to update
Updates are only required when product data is retrieved from the Recharge API:
| Portal or integration | Retrieval method |
|---|---|
| SDK portals | productSearch() |
| Custom API integrations | POST /product_search |
| Theme Engine, Novum, Prima | /request_objects?schema={"products": {...}} or any schema referencing products |
When using these methods, you must include Shopify Market parameters in all product schema requests.
You do not need to make changes when pricing is:
- Pulled from an existing charge object
- Retrieved directly from Shopify (Liquid or GraphQL)
Step 1 - Locate all product queries
Search your portal codebase for any locations where products are fetched from Recharge:
SDK
productSearch(...)
Recharge Products API:
/product_search
Theme Engine, Novum, or Prima
/request_objects?schema={"products":{ ... }}- Common locations include:
ReCharge.Schemas.products.listReCharge.Schemas.products.search
- In Novum, these typically appear in:
customer_portal/novum/_scripts.js
Step 2 - Add Shopify Markets filters to product requests
Every product query must include the Shopify Markets parameters so that it reaches the Recharge API layer. These values must be passed through your existing query methods and included in every relevant request:
{
"products": {
"country_code": "<COUNTRY_CODE>",
"currency": "<CURRENCY>",
"check_market_availability": true
}
}Ensure that country_code and currency are dynamically inserted from the customer’s subscription address or upcoming charge, depending on the context in which the product is displayed.
If you need to retrieve product pricing without filtering by availability, for example, when showing a strikethrough price for a previously purchased product that no longer exists in the current market’s catalog, setcheck_market_availability to false. This allows the API to return pricing data even when the product is no longer available in the customer’s assigned Shopify Market.
Step 3 - Determine the correct Market context
Use the correct source ofcountry_code and currency based on where you display the product:
| Context | Where to pull country and currency |
|---|---|
| Cross-Sell or Upcoming Order | Use the country_code and currency from the upcoming order address. |
| General product display (not tied to a subscription) | Use the country_code and currency from the next upcoming charge. |
This ensures the customer always sees prices aligned with their assigned Shopify Market.
Step 4 - Display correct Market prices
When rendering prices returned from Recharge, always use thepresentment_prices field from the response object. Other pricing fields may not include Shopify Market adjustments and can display incorrect values.
Step 5 - Handling available_country_codes
When check_market_availability is set to true, Recharge may omit products that are not available in the customer’s market. To support this:
- Use the
available_country_codesarray from the returned product schema. - Adjust the user experience accordingly:
- Display a fallback message:
- For example, “This product is not available in your region.”
- Hide unavailable products.
- Display a fallback message:
You should thoroughly test these scenarios to ensure a smooth, localized customer experience.
Updated 1 day ago
