Catalog sync
Products and pricing tiers are managed from your code, not the dashboard. You keep a catalog file in your repo and push it with your secret key — so pricing is versioned, reviewable, and the same across environments. The dashboard shows the result read-only.
1. Declare your catalog
Commit a payouts.catalog.json describing each product (by tier) and its regional prices. unit_amount is in minor units (paise/cents). The optional app block sets your homepage and pricing links (shown on your product page).
json
{
"app": {
"homepage_url": "https://blogs.elixpo.com",
"pricing_url": "https://blogs.elixpo.com/pricing"
},
"products": [
{
"tier": "member",
"name": "Blogs Member",
"description": "Member-only reads, higher limits…",
"prices": [
{ "nickname": "India", "currency": "INR", "unit_amount": 19900, "interval": "month", "region": "IN" },
{ "nickname": "Global", "currency": "USD", "unit_amount": 600, "interval": "month" }
]
}
]
}2. Push it with your secret key
http
POST https://payouts.elixpo.com/v1/sync
Authorization: Bearer <ELIXPO_PAY_API_KEY>
Content-Type: application/json
<the contents of payouts.catalog.json>A tiny script makes it a one-liner you can run in CI or by hand:
javascript
// scripts/sync-catalog.mjs
import { readFile } from "node:fs/promises";
const catalog = JSON.parse(await readFile("payouts.catalog.json", "utf8"));
const res = await fetch("https://payouts.elixpo.com/v1/sync", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.ELIXPO_PAY_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ products: catalog.products }),
});
console.log(await res.json());How sync reconciles
- Each product upserts by
(app, tier)— same tier updates in place. - Prices reconcile by
(currency, region, interval)— matching prices update, new ones are added. - An active price that's no longer in the file is deactivated (never hard-deleted, so history stays intact).
- Send a single product as the bare object, or many under
products.
Read it back
Render your pricing page from the live catalog — public, no secret needed:
http
GET https://payouts.elixpo.com/v1/catalog?app=<your-client-id>