Add a fee to a plan

View as Markdown

Attaches a fixed (flat) or usage-based (per_unit / cost_plus) fee to a plan. The product and price can be referenced by ID or created inline in the same call. Multiple versions of a fee for the same product are allowed as long as their effective date ranges do not overlap.

Authentication

AuthorizationBearer
API key obtained from the Grant dashboard

Path parameters

idstringRequiredformat: "cuid"

Request

This endpoint expects an object.
product_idstringOptionalformat: "cuid"
Existing product to attach the fee to
productobjectOptional

Create a new product inline instead of using product_id

price_idstringOptionalformat: "cuid"

Existing price to bill. The fee is attached to the price’s product, so product_id/product must be omitted.

priceobjectOptional

Create a new price inline instead of using price_id

effective_fromstring or nullOptionalformat: "^\d{4}-\d{2}-\d{2}(T.*)?$"

Date the fee becomes effective (YYYY-MM-DD in the company’s timezone, or ISO datetime). Null or omitted = effective immediately.

effective_tostring or nullOptionalformat: "^\d{4}-\d{2}-\d{2}(T.*)?$"

Date the fee stops being effective. Null or omitted = open-ended.

Response

Fee created
successboolean
feeobject
request_idstring

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error