Skip to content
All changes

Billing fixes, and checks that catch a wrong price or Stripe key

A downgrade on another billing interval now credits unused time already paid for, and bursts of usage are billed in full, once. A price can no longer be set twice in one currency, and a test Stripe key cannot be paired with a live one.

Added
2
  • BillingYour pricing page can now tell which plan a subscriber is on without comparing names. Each plan in GET /api/v1/public/:orgId/plans/:groupSlug names its plan, with _id and slug, so you can match on planVersion.plan._id instead of the name.
  • BillingThe Usage screen in @buildbase/sdk 1.0.0 now prices overage (usage past the allowance) in the currency the subscription bills in. GET /api/v1/public/workspaces/:id/subscription answers subscription.currency, the lower-case code it bills in (null on a Free row).
Improved
3
  • BillingA price can no longer be set twice in one currency. A plan version, credit pack or add-on that prices one currency twice is refused with 400 ("USD is priced twice: send one price per currency."). Before, it was saved, and the price shown could differ from the one charged.
  • BillingBilling > Credentials no longer accepts a test key beside a live one. A publishable key and a secret key from different Stripe modes, such as pk_test_ beside sk_live_, are refused with 400 STRIPE_KEY_MODE_MISMATCH. Before, the pair was saved and payments then failed.
  • BillingPayment webhooks details now show the Stripe event ID, under Webhook event. Prices made in Stripe for a plan version carry your organization id in their metadata (the extra labels Stripe keeps on a price), as other prices already did.
Fixed
6
  • BillingMoving to a cheaper plan on a different billing interval, such as yearly to monthly, now credits the unused time already paid for. The change takes effect at once. Before, that paid time was lost, and the old plan stayed on until the end of the new period. A downgrade on the same interval, or during a trial, still waits.
  • BillingBursts of usage are now billed in full, once. When several calls report usage at the same moment and together cross an allowance or a billing block, every block is billed once. Before, part of a burst could go unbilled.
  • BillingCancelling or resuming a subscription that Stripe had already ended now closes it the way Stripe's own cancellation does. The subscription.canceled event is sent, and the period's plan credits end.
  • BillingA deleted plan version or pricing group version draft can no longer be published by its id. It answers 400 and says to unarchive it or create a new version.
  • ConsolePrice fields in the plan version, pricing tier and credit pack editors now keep what you type until you leave the field. Before, typing 29 saved 2.01.
  • ConsoleLoad more on a workspace's invoices now adds the next, older page, instead of the same 20 again.

Use what shipped this week

Everything in this release is already in the console and the SDK.

Free plan7-day free trial on paid plansNo credit card required