Examples

Prepaid credits

Sell a balance up front, take your margin at the top-up, and let the meter run it down.

The credit model: a customer buys $20 of credit, you keep a share, and the rest is spendable. The markup is taken once, at the top-up, not added to every call, which is why the arithmetic is worth showing your customer plainly.

How the markup lands

They payMarkupThey can spendYou accrue
$10.0020%$8.33$1.67
$25.0020%$20.83$4.17
$100.0010%$90.91$9.09

A tenant who reads "20% markup" as "+20% on each call" will mis-price their product. The console shows this worked example on the bundle editor for exactly that reason.

Granting credit after payment

ts

Pass the payment event id as idempotencyKey. Stripe retries webhooks, and a double grant is money you gave away.