Before you begin
You need:- A UniBee Merchant API key
- Active plans configured in UniBee
- A backend service or scheduled job that can call the UniBee API
- A strategy for deciding which plans should appear in each external catalog
1. Define which plans to synchronize
Use plan status and publication status as the minimum filters:status: [2]selects Active plans.publishStatus: 2selects Published plans.
pricing-page tag to every plan that should appear on your public pricing page, and filter the Plan List API by that tag.
Plan Tags are best used for selection and grouping. You can define separate tags for different catalogs, regions, brands, or channels.
Examples include:
pricing-pagemobile-appenterprise-catalogregion-us

2. Assign stable external IDs
SetexternalPlanId on every synchronized plan. This value should be unique and stable in your external system.
Use externalPlanId to map a UniBee plan to a product or price record in your backend. Do not use the plan name as the mapping key because names are display content and may change.
Plan Tags and externalPlanId serve different purposes:
Both can be maintained in the UniBee Admin Portal and can be used together.
3. Retrieve plans with the Plan List API
Use the Get Plan List API from your backend. The following example retrieves Active and Published plans that match a specific Plan Tag:123 with the ID of your Plan Tag.
The tag matching modes are:
any: Return plans that have at least one of the supplied tags.all: Return only plans that have every supplied tag.
If
planIds and planTagFilter are both supplied, UniBee combines them using union (OR) semantics. Omit planIds when the result should be controlled only by tags.productIds, type, currency, intervalUnits, or intervalCounts when a catalog has more specific requirements.
4. Read every page
The Plan List API is paginated. The first page is0, and the default page size is 100.
Continue requesting pages until all records reported by data.total have been retrieved. Do not assume that one response contains the complete catalog.
5. Resolve prices in the required currency
Each item indata.plans is a plan detail object. The plan itself is available in item.plan. It has a default price in amount and currency, while additional configured currencies are returned in multiCurrencies.
To resolve a price for a target currency such as USD:
- If the top-level
currencyisUSD, use the top-levelamount. - Otherwise, find the enabled USD entry in
multiCurrenciesand use itsamount. - Do not calculate your own exchange rate. Use the amount returned by UniBee.
9900 means USD 99.00.
The
currency request filter selects plans by their default currency. It does not convert every returned plan into that currency. Use multiCurrencies when plans in the same catalog have different default currencies.6. Build and publish a pricing snapshot
Transform the API response into a small, application-specific structure. Keep UniBee IDs for API operations andexternalPlanId for external mapping.
7. Choose a refresh strategy
For a public pricing page, a periodic synchronization is usually sufficient. The appropriate interval depends on how often your catalog changes; common choices range from every few minutes to once per hour. Recommended safeguards:- Cache the generated catalog in your backend or CDN.
- Retry temporary API failures with exponential backoff.
- Record the synchronization time and source plan IDs.
- Reject plans that do not have an
externalPlanIdwhen stable mapping is required. - Validate that every displayed plan has a usable price in the target currency.
- Replace the published snapshot atomically only after a complete successful run.
Implementation checklist
- Merchant API calls run only on the backend.
- Only Active and Published plans are selected.
- Plan Tags define catalog membership where needed.
- Every synchronized plan has a stable
externalPlanId. - All pages are fetched using
data.total. - Prices come from the default currency or
multiCurrencies. - Amounts are converted from minor units only for display.
- The last valid snapshot remains available if synchronization fails.

