Skip to main content
POST
cURL
Sets the total seats of the customer’s license of the seat plan planId, included seats counted, and needs an Idempotency-Key. Raising bills the paid seats added on the seat price, prorated to the period end, on its own invoice; the seats are added once it’s paid, and a new seat’s holder gets the seat plan’s allowance for what was left of the period. Lowering is scheduled for the period end, whose renewal bills fewer, and never goes below the assigned seats (409 seats_assigned). The same total, and seats that cost nothing, bill nothing. The answer is { itemChangeId, status, paymentUrl, license }: applied, scheduled, pending_payment (pay at paymentUrl), processing (retry with the same key) or closed. See Seats and licenses. Needs the Billing permission.

Authorizations

Authorization
string
header
required

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

Headers

idempotency-key
string

Required. The same key answers the same change, so a retry never bills twice.

Body

application/json
customerId
string
required

Your ID for the customer, such as your user ID.

Required string length: 1 - 255
planId
string
required

The seat plan whose license to set: a plan the customer's plan sells seats of (its licenses).

Required string length: 1 - 255
Example:

"seat"

seats
integer
required

The license's new total seats, the included ones counted. Raising it bills the paid seats added, prorated for the rest of the period; the same total changes nothing.

Required range: x <= 100000
Example:

5

Response

The seat change: applied (the license holds the new total), waiting on payment, or still settling. A raise bills the paid seats added on the seat price, a credit at the old paid seats and a charge at the new, prorated to the period end.

itemChangeId
integer | null
required

The billing change a paid raise made, the same on every retry with its Idempotency-Key. Null when nothing was billed: the same total, or seats that cost nothing.

status
enum<string>
required

applied: the license holds the new total. pending_payment: the invoice needs the customer at paymentUrl, and nothing changes until it's paid. processing: Stripe is still settling it; retry with the same key. closed: the invoice was voided and nothing changed.

Available options:
applied,
pending_payment,
processing,
closed
paymentUrl
string | null
required
license
object | null
required

The license as it stands now.