BillKit/DocsConsole
Products

Update product

Update a product's details, or archive it.

POST/v1/products/{product_id}
Operation update_product·Scope products:write·OpenAPI v1.1.0

Parameters

ParameterDescription
product_idstring · pathrequiredId of the product, which starts prod_.
activebooleanoptionalfalse archives the product: its prices cannot be used for new checkouts or plan changes, and no new price can be created under it. Existing subscriptions keep renewing. true restores it.
allow_promotion_codesbooleanoptionalWhether a buyer may enter a coupon code at checkout for this product's prices.
default_price_idstring | nulloptionalAn active price of this product, offered by the billing portal on its interval. null clears it. At most 64 characters.
descriptionstring | nulloptionalLonger description of the product. null clears it. At most 2048 characters.
marketing_featuresarray of string | nulloptionalFeature lines listed in the billing portal's plan picker. Replaces the list whole; null clears it.
metadataobjectoptionalReplaces the stored metadata whole. Send {} to empty it. At most 50 keys.
namestringoptionalThe product's name, shown to customers. At most 255 characters.

Returns

Returns a ProductResponse object.

Errors

StatusCause
400The request was refused (type: invalid_request_error): a required parameter is missing (parameter_missing), one failed validation (parameter_invalid) or is not one the operation takes (parameter_unknown), and param names it.
401No credential, or one that does not authenticate.
402The account is suspended (tenant_suspended), or the payment provider refused a charge or refund the call made (type: payment_error, code: payment_refused).
403Authenticated, but not allowed: missing scope (insufficient_scope), a key of the wrong mode (mode_mismatch), or a refused origin. Needs the products:write scope.
404No such object in this account and mode.
409Conflicts with the object's current state (state_conflict, or a more specific code), or an operation still in flight (operation_pending).
413The request body is larger than the API accepts.
429Rate limited. Retry-After says when to try again.
500Something failed on BillKit's side (type: api_error). Retry with the same Idempotency-Key.
502The payment provider failed or did not answer.
503Temporarily unable to serve. reason says whether the request was attempted.
Request · curl
curl -X POST https://api.billkit.eu/v1/products/prod_9XKp2vQ1 \
  -H "Authorization: Bearer $BILLKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Request body · every field
{
  "active": false,
  "allow_promotion_codes": false,
  "default_price_id": "default_price_9XKp2vQ1",
  "description": "string",
  "marketing_features": [
    "string"
  ],
  "metadata": {
    "key": "value"
  },
  "name": "Ada Lovelace"
}
Response · 200 OK
{
  "active": false,
  "allow_promotion_codes": false,
  "archived_at": 1789392000,
  "created": 1789392000,
  "default_price": {
    "active": false,
    "amount_cents": 1900,
    "billing_scheme": "per_unit",
    "currency": "EUR",
    "id": "obj_9XKp2vQ1",
    "interval": "month",
    "object": "price.summary",
    "payment_methods": [
      "creditcard"
    ],
    "payment_methods_from_account": false,
    "product_id": "prod_9XKp2vQ1",
    "product_name": "Ada Lovelace",
    "tax_behavior": "inclusive",
    "tiers_mode": "graduated",
    "trial_days": 0,
    "unit_amount_decimal": "string",
    "usage_type": "licensed"
  },
  "default_price_id": "default_price_9XKp2vQ1",
  "description": "string",
  "id": "prod_9XKp2vQ1",
  "livemode": false,
  "marketing_features": [
    "string"
  ],
  "metadata": {
    "key": "value"
  },
  "name": "Ada Lovelace",
  "object": "product",
  "prices": [
    {
      "active": false,
      "amount_cents": 1900,
      "billing_scheme": "per_unit",
      "currency": "EUR",
      "id": "obj_9XKp2vQ1",
      "interval": "month",
      "object": "price.summary",
      "payment_methods": [
        "creditcard"
      ],
      "payment_methods_from_account": false,
      "product_id": "prod_9XKp2vQ1",
      "product_name": "Ada Lovelace",
      "tax_behavior": "inclusive",
      "tiers_mode": "graduated",
      "trial_days": 0,
      "unit_amount_decimal": "string",
      "usage_type": "licensed"
    }
  ],
  "stats": {
    "active_price_count": 1900,
    "currency": "EUR",
    "mrr_cents": 1900,
    "object": "product.stats",
    "subscriber_count": 0
  }
}