Akter

Billing

How an organization pays (ADR 0022): a card added on Stripe's own page, a monthly spend cap, invoices and cancellation. Card details never reach Akter.

Get⁠

GEThttps://api.akter.dev/v1/organizations/{organization}/billing
billing.getBearer token

Read the organization's plan, billing status and monthly spend cap.

Path parameters

  • organizationstringrequired

    An organization's name, unique across Akter Cloud. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.

Response 200BillingAccount

  • plan"none" | "usage"required

    none: no card, a small fixed monthly allowance and no invoices. usage: pay for usage in arrears with a card added on Stripe's page.

  • spendCapintegerrequired

    The most the organization may spend in a calendar month, in whole US dollars.

  • status"none" | "checkoutOpen" | "active" | "pastDue" | "canceled"required

    none: no card yet. checkoutOpen: a checkout link is waiting for a person. active: billed monthly. pastDue: a payment failed; new spend stops after a grace period. canceled: back to no card after a final invoice.

Errors

  • 401UnauthorizedError
  • 403ForbiddenError
  • 404NotFoundError | FeatureNotEnabledError
  • 503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError

Cancel⁠

DELETEhttps://api.akter.dev/v1/organizations/{organization}/billing
billing.cancelBearer token

Stop paying for usage: the month's usage so far is invoiced, the card plan ends, and the organization goes back to the free allowance. A person confirms it, and an API key needs a person's approval.

Path parameters

  • organizationstringrequired

    An organization's name, unique across Akter Cloud. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.

Response 200BillingAccount

  • plan"none" | "usage"required

    none: no card, a small fixed monthly allowance and no invoices. usage: pay for usage in arrears with a card added on Stripe's page.

  • spendCapintegerrequired

    The most the organization may spend in a calendar month, in whole US dollars.

  • status"none" | "checkoutOpen" | "active" | "pastDue" | "canceled"required

    none: no card yet. checkoutOpen: a checkout link is waiting for a person. active: billed monthly. pastDue: a payment failed; new spend stops after a grace period. canceled: back to no card after a final invoice.

Errors

  • 401UnauthorizedError
  • 403ForbiddenError
  • 404NotFoundError | FeatureNotEnabledError
  • 428ConfirmationRequiredError
  • 503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError

Checkout⁠

POSThttps://api.akter.dev/v1/organizations/{organization}/billing/checkout
billing.checkoutBearer token

Get a link to a Stripe-hosted page where a person adds a card and starts paying for usage. The link works for 24 hours; asking again while it is open returns the same link.

Path parameters

  • organizationstringrequired

    An organization's name, unique across Akter Cloud. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.

Request bodyStartCheckout

  • spendCapinteger

    The monthly cap to start the paid plan with. Defaults to the plan's starting cap.

Response 201CheckoutLink

  • expiresAtstringrequired
  • urlstringrequired

    A Stripe-hosted page where a person adds a card. Card details go to Stripe only, never to Akter, the CLI or an agent.

Errors

  • 401UnauthorizedError
  • 403ForbiddenError
  • 404NotFoundError | FeatureNotEnabledError
  • 503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError

Set cap⁠

PUThttps://api.akter.dev/v1/organizations/{organization}/billing/cap
billing.setCapBearer tokenSafe to retryAsks a person to confirm

Set the organization's monthly spend cap. Without a card it can't go above the free allowance. A person confirms any change, and an API key needs a person's approval.

Path parameters

  • organizationstringrequired

    An organization's name, unique across Akter Cloud. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.

Request bodySetOrganizationCap

  • spendCapintegerrequired

    The most the work this key starts may cost in a calendar month, in whole US dollars. Raising it needs a person's confirmation.

Response 200BillingAccount

  • plan"none" | "usage"required

    none: no card, a small fixed monthly allowance and no invoices. usage: pay for usage in arrears with a card added on Stripe's page.

  • spendCapintegerrequired

    The most the organization may spend in a calendar month, in whole US dollars.

  • status"none" | "checkoutOpen" | "active" | "pastDue" | "canceled"required

    none: no card yet. checkoutOpen: a checkout link is waiting for a person. active: billed monthly. pastDue: a payment failed; new spend stops after a grace period. canceled: back to no card after a final invoice.

Errors

  • 401UnauthorizedError
  • 402CardRequiredError
  • 403ForbiddenError
  • 404NotFoundError | FeatureNotEnabledError
  • 428ConfirmationRequiredError
  • 503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError

Invoices⁠

GEThttps://api.akter.dev/v1/organizations/{organization}/billing/invoices
billing.invoicesBearer token

List the organization's invoices, newest first, with links to Stripe's pages for them.

Path parameters

  • organizationstringrequired

    An organization's name, unique across Akter Cloud. 1 to 63 characters: a lowercase letter, then lowercase letters, digits or single hyphens, ending in a letter or digit.

Query parameters

  • cursorstring

    The nextCursor of the previous page.

  • limitinteger

    At most this many items, 1 to 100. Defaults to 50.

Response 200InvoicePage

  • itemsInvoice[]required
  • items[].amountDueUsdnumberrequired

    US dollars.

  • items[].amountPaidUsdnumberrequired

    US dollars.

  • items[].createdAtstringrequired
  • items[].idstringrequired
  • items[].periodstring

    A calendar month in UTC, YYYY-MM. Usage, caps and invoices are counted per month.

  • items[].status"draft" | "open" | "paid" | "void" | "uncollectible"required
  • items[].urlstring

    Stripe's page for the invoice.

  • nextCursorstring

    Pass as cursor for the next page.

Errors

  • 401UnauthorizedError
  • 403ForbiddenError
  • 404NotFoundError | FeatureNotEnabledError
  • 503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError