Billing
Read the plan, credits and usage, and manage payments, payment methods and Enterprise plans.
Billing is the API form of Workspace settings → Usage, Subscription and Billing in the dashboard. Any connection with operations:general reads the plan, credits and usage. The workspace owner's own sign-in reads invoices and payment methods, buys credits, moves to a higher plan and manages payment settings, as in the dashboard.
Examples on this page use a server client signed in as the workspace owner:
import { AbuseZero } from "abusezero/server";
const abusezero = new AbuseZero({ accessToken: process.env.ABUSEZERO_ACCESS_TOKEN!, workspace: "74999074913993548694", outage: "throw" });Who can use billing
| Actions | Scope | Who |
|---|---|---|
| Read the plan, usage, credit history, daily usage and Enterprise plans; preview an Enterprise plan code | operations:general | Any connection, API keys included. |
| Read the upcoming charge, invoices, payment methods, billing details and a payment; get a quote | operations:general | The workspace owner. |
| Save billing details; set the low-credit alert; choose what stays active over your limits | operations:configuration | The workspace owner. |
| Auto-reload, buying credits, a higher plan, yearly billing, undoing a downgrade, resuming, paying an overdue invoice, payment methods and Enterprise plan codes | operations:management | The workspace owner. |
"The workspace owner" means an OAuth sign-in by the owner, such as the AbuseZero CLI or the AbuseZero MCP server signed in as the owner. A machine client the owner created counts as the owner too. No API key holds operations:management, so API keys get KEY_PERMISSION_DENIED for those actions. They act for no person, so they get OWNER_REQUIRED for the rest. Machine clients someone else created and signed-in members who aren't the owner get OWNER_REQUIRED.
Every change takes an Idempotency-Key. Send the same key to retry a change safely: a payment is never charged twice for one key.
What stays in the dashboard
Canceling the subscription, downgrading (to Builder too), switching from yearly to monthly billing and moving to a higher plan on a shorter billing period are done by the workspace owner in Workspace settings → Subscription. A quote shows what any of them costs or saves, with confirmable: false.
When the bank asks to confirm a payment
Every payment returns a payment object. When its status is requires_action, the bank wants the person who owns the card to confirm it. Send them payment_page_url, the secure payment page for the charge, and read the payment again with Retrieve a payment once they're done.
When there's no saved payment method
Buying credits, a higher plan, paying an invoice and turning on auto-reload charge a saved payment method. Without one, they return PAYMENT_METHOD_REQUIRED. Make a billing approval link and give it to the workspace owner: they sign in, add a card or bank account and, for an upgrade, pay. The owner can also add one in Workspace settings → Billing.
Retrieve the plan
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/plan | operations:general | Not used |
Also available as abusezero billing plan in the AbuseZero CLI, abusezero_get_plan on the AbuseZero MCP server and plan() in the AbuseZero Node.js SDK.
Response
{
"object": "billing_plan",
"plan": "pro",
"name": "Pro",
"interval": "month",
"subscribed": true,
"renews_at": "2026-12-01T00:00:00.000Z",
"ends_at": null,
"scheduled_change": null,
"enterprise": false,
"payment": { "state": "ok", "due_at": null },
"limits": { "protected_benefits": 10, "custom_policies": 100, "team_seats": 5, "retention_days": 90, "rate": 50 },
"over_limit": null
}| Field | Type | Description |
|---|---|---|
plan | payg, pro or scale | The plan. payg is Builder. |
name | string | The plan's name, such as Builder. |
interval | month, year or null | The billing period. null on Builder. |
subscribed | boolean | Whether the workspace has a Pro or Scale subscription. |
renews_at | string or null | When the subscription renews next. |
ends_at | string or null | When a canceled subscription ends. It can be resumed until then. |
scheduled_change | object or null | A downgrade or period change set for the end of the period: plan, name, interval and at. It can be undone. |
enterprise | boolean | Whether an Enterprise plan sets the workspace's plan. |
payment.state | ok, grace or overdue | grace and overdue mean a renewal hasn't been paid. See Pay an overdue invoice. |
payment.due_at | string or null | When the unpaid renewal was due. |
limits | object | The workspace's limits from its plan and Enterprise plans: protected_benefits, custom_policies, team_seats, retention_days and rate, the requests per second. |
over_limit | object or null | Set while the workspace is over its limits. state is grace before anything is paused and enforced after. grace_until is when the grace period ends. items lists the benefits and members that count, each with kind, id, name, paused and will_pause. See Choose what stays active over your limits. |
Retrieve usage
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/usage | operations:general | Not used |
Also available as abusezero billing usage in the AbuseZero CLI, abusezero_get_usage on the AbuseZero MCP server and usage() in the AbuseZero Node.js SDK.
Response
{
"object": "billing_usage",
"credits": { "available": 3800, "allowance": 1800, "pay_as_you_go": 2000, "per_evaluation": 5 },
"usage": {
"absolute": {
"allowance_credits": { "used": 3200, "total": 5000 },
"pay_as_you_go_credits": { "used": 400, "total": 2400 },
"protected_benefits": { "used": 3, "total": 10 },
"team_seats": { "used": 2, "total": 5 }
},
"allowance": null
},
"auto_reload": { "enabled": true, "capped": false, "threshold": null, "amount_dollars": null, "monthly_cap_dollars": null }
}| Field | Type | Description |
|---|---|---|
credits.available | integer | Credits available now. |
credits.allowance | integer | Of those, the plan's allowance credits. |
credits.pay_as_you_go | integer | Of those, pay-as-you-go credits: credits bought, bonuses and other credits outside the plan's allowance. |
credits.per_evaluation | integer | Credits one evaluation uses. |
usage.absolute | object | The four gauges Workspace settings → Usage shows: allowance_credits, pay_as_you_go_credits, protected_benefits and team_seats, each with used and total. Credits count this billing period, or this UTC month on Builder. |
usage.allowance | object or null | The same gauges against the Pro or Scale plan alone. null without a subscription. |
auto_reload.enabled | boolean | Whether auto-reload is on. |
auto_reload.capped | boolean | Whether this month's cap stops the next reload. |
auto_reload.threshold, amount_dollars, monthly_cap_dollars | integer or null | The workspace owner's auto-reload settings. null for every other connection. |
List credit history
Credits added, used and removed, newest first, 50 entries to a page. Evaluations are one entry per UTC day, and so are past webhook charges.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/credit-history | operations:general | Not used |
Also available as abusezero billing credit-history in the AbuseZero CLI, abusezero_list_credit_history on the AbuseZero MCP server and creditHistory(query) in the AbuseZero Node.js SDK.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
activity | string | No | One kind of activity: evaluations, webhooks, plan_credits, temporary_plan_credits, enterprise_plan_credits, purchase, first_purchase_bonus, survey_credits, yearly_conversion, expired, ended, replaced, enterprise_plan_removed, refund, dispute or adjustment. |
direction | added or used | No | Only credits added, or only credits used or removed. |
days | 7, 30, 90 or 365 | No | The last number of days. |
from, to | string | No | A range of UTC days, as YYYY-MM-DD, of up to 366 days. Send both. |
cursor | string | No | The next_cursor from the previous page. |
Response
Returns a list of entries:
{
"object": "credit_entry",
"date": "2026-11-09",
"daily_total": true,
"activity": "evaluations",
"sources": ["plan"],
"credits": -340,
"plans": ["Pro"],
"enterprise_plans": []
}| Field | Type | Description |
|---|---|---|
date | string | The entry's time, or the UTC day for a daily total. |
daily_total | boolean | Whether the entry adds up a day of evaluations, or a day of past webhook charges. |
activity | string | What happened, from the list under activity above. |
sources | array of strings | Which credits it added to or used: plan, temporary_plan, enterprise_plan, purchased, bonus, survey, converted, adjustment or negative_balance. |
credits | integer | Credits added (positive) or used or removed (negative). |
plans, enterprise_plans | array of strings | The plans and Enterprise plans behind the credits, by name. |
Retrieve daily usage
Credits used each day of the last 30 days, in the workspace's time zone, with each day's busiest benefit.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/daily-usage | operations:general | Not used |
Also available as abusezero billing daily-usage in the AbuseZero CLI, abusezero_get_daily_usage on the AbuseZero MCP server and dailyUsage() in the AbuseZero Node.js SDK.
Response
{
"object": "daily_usage",
"time_zone": "Europe/London",
"days": [
{ "day": "2026-11-09", "credits": 340, "top_benefit": { "name": "Signup credits", "evaluations": 30 } },
{ "day": "2026-11-10", "credits": 0, "top_benefit": null }
]
}List Enterprise plans
The workspace's Enterprise plans, ended ones included, and what each one adds.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/enterprise-plans | operations:general | Not used |
Also available as abusezero billing enterprise-plans in the AbuseZero CLI, abusezero_list_enterprise_plans on the AbuseZero MCP server and enterprisePlans() in the AbuseZero Node.js SDK.
Response
Returns a list of Enterprise plans:
{
"object": "enterprise_plan",
"name": "Acme Enterprise",
"active": true,
"added_at": "2026-10-01T09:00:00.000Z",
"ends_at": null,
"grants": {
"credits": 50000, "credit_cadence": "month", "credit_expiry": "period_end", "credit_expiry_days": null,
"team_seats": 20, "protected_benefits": 50, "custom_policies": null, "rate": 200, "burst": 400, "concurrency": 20, "retention_days": 365
}
}credit_cadence is once, month or year. credit_expiry is never, period_end or days, with credit_expiry_days. A null limit adds nothing to the plan's own.
Preview an Enterprise plan code
Shows what a code adds, without redeeming it. Each try counts toward an hourly limit on codes.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/enterprise-plan-codes/preview | operations:general | Not used |
Also available as abusezero billing preview-code in the AbuseZero CLI, abusezero_preview_enterprise_plan_code on the AbuseZero MCP server and previewEnterprisePlanCode(code) in the AbuseZero Node.js SDK.
| Field | Type | Required | Limits | Description |
|---|---|---|---|---|
code | string | Yes | Up to 80 characters | The Enterprise plan code. |
Returns 201 with object: "enterprise_plan_code_preview" and the plan it adds: name, description, the same fields as grants above, and duration_months.
Retrieve the upcoming charge
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/upcoming-charge | operations:general | Not used |
Also available as abusezero billing upcoming-charge in the AbuseZero CLI, abusezero_get_upcoming_charge on the AbuseZero MCP server and upcomingCharge() in the AbuseZero Node.js SDK. The workspace owner only.
Returns a list with the next renewal, if one is coming: amount_cents after discounts, at, the payment_method it charges and whether it's discounted. A subscription set to end has none.
List invoices
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/invoices | operations:general | Not used |
Also available as abusezero billing invoices in the AbuseZero CLI, abusezero_list_invoices on the AbuseZero MCP server and invoices(query) in the AbuseZero Node.js SDK. The workspace owner only.
Response
Returns a list of invoices, newest first, 20 to a page, plus outstanding_cents: everything still due across unpaid invoices.
{
"object": "invoice",
"number": "A1B2C3D4-0007",
"created_at": "2026-11-01T00:00:00.000Z",
"status": "paid",
"description": "Pro plan (Monthly)",
"period": { "start": "2026-11-01T00:00:00.000Z", "end": "2026-12-01T00:00:00.000Z" },
"total_cents": 2500,
"paid_cents": 2500,
"due_cents": 0,
"refunded_cents": 0,
"payable": false,
"url": "https://invoice.stripe.com/i/…"
}status is open, paid, void or uncollectible. payable is true for an unpaid invoice. url is the invoice's secure payment page, where it can be viewed, downloaded and paid.
List payment methods
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/payment-methods | operations:general | Not used |
Also available as abusezero billing payment-methods in the AbuseZero CLI, abusezero_list_payment_methods on the AbuseZero MCP server and paymentMethods() in the AbuseZero Node.js SDK. The workspace owner only.
Response
Returns a list: the default first, then the backup payment methods in the order they're charged.
{
"object": "payment_method",
"id": "48210937465512093847",
"type": "card",
"brand": "visa",
"last4": "4242",
"exp_month": 12,
"exp_year": 2028,
"label": "Visa ending 4242",
"default": true,
"backup": null,
"declined": false,
"expired": false
}| Field | Type | Description |
|---|---|---|
type | card, bank_account or link | The kind of payment method. |
brand, last4, exp_month, exp_year | string, integer or null | A card's brand, last four digits and expiry. null for a bank account. |
default | boolean | Whether it's the default payment method. |
backup | integer or null | Its place among the backup payment methods, from 1. null for the default. |
declined | boolean | Whether it was declined for good and is skipped until its details change. |
expired | boolean | Whether its expiry date has passed. |
Retrieve billing details
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/details | operations:general | Not used |
Also available as abusezero billing details in the AbuseZero CLI, abusezero_get_billing_details on the AbuseZero MCP server and billingDetails() in the AbuseZero Node.js SDK. The workspace owner only.
Returns object: "billing_details" with name, email (the billing email), uses_account_email (whether that's the owner's account email), address (line1, line2, city, state, postal_code and country, or null) and tax_id (type and value, or null).
Retrieve a payment
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/payments/{id} | operations:general | Not used |
Also available as abusezero billing payment in the AbuseZero CLI, abusezero_get_payment on the AbuseZero MCP server and getPayment(id) in the AbuseZero Node.js SDK. The workspace owner only. Returns the payment object, with its latest status.
The payment object
{
"object": "billing_payment",
"id": "73492810562018437529",
"kind": "credit_purchase",
"status": "requires_action",
"payment_page_url": "https://invoice.stripe.com/i/…",
"credits": null,
"bonus_credits": null,
"scheduled": false
}| Field | Type | Description |
|---|---|---|
kind | credit_purchase, plan_change, invoice_payment or auto_reload | What the payment is for. |
status | succeeded, pending, requires_action, failed or canceled | pending means a bank payment is still processing; read it again later. failed means the payment method was declined. |
payment_page_url | string or null | Set when status is requires_action: the secure payment page where the person confirms the charge. |
credits, bonus_credits | integer or null | The credits a paid credit purchase added, and its first-purchase bonus. |
scheduled | boolean | Whether a plan change was set for the end of the period. |
Get a quote for a plan change
Prices a plan or billing period change, in either direction. Nothing changes. A quote is valid for 10 minutes.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/quotes | operations:general | Not used |
Also available as abusezero billing quote in the AbuseZero CLI, abusezero_quote_plan_change on the AbuseZero MCP server and quotePlanChange(input) in the AbuseZero Node.js SDK. The workspace owner only.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
plan | payg, pro or scale | Yes | The plan to quote. payg is Builder. |
interval | month or year | For Pro and Scale | The billing period. |
promo_code | string | No | A promo code, when subscribing from Builder. |
Example
const quote = await abusezero.quotePlanChange({ plan: "scale", interval: "year" });Response
{
"object": "plan_change_quote",
"id": "73492810562018437529",
"plan": "scale",
"interval": "year",
"direction": "upgrade",
"timing": "immediate",
"confirmable": true,
"charge_now_cents": 96000,
"renewal_cents": 99000,
"credits_now": 50000,
"effective_at": "2026-11-10T12:00:00.000Z",
"expires_at": "2026-11-10T12:10:00.000Z",
"next_charge": { "amount_cents": 99000, "at": "2027-11-10T12:00:00.000Z", "discounted": false },
"promotion": null
}| Field | Type | Description |
|---|---|---|
direction | upgrade, downgrade or switch | switch keeps the plan and changes the billing period. |
timing | immediate or period_end | When the change takes effect. |
confirmable | boolean | Whether Change to a higher plan can confirm it. false for a downgrade, a switch to monthly billing or a higher plan on a shorter billing period: the owner makes those in the dashboard. |
charge_now_cents | integer | What's charged when it's confirmed. |
renewal_cents | integer | The plan's full price each period. |
credits_now | integer | The plan credits added when it's confirmed. |
next_charge | object or null | The first renewal after the change, after discounts. |
promotion | object or null | The promo code applied: code, amount_cents, full_cents and duration. |
Update billing details
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
PUT | /v1/billing/details | operations:configuration | Required |
Also available as abusezero billing update-details in the AbuseZero CLI, abusezero_update_billing_details on the AbuseZero MCP server and updateBillingDetails(input, key) in the AbuseZero Node.js SDK. The workspace owner only. The owner is emailed about the change, as from the dashboard.
| Field | Type | Required | Limits | Description |
|---|---|---|---|---|
name | string | Yes | Up to 200 characters | The name on invoices. |
email | string | Yes | Up to 320 characters | The billing email. Send "" to use the owner's account email. |
address | object | Yes | line1, line2, city, state, postal_code and country, a two-letter country code. Send "" for parts you leave out. | |
tax_id | object or null | Yes | type, such as eu_vat, gb_vat or us_ein, and value. |
Returns 200 with the billing details. INVALID_BILLING_ADDRESS and INVALID_TAX_ID mean the address or tax ID wasn't accepted for its country.
Set the low-credit alert
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
PUT | /v1/billing/low-credit-alert | operations:configuration | Required |
Also available as abusezero billing set-low-credit-alert in the AbuseZero CLI, abusezero_set_low_credit_alert on the AbuseZero MCP server and setLowCreditAlert(credits, key) in the AbuseZero Node.js SDK. The workspace owner only.
| Field | Type | Required | Description |
|---|---|---|---|
credits | integer or null | Yes | Alert when available credits fall to this many. null alerts by your usage pace instead. |
Returns 200 with object: "low_credit_alert" and credits.
Choose what stays active over your limits
While the workspace is over its plan's limits, the newest benefits and members over the limit are paused when the grace period ends. Choose another one to pause instead. After pausing starts, the same request swaps them right away.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/over-limit | operations:configuration | Required |
Also available as abusezero billing choose-active in the AbuseZero CLI, abusezero_choose_what_stays_active on the AbuseZero MCP server and chooseWhatStaysActive(input, key) in the AbuseZero Node.js SDK. The workspace owner only.
| Field | Type | Required | Description |
|---|---|---|---|
kind | benefit or member | Yes | What to swap. |
keep_active | string | Yes | The id of an item in over_limit.items that will pause or is paused. |
pause | string | Yes | The id of an active item to pause instead. |
Returns 201 with object: "over_limit_choice" and status: chosen during the grace period, swapped after it, or unchanged when the workspace is no longer over its limits. PAUSE_SWAP_STALE means either item changed; read the plan again.
Set up or change auto-reload
When credits fall below threshold, auto-reload buys amount_dollars of credits with the default payment method, on its own.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
PUT | /v1/billing/auto-reload | operations:management | Required |
Also available as abusezero billing set-auto-reload in the AbuseZero CLI, abusezero_set_auto_reload on the AbuseZero MCP server and setAutoReload(input, key) in the AbuseZero Node.js SDK. The workspace owner only.
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | false turns auto-reload off. |
threshold | integer or null | When enabled | Reload when available credits fall below this many. |
amount_dollars | integer or null | When enabled | What each reload buys, in US dollars. It must add more credits than threshold. |
monthly_cap_dollars | integer or null | No | The most auto-reload spends in a UTC month, or null for no cap. Leave it out to keep the current cap. |
Returns 200 with object: "auto_reload", the settings and spent_this_month_dollars. Turning it on needs a default payment method.
Buy credits
Charges the default payment method and adds the credits once it's paid.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/credit-purchases | operations:management | Required |
Also available as abusezero billing buy-credits in the AbuseZero CLI, abusezero_buy_credits on the AbuseZero MCP server and buyCredits(amountDollars, key) in the AbuseZero Node.js SDK. The workspace owner only.
| Field | Type | Required | Description |
|---|---|---|---|
amount_dollars | integer | Yes | How much to spend, in US dollars. INVALID_CREDIT_AMOUNT names the amounts allowed. |
Example
const payment = await abusezero.buyCredits(50, "buy-credits-2026-11-10");
if (payment.status === "requires_action") console.log(`Confirm the payment: ${payment.payment_page_url}`);Returns 201 with the payment object.
Retry a credit purchase
Tries a declined credit purchase again, with the default or another saved payment method.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/credit-purchases/{id}/retry | operations:management | Required |
Also available as abusezero billing retry-purchase in the AbuseZero CLI, abusezero_retry_credit_purchase on the AbuseZero MCP server and retryCreditPurchase(id, input, key) in the AbuseZero Node.js SDK. The workspace owner only.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The payment's ID, in the path. |
payment_method_id | string | No | A saved payment method to charge instead of the default. |
Returns 201 with the payment object. PAYMENT_ATTEMPTS_EXCEEDED means the payment was tried as many times as allowed.
Change to a higher plan
Confirms a quote for a higher plan on the same or a longer billing period, Builder to Pro or Scale included, or for yearly billing on the same plan. Its charge is made right away.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/quotes/{id}/confirm | operations:management | Required |
Also available as abusezero billing change-plan in the AbuseZero CLI, abusezero_change_plan on the AbuseZero MCP server and changePlan(quoteId, input, key) in the AbuseZero Node.js SDK. The workspace owner only.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The quote's ID, in the path. |
payment_method_id | string | No | A saved payment method to charge instead of the default. |
Returns 201 with the payment object, whose id is the quote's. A quote with confirmable: false returns PLAN_CHANGE_IN_DASHBOARD. QUOTE_EXPIRED means the quote is older than 10 minutes or billing changed since; get a new one.
Undo a scheduled downgrade
Keeps the current plan and billing period, so the subscription renews as it is.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/scheduled-change/undo | operations:management | Required |
Also available as abusezero billing undo-downgrade in the AbuseZero CLI, abusezero_undo_scheduled_downgrade on the AbuseZero MCP server and undoScheduledDowngrade(key) in the AbuseZero Node.js SDK. The workspace owner only. Returns 201 with object: "subscription_change" and status.
Resume the subscription
Resumes a canceled subscription before it ends, so it renews again.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/subscription/resume | operations:management | Required |
Also available as abusezero billing resume-subscription in the AbuseZero CLI, abusezero_resume_subscription on the AbuseZero MCP server and resumeSubscription(key) in the AbuseZero Node.js SDK. The workspace owner only. Returns 201 with object: "subscription_change" and status.
Pay an overdue invoice
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/invoices/pay | operations:management | Required |
Also available as abusezero billing pay-overdue in the AbuseZero CLI, abusezero_pay_overdue_invoice on the AbuseZero MCP server and payOverdueInvoice(input, key) in the AbuseZero Node.js SDK. The workspace owner only.
| Field | Type | Required | Description |
|---|---|---|---|
invoice_number | string | No | The number of an unpaid invoice. Leave it out to pay the overdue renewal. |
payment_method_id | string | No | A saved payment method to charge instead of the default. |
Returns 201 with the payment object. INVOICE_NOT_FOUND means there's nothing unpaid to pay.
Make a payment method the default
The previous default becomes the first backup payment method. The new default then pays anything overdue.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/payment-methods/{id}/default | operations:management | Required |
Also available as abusezero billing set-default-payment-method in the AbuseZero CLI, abusezero_set_default_payment_method on the AbuseZero MCP server and setDefaultPaymentMethod(id, key) in the AbuseZero Node.js SDK. The workspace owner only.
Returns 201 with object: "payment_method_change", status and overdue_invoices: each overdue invoice it paid, with number, amount_cents and status.
Move a backup payment method
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/payment-methods/{id}/move | operations:management | Required |
Also available as abusezero billing move-payment-method in the AbuseZero CLI, abusezero_move_backup_payment_method on the AbuseZero MCP server and moveBackupPaymentMethod(id, direction, key) in the AbuseZero Node.js SDK. The workspace owner only.
| Field | Type | Required | Description |
|---|---|---|---|
direction | up or down | Yes | One place earlier or later in the order the backups are charged. |
Returns 201 with object: "payment_method_change" and status.
Remove a payment method
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
DELETE | /v1/billing/payment-methods/{id} | operations:management | Required |
Also available as abusezero billing remove-payment-method in the AbuseZero CLI, abusezero_remove_payment_method on the AbuseZero MCP server and removePaymentMethod(id, key) in the AbuseZero Node.js SDK. The workspace owner only.
The default can't be removed: make another payment method the default first. Returns 200 with object: "payment_method_change" and status, or PAYMENT_METHOD_PRIMARY for the default.
Redeem an Enterprise plan code
Adds the code's Enterprise plan to the workspace for good. Preview it first to see what it adds.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/enterprise-plan-codes/redeem | operations:management | Required |
Also available as abusezero billing redeem-code in the AbuseZero CLI, abusezero_redeem_enterprise_plan_code on the AbuseZero MCP server and redeemEnterprisePlanCode(code, key) in the AbuseZero Node.js SDK. The workspace owner only.
| Field | Type | Required | Limits | Description |
|---|---|---|---|---|
code | string | Yes | Up to 80 characters | The Enterprise plan code. |
Returns 201 with object: "enterprise_plan_redemption", status: "redeemed" and the plan name.
Make a billing approval link
For a workspace with no saved payment method: a link for the workspace owner to add a card or bank account, or to add one and pay for an upgrade. The owner signs in first, then sees what the link is for, with Decline. Nothing is charged until they pay on that screen.
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
POST | /v1/billing/approval-links | operations:management | Required |
Also available as abusezero billing approval-link in the AbuseZero CLI, abusezero_create_billing_approval_link on the AbuseZero MCP server and createBillingApprovalLink(input, key) in the AbuseZero Node.js SDK. The workspace owner only.
| Field | Type | Required | Description |
|---|---|---|---|
kind | add_payment_method or upgrade | Yes | upgrade adds a payment method and pays for the change. |
plan | pro or scale | For an upgrade | The plan to move to. |
interval | month or year | For an upgrade | The billing period. |
An upgrade is a higher plan on the same or a longer billing period, Builder to Pro or Scale included, or yearly billing on the same plan, as Change to a higher plan allows. The plan and period the workspace already has returns PLAN_UNCHANGED, and anything else returns PLAN_CHANGE_IN_DASHBOARD.
Returns 201 with a billing_approval_link: its id, kind, plan, interval, status (waiting), the approval_url to give the owner, expires_at and completed_at. The approval_url is returned only here. The link works once and expires after an hour.
Retrieve a billing approval link
| Method | Path | Scope | Idempotency-Key |
|---|---|---|---|
GET | /v1/billing/approval-links/{id} | operations:general | Not used |
Also available as abusezero billing approval-link-status in the AbuseZero CLI, abusezero_get_billing_approval_link on the AbuseZero MCP server and billingApprovalLink(id) in the AbuseZero Node.js SDK. The workspace owner only.
Returns the billing_approval_link with its status:
| Status | What it means |
|---|---|
waiting | The owner hasn't finished yet. |
completed | The payment method was added, or the upgrade is in effect. Carry on. |
declined | The owner declined. Ask them before making another link. |
expired | The link expired. Make a new one if the owner still wants to go ahead. |
An unknown id returns 404 with BILLING_APPROVAL_LINK_NOT_FOUND.
Errors
| Code | Status | Meaning |
|---|---|---|
OWNER_REQUIRED | 403 | The action needs the workspace owner: the owner's own sign-in, or a machine client the owner created. API keys can't use it. |
PLAN_CHANGE_IN_DASHBOARD | 403 | The plan change is a downgrade, a switch to monthly billing or a higher plan on a shorter billing period. The owner makes that change in the dashboard. |
BILLING_UNAVAILABLE | 403 | Billing changes aren't available for this workspace. Contact support. |
PAYMENT_NOT_FOUND | 404 | No payment with this ID exists in the workspace. |
INVOICE_NOT_FOUND | 404 | There's no unpaid invoice to pay. |
CODE_INVALID | 404 | The Enterprise plan code isn't valid or was already used. |
BILLING_APPROVAL_LINK_NOT_FOUND | 404 | No billing approval link with this ID exists in the workspace. |
PAYMENT_METHOD_REQUIRED | 409 | The workspace has no saved payment method. Make a billing approval link for the owner. |
PAYMENT_METHOD_PRIMARY | 409 | The default payment method can't be removed. |
PAYMENT_METHOD_UNAVAILABLE | 409 | The payment method can't be charged. Choose another one. |
PAYMENT_ATTEMPTS_EXCEEDED | 409 | The payment was tried as many times as allowed. |
QUOTE_EXPIRED | 409 | The quote is no longer valid. Get a new one. |
PLAN_UNCHANGED | 409 | Nothing would change: the plan is already this one, or there's nothing to undo or resume. |
SUBSCRIPTION_INVOICE_UNPAID | 409 | Pay the overdue invoice before changing plans. |
BILLING_OPERATION_PENDING | 409 | A payment for this request is still processing. Retry with the same idempotency key in a moment. |
PAUSE_SWAP_STALE | 409 | A benefit or member you chose changed. Read the plan again. |
INVALID_CREDIT_AMOUNT | 422 | The amount isn't one you can buy. The message names the amounts allowed. |
CODE_ATTEMPTS_EXCEEDED | 429 | Too many Enterprise plan codes were tried. Try again in an hour. |
For every other code, see REST API errors.
Related
How is this guide?
Last updated on