Skip to content

Pricing and payments ​

Each API has its own pricing and its own Stripe connection, both on the API's Billing tab. You can charge per request, sell monthly plans or do both, or turn billing off for an API that charges nobody. MicroAuth takes no cut of what your customers pay you.

Billing on or off ​

The switch at the top of the Billing tab decides whether an API can charge anyone. Only workspace owners and admins can change it, and the dashboard asks you to confirm first.

  • On. Pay as you go and monthly plans can each be on or off, and customers pay you through Stripe once you connect it right below the switch.
  • Off. Nothing is ever charged. There is no pay as you go, no plans, no credit and no Stripe, and the portal has no balance and no Billing page. Requests are still counted, and your default limits and any custom limits still apply.

Who can join is a separate setting, under Settings, Sign up. See sign up modes. Together they cover the usual cases:

You wantSign upBilling
To sell to anyoneOpenOn
To sell to partners you vetApproval or Invite onlyOn
A free public APIOpenOff
An internal APIInvite onlyOff

Turning billing off works once nothing can still charge anyone:

  • Stripe is disconnected. Its card is right below the switch.
  • No customer pays for a plan through Stripe. Cancel those subscriptions in Stripe first.
  • No paid plan is active or has customers. Archive paid plans and move their customers off them.

Then pay as you go and plans turn off, and sign up stays as it is. Customers and their keys keep working within their limits, and balances are kept in case you turn billing back on.

Turning billing on leaves pay as you go and plans off until you turn them on. Balances from before count again, and so do custom prices you set on customers. To take payments, connect Stripe on the same tab.

Presets ​

When you create an API you pick a starting point. Every value can be changed later.

PresetBillingSign upCustomers get
Pay as you goOnOpen$0.001 per billable request from prepaid credit, with a $1 welcome credit, at 10 requests a second. These are placeholders for you to change
Free with a quotaOffOpen10,000 free requests a month at 5 requests a second
Monthly plansOnOpenThe plans you add, with your own prices. Without a plan, 1,000 free requests a month at 2 requests a second
Internal APIOffInvite onlyFree requests at 10 a second, with no monthly quota

The first three are the choices under Sell an API. Choosing Protect an internal API instead starts from the last one. See internal APIs.

Monthly plans starts with plans turned on and none in the list, since you decide what to sell. Customers can only subscribe once you add a plan, and the overview's Get set up list reminds you until you do. See monthly plans.

Pay as you go ​

Customers prepay credit, and each billable request is deducted from their balance at your price. When the balance can't cover a request, your API answers 402 until they top up.

SettingDefaultWhat it does
Price per billable request$0.001Charged for each response with a billable status code
Welcome credit$1.00Given once to every new customer so they can try your API
Top up amounts$10, $25, $100Buttons on the portal's Billing page
Minimum top up$5Smallest custom amount a customer can pay
Low balance email$2.00Customers are emailed once when their balance drops below it, and can change the amount on the portal's Billing page. 0 turns it off. See emails to your customers
Automatic top upsAllowedCustomers can save a card that is charged when their balance runs low. See automatic top ups

With pay as you go off, nobody can buy credit, there is no welcome credit, and customers without a plan use your default limits for free. A customer with a custom price still pays it. To charge nobody at all, turn billing off.

Placeholder pricing ​

The price per billable request, the welcome credit and the requests a second that MicroAuth fills in are placeholders, not a suggestion for your API. You get them when you create an API with the Pay as you go preset, and when you turn pay as you go on later while the price or the welcome credit is 0. Turning it on also sets 10 requests a second if there was no rate limit.

While the placeholders are in place, the Billing tab says so, and the overview's Get set up list has a Set your prices step. Both go away once you change the price, the welcome credit or the requests a second, or click Keep these prices to make them yours.

Automatic top ups ​

When your API allows automatic top ups and Stripe is connected, customers can have a saved card charged whenever their balance drops below a threshold they choose. They can turn it on as soon as they have a saved card, without buying credit first. If the balance is already below the threshold when they save, the page asks first and then tops up right away.

The portal's Billing page shows the card that gets charged, like "Visa ending in 4242, expires 08/29".

  • Add a card opens Stripe to save a card without paying anything. Ticking Save this card for automatic top ups on a top up works too. Either way, the card becomes the default card in Stripe.
  • Manage cards opens the Stripe billing portal, where customers add or remove cards and pick the default. Changes show up within seconds, and right away when they come back to the Billing page.

MicroAuth charges the default card in Stripe if it is a card that hasn't expired. Otherwise it charges the newest saved card that hasn't expired. A card works until the end of its expiry month.

If the last usable card is removed or expires, top ups pause but stay turned on. The team's admins and billing members get one email with an Add a card button, and adding a card starts top ups again with the same settings. When the balance is below the threshold by then, the first top up runs within a few minutes, even if the balance ran out and requests are getting 402. In the dashboard, the customer's page shows which card is charged, and a Paused, no card saved badge while top ups are paused.

Default limits ​

Requests a second and requests a month apply to every customer without a plan or custom limits. 0 means no limit. While billing is on, the billable status codes, 200 to 206 by default, live here too. They're hidden while billing is off, since nothing is charged.

Monthly plans ​

Plans are subscriptions your customers pick on the portal and pay through Stripe. Each plan has:

  • A price a month. 0 makes a free plan that customers can switch to without paying. Changing the price only affects new subscriptions.
  • An optional free trial of up to 365 days, for paid plans. 0, the default, means no trial. See free trials.
  • Optional requests a month, requests a second and price per billable request. Blank fields use your defaults. A price of 0 includes every request in the plan.
  • Credit each month, added to the balance on every paid invoice. Use it for plans that include a dollar amount of usage. A free trial has no credit, and the first credit comes with the first payment.
  • Visibility. Public plans are listed on the portal. Private plans are only offered to customers you put on them from their page in the dashboard.

Deleting a plan with subscribers archives it instead: they keep it until they cancel, and nobody new can pick it.

How customers subscribe ​

  • A new subscription goes through Stripe Checkout. The plan starts as soon as Stripe confirms the payment, or right away when it comes with a free trial.
  • Moving from one paid plan to another changes the subscription in place, and Stripe prorates the difference. During a free trial it goes through Checkout instead, and the new plan is paid right away.
  • To cancel, customers open Invoices and cards on the portal's Billing page. They keep the plan until the end of the period they paid for, or until their trial ends.
  • A free plan applies right away. A customer with a paid plan cancels it first.

You can also put a customer on any plan yourself from their page. That plan isn't billed through Stripe, which suits invoices you send yourself.

Free trials ​

Give a paid plan some trial days, and new subscribers get that long for free before Stripe charges the first month. The portal shows the trial on the plan, and its button reads Start free trial.

  • Checkout asks for a card even though nothing is due yet, and only takes cards, so there's a card to charge when the trial ends.
  • The plan's limits apply during the trial. Its credit each month starts with the first payment.
  • Each customer team gets one trial of your plans, and so does each card. When a team that had a trial subscribes again, or pays with a card that started a trial of your plans before, MicroAuth cancels the new subscription in Stripe before anything is charged and emails the team why. They can choose the plan again, and it starts right away without a trial.
  • The team gets a reminder 3 days before the trial ends, with the date and the price. Shorter trials get none, since the first email names the date.
  • Canceling before the end means they're never charged. Choosing another paid plan during the trial ends it.
  • Changing a plan's trial days only affects new subscriptions, and a team that already pays for a plan gets no trial when it moves to another one.

Cards are matched by the fingerprint Stripe gives each card number, never the number itself. A few cards can still look new: a virtual card has a number of its own, and Apple Pay or Google Pay can pass a number made for the device instead of the card's. Fingerprints come from your Stripe account, so after you connect a different one, cards can look new too. See saved cards for what is kept.

The customer's page in the dashboard shows Free trial until and the date, and the activity log records each trial that starts and each one that is refused.

Stripe ​

Payments go straight to your own Stripe account through Stripe Connect. A workspace admin clicks Connect with Stripe on the API's Billing tab, signs in to Stripe and approves the connection. That's all the setup there is: no keys to copy and no webhooks to configure.

Once connected:

  • Top ups and subscriptions use Stripe Checkout, with your business name on the payment page. MicroAuth then emails the customer a payment confirmation.
  • Your plans are created as products and prices in your Stripe account and kept in sync when you edit them.
  • Customers manage cards and invoices in the Stripe billing portal, through Invoices and cards or Manage cards. Card changes there reach MicroAuth within seconds.
  • Recent payments, at the bottom of the Billing tab, lists top ups, plan payments, refunds and disputes.

