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/prices

Create a price attached to a product. Use type "one_time" for checkout of a single purchase or "recurring" for subscription plans.

Body Parameters

NameTypeDescription
product
stringrequiredThe product id this price belongs to.
unit_amount
numberrequiredAmount 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
stringrequiredEither "recurring" or "one_time".
currency
stringISO 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
objectRequired when type is "recurring". Describes the billing cadence.
interval
stringEither "month" or "year".
interval_count
numberNumber of intervals between renewals. Defaults to 1.
trial_period_days
numberFree-trial length in days. When set, the first charge is deferred.
metadata
objectSet 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/prices

List the 100 most recent prices, newest first. Defaults to active prices only. Optionally filter by product.

Query Parameters

NameTypeDescription
product
stringRestrict to prices belonging to this product.
active
stringOmit (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/:id

Retrieve a price by its id.

Path Parameters

NameTypeDescription
id
stringrequiredThe 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/:id

Update 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

NameTypeDescription
id
stringrequiredThe price id being updated.

Body Parameters

NameTypeDescription
apply_mode
stringrequired"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
numberNew unit amount, in the smallest currency unit.
trial_period_days
numberNew trial length. Pass null to clear.
tax_mode
stringOverride the tax mode ("inclusive" or "exclusive").
effective_date
stringRequired 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
objectSet 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_migration

Cancel 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

NameTypeDescription
id
stringrequiredThe 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
  }
}