Prices
A price is how much you charge for a product and at what cadence. A product can have many prices (monthly, yearly, tiered test/live equivalents).
POST
/v1/pricesCreate a price attached to a product. Use type "one_time" for checkout of a single purchase or "recurring" for subscription plans.
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
product | string | required | The product id this price belongs to. |
unit_amount | number | required | Amount in the smallest currency unit (agorot for ILS). Must be a non-negative integer; use 0 to model a free plan (subscriptions still get created and dispatch webhooks, but no charge or invoice is issued). |
type | string | required | Either "recurring" or "one_time". |
currency | string | ISO 4217 currency code. Defaults to "ils". | |
tax_mode | string | "inclusive" (default) means unit_amount already includes VAT. "exclusive" means VAT is added on top at charge time. | |
recurring | object | Required when type is "recurring". Describes the billing cadence. | |
interval | string | Either "month" or "year". | |
interval_count | number | Number of intervals between renewals. Defaults to 1. | |
trial_period_days | number | Free-trial length in days. When set, the first charge is deferred. | |
metadata | object | Set of key-value pairs you can attach to the object for your own use. Returned as-is on retrieval. |
Request
curl -X POST "https://api.ching.co.il/ching/v1/prices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product": "example_product",
"unit_amount": 0,
"type": "example_type",
"currency": "example_currency",
"tax_mode": "example_tax_mode",
"recurring": {},
"metadata": {}
}'Response
Response
{
"success": true,
"data": {
"id": "price_QA8qF3B3VIqE",
"object": "price",
"product": "prod_Lkt0TxOhGNMY",
"currency": "ils",
"unit_amount": 9900,
"tax_mode": "inclusive",
"type": "recurring",
"recurring": {
"interval": "month",
"interval_count": 1,
"trial_period_days": null
},
"active": true,
"archived_at": null,
"active_subscriptions_count": 0,
"pending_migration": null,
"metadata": {},
"livemode": false,
"created": "2026-04-10T08:01:00.000Z"
}
}GET
/v1/pricesList the 100 most recent prices, newest first. Defaults to active prices only. Optionally filter by product.
Query Parameters
| Name | Type | Description | |
|---|---|---|---|
product | string | Restrict to prices belonging to this product. | |
active | string | Omit (default) or pass "true" for active prices, "false" for archived prices only, or "all" for both. |
Request
curl -X GET "https://api.ching.co.il/ching/v1/prices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"success": true,
"data": [
{
"id": "price_QA8qF3B3VIqE",
"object": "price",
"product": "prod_Lkt0TxOhGNMY",
"currency": "ils",
"unit_amount": 9900,
"tax_mode": "inclusive",
"type": "recurring",
"recurring": {
"interval": "month",
"interval_count": 1,
"trial_period_days": null
},
"active": true,
"archived_at": null,
"active_subscriptions_count": 0,
"pending_migration": null,
"metadata": {},
"livemode": false,
"created": "2026-04-10T08:01:00.000Z"
}
]
}GET
/v1/prices/:idRetrieve a price by its id.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | string | required | The price id. |
Request
curl -X GET "https://api.ching.co.il/ching/v1/prices/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"success": true,
"data": {
"id": "price_QA8qF3B3VIqE",
"object": "price",
"product": "prod_Lkt0TxOhGNMY",
"currency": "ils",
"unit_amount": 9900,
"tax_mode": "inclusive",
"type": "recurring",
"recurring": {
"interval": "month",
"interval_count": 1,
"trial_period_days": null
},
"active": true,
"archived_at": null,
"active_subscriptions_count": 0,
"pending_migration": null,
"metadata": {},
"livemode": false,
"created": "2026-04-10T08:01:00.000Z"
}
}POST
/v1/prices/:idUpdate a price. Depending on apply_mode, CHING either edits the row in place, archives it and creates a new price, or schedules a future migration of existing subscribers.
For "new_subscribers_only" and "scheduled" the response is 201 and returns the NEW price object. For "now" it returns 200 with the updated existing price. Scheduled migrations block if any affected subscriber already has a pending change in flight (409 pending_change_in_flight).
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | string | required | The price id being updated. |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
apply_mode | string | required | "now" edits the row in place - allowed only when no active subscribers reference it. "new_subscribers_only" archives this price and returns a fresh price for future checkouts; existing subscribers keep billing against the archived row. "scheduled" archives this price, creates a fresh one, and migrates existing subscribers at effective_date. |
unit_amount | number | New unit amount, in the smallest currency unit. | |
trial_period_days | number | New trial length. Pass null to clear. | |
tax_mode | string | Override the tax mode ("inclusive" or "exclusive"). | |
effective_date | string | Required when apply_mode is "scheduled". ISO 8601 timestamp, must be at least 30 days in the future. CHING emails affected customers a notice before the change applies. | |
metadata | object | Set of key-value pairs you can attach to the object for your own use. Returned as-is on retrieval. |
Request
curl -X POST "https://api.ching.co.il/ching/v1/prices/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"apply_mode": "example_apply_mode",
"unit_amount": 0,
"trial_period_days": 0,
"tax_mode": "example_tax_mode",
"effective_date": "example_effective_date",
"metadata": {}
}'Response
Response
{
"success": true,
"data": {
"id": "price_QA8qF3B3VIqE",
"object": "price",
"product": "prod_Lkt0TxOhGNMY",
"currency": "ils",
"unit_amount": 9900,
"tax_mode": "inclusive",
"type": "recurring",
"recurring": {
"interval": "month",
"interval_count": 1,
"trial_period_days": null
},
"active": true,
"archived_at": null,
"active_subscriptions_count": 0,
"pending_migration": null,
"metadata": {},
"livemode": false,
"created": "2026-04-10T08:01:00.000Z"
}
}DELETE
/v1/prices/:id/pending_migrationCancel a scheduled migration created with apply_mode=scheduled. Clears pending_price fields on every affected subscription whose effective_date has not yet passed.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | string | required | The id of the NEW price returned by the scheduled update. |
Request
curl -X DELETE "https://api.ching.co.il/ching/v1/prices/:id/pending_migration" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"success": true,
"data": {
"cleared": 3
}
}