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
https://api.akter.dev/v1/organizations/{organization}/billingRead the organization's plan, billing status and monthly spend cap.
Path parameters
organizationstringrequiredAn 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"requirednone: no card, a small fixed monthly allowance and no invoices. usage: pay for usage in arrears with a card added on Stripe's page.
spendCapintegerrequiredThe most the organization may spend in a calendar month, in whole US dollars.
status"none" | "checkoutOpen" | "active" | "pastDue" | "canceled"requirednone: 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
401UnauthorizedError403ForbiddenError404NotFoundError | FeatureNotEnabledError503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError
Cancel
https://api.akter.dev/v1/organizations/{organization}/billingStop 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
organizationstringrequiredAn 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"requirednone: no card, a small fixed monthly allowance and no invoices. usage: pay for usage in arrears with a card added on Stripe's page.
spendCapintegerrequiredThe most the organization may spend in a calendar month, in whole US dollars.
status"none" | "checkoutOpen" | "active" | "pastDue" | "canceled"requirednone: 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
401UnauthorizedError403ForbiddenError404NotFoundError | FeatureNotEnabledError428ConfirmationRequiredError503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError
Checkout
https://api.akter.dev/v1/organizations/{organization}/billing/checkoutGet 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
organizationstringrequiredAn 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
spendCapintegerThe monthly cap to start the paid plan with. Defaults to the plan's starting cap.
Response 201CheckoutLink
expiresAtstringrequiredurlstringrequiredA Stripe-hosted page where a person adds a card. Card details go to Stripe only, never to Akter, the CLI or an agent.
Errors
401UnauthorizedError403ForbiddenError404NotFoundError | FeatureNotEnabledError503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError
Set cap
https://api.akter.dev/v1/organizations/{organization}/billing/capSet 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
organizationstringrequiredAn 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
spendCapintegerrequiredThe 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"requirednone: no card, a small fixed monthly allowance and no invoices. usage: pay for usage in arrears with a card added on Stripe's page.
spendCapintegerrequiredThe most the organization may spend in a calendar month, in whole US dollars.
status"none" | "checkoutOpen" | "active" | "pastDue" | "canceled"requirednone: 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
401UnauthorizedError402CardRequiredError403ForbiddenError404NotFoundError | FeatureNotEnabledError428ConfirmationRequiredError503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError
Invoices
https://api.akter.dev/v1/organizations/{organization}/billing/invoicesList the organization's invoices, newest first, with links to Stripe's pages for them.
Path parameters
organizationstringrequiredAn 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
cursorstringThe nextCursor of the previous page.
limitintegerAt most this many items, 1 to 100. Defaults to 50.
Response 200InvoicePage
itemsInvoice[]requireditems[].amountDueUsdnumberrequiredUS dollars.
items[].amountPaidUsdnumberrequiredUS dollars.
items[].createdAtstringrequireditems[].idstringrequireditems[].periodstringA calendar month in UTC, YYYY-MM. Usage, caps and invoices are counted per month.
items[].status"draft" | "open" | "paid" | "void" | "uncollectible"requireditems[].urlstringStripe's page for the invoice.
nextCursorstringPass as cursor for the next page.
Errors
401UnauthorizedError403ForbiddenError404NotFoundError | FeatureNotEnabledError503ActorUnavailableError | AuthUnavailableError | BillingUnavailableError | BuildStorageUnavailableError | ExecUnavailableError