If MicroAuth suspends your API, billing for your customers pauses: renewals aren't charged and automatic top ups don't run. They keep their plans, billing resumes when the suspension is lifted, and your own MicroAuth plan keeps billing as usual.

If Stripe needs more details before you can take payments, the Stripe card says so. Finish the setup in Stripe, then click Refresh. A Test mode badge shows when you connected a Stripe test account.

Refunds and disputes ​

Handle them in Stripe as usual, and MicroAuth follows:

  • A refund of a top up removes that credit from the customer's balance, and the customer gets an email about the refund.
  • A dispute removes the credit while it is open, and puts it back if you win. The customer gets an email each time their balance changes this way. Workspace owners and admins always get an email when one opens, and one when it's won or lost unless they turn off Refunds and dispute results.

A balance can go below zero this way. The customer then gets 402 until they top up again.

Failed payments ​

  • Subscriptions. When a renewal fails, the customer keeps their plan while Stripe retries the card, and MicroAuth emails them to update it. If Stripe finally cancels the subscription, the customer moves back to your default limits and gets an email that the plan ended.
  • Automatic top ups. If Stripe refuses the card, the customer gets an email, and the next charged request after a day tries again. If the card was removed in Stripe, MicroAuth checks Stripe first and tries another saved card once. Adding a working card, or making another card the default, tries again within a few minutes. Pressing Save on the Billing page tries again right away.

Emails to your customers ​

MicroAuth emails your customers under your API's name. Billing emails go to the team's admins and billing members, not to developers.

EmailSent when
Credit addedA customer buys credit. It shows the new balance
Automatic top upThe saved card is charged because the balance went below the customer's threshold
Plan paymentA plan starts or renews. It shows what was paid and any plan credit added
Plan changedThe customer moves to another plan in Stripe, or cancels and the plan ends with its period or its free trial
RefundYou refund a top up or a plan payment. A refunded top up's credit comes off the balance. It says the money goes back to the card, and that banks usually take 5 to 10 business days
Dispute wonYou win a dispute and the credit goes back on the balance
Low balanceThe balance drops below the low balance amount. It is sent once, and again only after the balance has gone back above the amount

Low balance is the Balance alerts topic, and the rest are Payments and plan changes. Both topics are on by default, and a payment sends one confirmation even when Stripe retries the event. Each person can turn either topic off under Notifications on the portal's Account page, or with the Unsubscribe link in the email.

These always go out, because money or access depends on them:

  • Balance ran out. The balance can't cover another request, so their keys get 402 until they add credit.
  • Card saved or changed. A new card becomes the one their payments use. The email asks them to remove it if nobody on the team made the change.
  • Card removed. The saved card was removed or expired and no other card is saved. With automatic top ups on, it says they're paused and has an Add a card button.
  • Card expires soon. It's the last 10 days of the month the saved card expires in, and automatic top ups or a plan still charge it.
  • Free trials. A trial started, with the date it ends and the price after it. A trial didn't start because the team or the card had one before. And a reminder 3 days before a trial ends.
  • Payment problems. A bank payment for credit that fails after checkout, a failed automatic top up, a failed plan renewal and a plan that ended. See failed payments.
  • Dispute opened. A disputed top up's credit comes off the balance.
  • Automatic top ups off. You disconnected Stripe, so their automatic top ups stopped and the saved card was removed.
  • Changes your team makes. Credit you add or remove, with your note, a plan you set and custom limits. See customers.

Sign in codes, invites, security notices, changes to their access and changes to their team always go out too. See customer teams.

Stripe's own receipts are separate. To send them too, turn them on under Customer emails in your connected Stripe account's settings. Plan invoices stay under Invoices and cards on the portal's Billing page.

To hear about payments yourself, turn on Payments from developers under Notifications on your dashboard Account page. It emails you each time a customer buys credit or an automatic top up runs, and is off by default. See your emails.

Without Stripe ​

Stripe is optional. An API with billing off needs no payment setup at all. If you bill another way, keep billing on and:

  • Add or remove credit from the customer's page in the dashboard.
  • Call the credits endpoint from your own billing system.
  • Put customers on a plan yourself from their page.

MicroAuth is a product of Zyref, LLC.