Products & prices
Your catalog has two levels, just like Stripe:
- Product (
prod_…) — the thing you sell (“Pro plan”). - Price (
price_…) — a recurring amount + interval attached to a product (“NPR 499 / month”). Subscriptions reference a price, not a product.
A product can have many prices (monthly vs. annual, different tiers).
Create a product
Section titled “Create a product”curl -s "$TRILE_API/v1/catalog/products" \ -H "x-api-key: $TRILE_KEY" -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "name": "Pro plan", "description": "Everything in Pro." }'You can attach a product image with POST /v1/catalog/products/:productId/image (multipart;
SVG/PNG/JPEG up to 2 MB).
Prices
Section titled “Prices”A price pins down how much and how often. Amounts are in paisa, as a string.
curl -s "$TRILE_API/v1/catalog/prices" \ -H "x-api-key: $TRILE_KEY" -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "productId": "prod_01ARZ3NDEKTSV4RRFFQ69G5FAX", "amount_paisa": "49900", "currency": "NPR", "interval": "month", "intervalCount": 1, "trialDays": 14 }'| Field | Notes |
|---|---|
amount_paisa | Recurring amount in paisa, as a string. "49900" = NPR 499.00. |
interval | day, week, month, or year. |
intervalCount | Multiplier. interval: "month", intervalCount: 3 → quarterly. |
trialDays | Optional free trial before the first charge. With a trial, the first wallet debit is deferred to the end of the trial. |
Archiving
Section titled “Archiving”Prices and products are immutable in the ways that matter — you don’t edit an amount, you create a new price and archive the old one:
curl -X DELETE "$TRILE_API/v1/catalog/prices/price_01ARZ3..." -H "x-api-key: $TRILE_KEY"Archiving a price (soft delete) stops new subscriptions from using it; existing subscriptions on
that price keep billing. PATCH is for metadata and non-financial fields, not the amount.
Put a customer on a price: Subscriptions.