An abstraction over currency for usage-based plans

Credits allow you to abstract away the unit costs of your API from your customers. They can be helpful in marketing materials, communications with customers, and collecting revenue upfront.

In traditional usage-based billing, customers pay for their usage in arrears, at the end of a billing cycle (read more about arrears here. Perhaps, though, you want to charge customers upfront, to generate revenue earlier in the billing cycle. Perhaps you also have an easier time marketing your product by advertising fixed upfront monthly fees. Credit-funded usage plans might make sense for you.

Using Credits

Using credits in your plan definitions requires two components:

  1. Define an overage cost per credit. Overage costs define the price (in real currency) for each credit used above a quota allocated in a credit-funded plan. You can define a different overage cost per credit for each currency you support.
  2. Define a credit-funded plan. Credit-funded plans are just like normal usage plans, except that instead of pricing plans in USD or JPY or any other currency, you define pricing in credits.

To illustrate credits and overage costs more clearly, let's walk through an example:

Let's say that Mailman from our Quick Start example wanted to use credit-funded plans. They may set their customers up with a package that consists of two plans:

  • a subscription plan which costs $99/month and includes 10,000 credits
  • a usage plan which costs 1 credit per message sent

Mailman also defines the USD overage cost as $0.02 per credit.

Now, let's say that one of Mailman's customers is Drivr, a ride-share app. Drivr historically sends 6,000-8,000 messages per month through Mailman. Each month Drivr pays $99, and their invoice contains a single line item:

  • Subscription Plan: $99, including 10,000 credits

But in August, Drivr has a busier-than-normal month, and sends 11,000 messages through Mailman. At the start of the month, they paid their $99 subscription, and throughout the month they exceeded their allocated 10,000 credits for August. On their next bill, at the end of August, Drivr will see a second line item on their invoice:

  • Subscription Plan: $99, including 10,000 credits
  • USD Credit Overages: $20 (1,000 overage credits * $0.02 per overage credit)

Did this page help you?