billing

Set auto top-up's three figures and turn it on or leave it off.

When the account's credit falls below below, its saved card is charged amount plus tax, at most once at a time and at most monthlyLimit a calendar month. Each automatic top-up that clears adds 5% more as credit. While it is on the account may run 200 sandboxes at once instead of 100. A declined charge, or one the bank wants its holder to confirm, turns it off; it never stops a running sandbox. A person saves the card at saveCardAt. Owners, admins and billing members, and keys they made; not a read-only key.

put/v1/billing/auto-top-up

Request

  • Base URL: https://api.withruntime.com
  • URL: https://api.withruntime.com/v1/billing/auto-top-up
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Replaying the same key with the same request within 24 hours returns the first result and never repeats the effect. A refusal is not kept: a request refused before it ran (no_capacity, busy, a limit) runs afresh when sent again with its key. The SDKs send one automatically; the server makes one when absent and returns it in the idempotency-key response header.

Request body

enabledboolean required

true to turn on (once a card is saved), false to keep it off.

belownumber

Charge when credit falls below this, in whole cents: $10 at least. Left out, it keeps the one saved, or $10.

amountnumber

Dollars to add each time, before tax: $20 to $10,000, and at most $500 in an account's first week. Left out, it keeps the one saved, or $20.

monthlyLimitnumber

The most to add in one calendar month (UTC), before tax: $100 at least, and at least amount. Left out, it keeps the one saved, or $500.

Response

Success

enabledboolean required

Charging now.

waitingForCardboolean required

Asked to turn on; turns on once a card is saved at saveCardAt.

belownumber nullable required

Charge when credit falls below these dollars.

amountnumber nullable required

Dollars added each time, before tax.

monthlyLimitnumber nullable required

The most added in one calendar month (UTC), in dollars before tax.

thisMonthnumber required

Dollars added this month, a charge in flight included.

cardboolean required

A card is saved for auto top-up.

offReasonstring nullable required

Why it turned itself off: declined, authentication_required (the bank wanted the holder), card_removed, no_address (no billing address for tax), blocked, failed. Null while on.

offAtstring date-time nullable
saveCardAtstring nullable

Where a person saves the card, when none is saved. Null once one is.

Changes

No recorded changes to this operation across all 1 revision of this API.