Charge per seat
Say "charge $15 a month for each person on the account" and get a per-seat Offer whose count follows the people in each customer account.
For developers
A per-seat Offer counts the people in each Customer's workspace, its Tenant, and bills for each one. Someone joins, the next invoice adds a part-month charge; someone leaves, the seat comes off.
For developers
Needs Let customers sign in
What you get
- 1Offer at $15 per person per monthOffer
- 1seat count per customer, taken from the people in their accountSubscription
- 1part-month charge or credit each time someone joins or leavesInvoice
- 1seat line on the pricing page and each invoiceInvoice
Your agent does
You, to your agent
Charge $15 a month for each person on the team.
Charge per seat.
Bill for every user they add.
# 1. Offer.create
OFFER= $(curl -X POST https: //api.sb/ leaseline.app/ offers \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"price": {"amount": 15, "currency": "USD"}, "interval": "month", "seats": "members", "terms": "Monthly, per person on the account. Added people bill from the day they join."}' | jq -r '.offer["$id"] | split("/ ") | last')
# 2. Offer.publish
curl -X POST https: //api.sb/ leaseline.app/ offers/ $OFFER/ publish \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
import { $ } from 'startup-builder'
const offer = await $.Offer.create({ price: { amount: 15, currency: 'USD' }, interval: 'month', seats: 'members', terms: 'Monthly, per person on the account. Added people bill from the day they join.' })
await $.Offer.publish({ offer: offer.$id })
OFFER= $(npx startup-builder do Offer.create --json '{"price": {"amount": 15, "currency": "USD"}, "interval": "month", "seats": "members", "terms": "Monthly, per person on the account. Added people bill from the day they join."}' | jq -r '.offer["$id"] | split("/ ") | last')
npx startup-builder do Offer.publish --json '{"offer": "'"$OFFER"'"}'
{
"name": "do",
"arguments": {
"code": "const offer = await $.Offer.create({ price: { amount: 15, currency: 'USD' }, interval: 'month', seats: 'members', terms: 'Monthly, per person on the account. Added people bill from the day they join.' })\nreturn await $.Offer.publish({ offer: offer.$id })"
}
}
Change it
- Include the first three people free.
- Bill a seat only once someone signs in.
- Let admins cap how many seats they pay for.
Under the hood
- Systems
- Billing
- Nouns
- Offer, Subscription, Tenant
- Events
Offer.created,Offer.published,Subscription.resized- Stripe objects
Product,Price,Subscription