Skip to main content
POST
Python SDK
Pass the exact customerId as a URL-encoded query value. The plan stays the default: an override replaces its overage price for one customer, for example after you agree a lower rate with them. It never turns overage on. The plan must already have overage, otherwise the request returns 409 plan_has_no_overage.
  • planId scopes the override to one plan (by its API ID, so it keeps applying after you publish a new version of that plan). Omit it or send null to apply the override to any plan with overage. A plan-specific override beats one for any plan.
  • unitAmountCents is the price per billingUnits overage credits (default 1), in whole cents. For example, { "unitAmountCents": 100, "billingUnits": 10 } is $1.00 per 10 credits.
  • capCents is an optional monthly cap for this override. Leave it out to keep the plan’s default cap. A cap the customer set with Set a customer’s overage cap still wins over both.
Send { "planId": "pro", "unitAmountCents": null } to clear the override for that scope and restore the plan rate. There is no delete route. Ledger keeps every change, so the rate history stays. The new rate applies from the next Track usage request. Usage already recorded keeps the rate it was recorded at, so a change mid-period bills as two lines on the renewal invoice: one at the plan rate and one marked “(negotiated rate)”. Get a customer returns the effective rate with overage.source set to override. Overrides aren’t available for live customers yet, because live plans can’t have overage yet: live requests return 409 overage_not_available_in_live_mode. Unknown customers return 404 customer_not_found, and an unknown planId returns 404 plan_not_found. The key needs the customers:write permission.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

customerId
string
required
Required string length: 1 - 255

Body

application/json
unitAmountCents
integer | null
required

Negotiated price in cents per billingUnits overage credits. Null clears the override for this planId and restores the plan rate.

Required range: x <= 2147483647
planId
string | null

The plan this override applies to. Omit or null to apply it to any plan; a plan-specific override beats one for any plan.

Required string length: 1 - 255
billingUnits
integer

Credits billed per unitAmountCents. Defaults to 1. Omit when clearing.

Required range: x <= 2147483647
capCents
integer | null

Monthly overage cap in cents for this override. Omit or null to keep the plan default. The customer's own cap (setCustomerOverageCap) still wins. Omit when clearing.

Required range: 0 <= x <= 2147483647

Response

Customer overage override saved or cleared

customerId
string
required
planId
string | null
required

The scope that was set or cleared. Null: any plan.

override
object | null
required

The override now in force for this planId scope. Null once cleared.

overage
object | null
required

The effective overage terms on the customer's active paid plan, after this change.