Lifetime deals
Sell a plan for good at a price that steps up as units sell, on a one-time Catalog price, with the v2 API and the Catalog page.
A lifetime deal sells one plan for good at a price that steps up as units sell, up to a total cap, and then at the regular price. It is built on a one-time price of the project Catalog that has a plan (tierAlias), works with Stripe and, in a test environment, with the native sandbox, and is managed from the Catalog page or the v2 API. Agents can load the run lifetime deals skill.
Campaigns created earlier on legacy Stripe tier prices keep working and are described in Lifetime Deal Campaigns. They are a different object: the routes below list only the deals built on a Catalog price.
How a deal works
- Steps. A deal has an ordered list of steps, each
{ unitAmount, units }: a price in minor units and how many buyers get it ("first 50 buyers pay $49, next 100 pay $69"). The total cap is the sum of the units, at most 50 steps. Give the steps directly or a generator (startAmount,increment,unitsPerStep,totalCap). - After the last step buyers pay the price the deal discounts. Every buyer gets the price's plan for good.
- One deal per plan. At most one deal per plan and environment is
active. A deal movesdraft,active,endedand an ended deal cannot be launched again. There is no pause. - Per environment. A deal belongs to one environment. Launching publishes the base price and the step prices to the project's payment provider in that environment (the hidden step prices are never listed and cannot be bought by id), so launch it in test first and again from the same price in live. A sync between environments does not copy deals.
- Not supported for deals: Razorpay, regional prices and a sold-out fallback price. A deal sells in one currency.
In the dashboard
Open Catalog, open the actions of a one-time price that has a plan and choose Lifetime deal pricing. Add the steps, optionally a name, a window and the payment link, then Save draft or Launch. A live deal shows its progress, the payment link, Edit unsold steps and End deal. Next to every price that has deals, members who may list invoices see Deals and sales: all of the price's deals, ended ones too, even when the price is archived or a newer deal exists. Opening one shows its Sales and the Refund review list, with a confirmed Revoke for members who may update prices. A member who cannot create products and prices opens a deal read-only. The Catalog page needs permission to list products, the deals list needs price:ListPrices and the sales invoice:ListInvoices; without access to the Catalog page, use the API.
The API
All routes are under /api/billstack/v2/teams/{teamId}/projects/{projectId} and use the v2 { data, meta } envelope. See the OpenAPI reference for every field.
| Call | Does | Permission |
|---|---|---|
POST /lifetime-deals | Create a draft (nothing is published). idempotencyKey is required. | price:CreatePrice |
GET /lifetime-deals, GET /lifetime-deals/{dealId} | List and read: steps, sold units, state, payment link. | price:ListPrices, price:GetPrice |
PATCH /lifetime-deals/{dealId} | Name, window, payment link on or off. | price:UpdatePrice |
PUT /lifetime-deals/{dealId}/steps | Replace the unsold steps, refused if sales moved since you read. | price:CreatePrice |
POST /lifetime-deals/{dealId}/launch | Publish to the provider and activate. | price:CreatePrice |
POST /lifetime-deals/{dealId}/end | End for good (audited, idempotent). | price:UpdatePrice |
GET /lifetime-deals/{dealId}/sales | The units sold and each buyer's access. | invoice:ListInvoices |
GET /lifetime-deals/{dealId}/payment-rejections | Payments to review for a refund. | invoice:ListInvoices |
POST /lifetime-deals/{dealId}/sales/{saleId}/revoke | End the access one sale gave. | price:UpdatePrice |
GET /lifetime-deals/public | The live offers for a pricing page. | publishable key |
Reads work with the project's bs_ key. Creating, editing, launching, ending and revoking are setup work: use a personal access token or a dashboard session. A bs_ key created since 2026-12-01 gets 403 USER_TOKEN_REQUIRED, like every catalog write. Revoking takes a person (a dashboard session or a personal access token) and refuses every API key. A call runs in its credential's own environment.
curl -X POST "$P/lifetime-deals" -H "Authorization: Bearer $BILLSTACK_SETUP_TOKEN" -H "Content-Type: application/json" -d '{
"idempotencyKey": "founders-deal-2026-12",
"basePriceVariantId": "<one-time catalog price id>",
"steps": [{ "unitAmount": 4900, "units": 50 }, { "unitAmount": 6900, "units": 100 }]
}'
curl -X POST "$P/lifetime-deals/{dealId}/launch" -H "Authorization: Bearer $BILLSTACK_SETUP_TOKEN"- Idempotent create. The same
idempotencyKeyand input returns the same deal (200,replayed: true); the same key with other input is409 IDEMPOTENCY_CONFLICT. A deal is created completely or not at all. - Safe step edits. A step with any sale is kept as it is; only later steps are replaced. Send the
soldUnitsyou read asexpectedSoldUnitsand the deal'seditableFromStepIndexasexpectedFromStepIndex. If sales moved, the answer is409 LIFETIME_DEAL_CHANGEDand nothing was written. - Launch is idempotent by state. It takes no body (any field is
400 INVALID_REQUEST, as on every write here). After502 PROVIDER_WRITE_UNKNOWN(the provider may have created a price) call it again; a provider that refuses a write answers502under its own*_FAILEDcode (for examplePRICE_CREATE_FAILED) with the message redacted. Launch, end and a step edit on an active deal are written to the team audit log.
With the TypeScript SDK (@billstack/sdk/v2; lifetimeDeals ships in the next release after 0.7.0, and the HTTP routes above work until then) the same calls are client.lifetimeDeals.create, launch, list, get, update, replaceSteps, end, sales, paymentRejections, revokeSale and publicOffers.
Show it on a pricing page
GET /lifetime-deals/public with a publishable key (pk_test_, pk_live_; the environment is the key's) returns the active deals: the current and next step price, the units left in the step, the total sold and cap, the window, the steps and the base price. It carries no payment link token, no variant or step ids and no customer data, and is cached for about 10 seconds with or without an offer, so counters can lag and a deal that just launched can take that long to appear. Show the buy button only while purchasable is true and explain reason (not_started, ended, sold_out, inactive) otherwise.
Sell it
- Checkout. A v2 checkout with
campaignTier: "<tierAlias>"instead ofpriceVariantIdsells the current step, one unit. A customer who already owns the deal gets409 LIFETIME_ALREADY_OWNED. - Payment link (optional). With the payment link on, the deal has a BillStack page
https://billing.w3dev.app/pay/<token>that opens a checkout for what the deal sells right now. Add?customer=<your user id>to buy as one of your customers; without it the buyer is a guest. Switching it off and on keeps the URL.
BillStack does not reserve units at checkout: the step price a buyer was shown is the price they pay, and each completed payment counts one unit exactly once. Under heavy concurrency at a step or cap boundary a few buyers can pay a cheaper step price after it should have sold out, and sold units can exceed the cap; the deal is then sold out.
Sales, refunds and revoking
- Sales list each unit with the amount paid, your id for the buyer and the buyer's access:
granted,pending(the provider event is not processed yet),inactive(refunded or expired at the provider) orrevoked. - Refund review lists the payments the deal did not count and the sales you revoked. A buyer who already owns the deal and pays again (for example from two open checkouts) counts no second unit and gets no second plan; the payment waits here as
ALREADY_OWNED. BillStack never refunds: refund each row at your payment provider. - Revoke ends the access one sale gave, with a reason that goes to the audit log. It is idempotent, the unit is not given back and the step price does not come back, and a late provider event of that payment cannot give the access back. Your webhook endpoints receive
entitlement.updated(causelifetime_deal_revoked) when the buyer had access. Only access changes: the payment still reads as paid, and a refund you make later is still seen as a refund. A sale with no grant that is older than one hour answers409 SALE_ACCESS_NOT_FOUNDand nothing changes. It changes no money: refund the payment at the provider, where the sale then shows in the refund review. The buyer can check out again at the price then on sale.
MCP
create_lifetime_deal (project write access and price:CreatePrice; takes an optional idempotencyKey) and set_lifetime_deal_payment_link (price:UpdatePrice) call the same service as the routes and answer the v2 deal view ({ deal, replayed }, { deal }), with an invalid input listed field by field. The campaign tools list_lifetime_campaigns, get_lifetime_campaign_status, set_lifetime_campaign_status and update_lifetime_campaign read, launch, end and edit the steps of a deal too. Those four campaign tools are older: set_lifetime_campaign_status and update_lifetime_campaign need only project:UpdateProject and write no audit row, so use the routes when you need the price:* permissions or the audit trail. Sales, the refund list and revoking are routes and dashboard only.