Skip to content
TriedDocs
Account

Update billing settings

Turn auto-recharge on or off, set its threshold and amount, or set a monthly budget.

PATCHhttps://api.tried.com.au/billing/settings

Changes auto-recharge and the monthly budget. Send only the fields you want to change. After saving, the auto-recharge and budget checks run once, as in Check billing, so a recharge can happen straight away. Admin only.

Request#

Field Type Required Description
auto_recharge_enabled boolean No Turn auto-recharge on or off.
auto_recharge_below number No Threshold in AUD, 0 to 10000.
auto_recharge_amount number No AUD per recharge, 5 to 10000.
monthly_budget number or null No 1 to 1000000 AUD. null removes the budget.
payment_method object No Card summary to store: brand, last4 (4 digits), exp, and optional stripe_customer_id and stripe_payment_method_id. Sending null leaves the card unchanged; use Delete payment method to remove it.

When the month's spend crosses 80% and 100% of the budget, Tried sends budget_alert and budget_reached events to the workspace webhook URL, once per threshold per month.

Example request#

curl -X PATCH https://api.tried.com.au/billing/settings \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "auto_recharge_enabled": true,
    "auto_recharge_below": 10,
    "auto_recharge_amount": 50,
    "monthly_budget": 500
  }'
const res = await fetch("https://api.tried.com.au/billing/settings", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "auto_recharge_enabled": true,
    "auto_recharge_below": 10,
    "auto_recharge_amount": 50,
    "monthly_budget": 500
  }),
});
const settings = await res.json();
import os, requests

res = requests.patch(
    "https://api.tried.com.au/billing/settings",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={
        "auto_recharge_enabled": True,
        "auto_recharge_below": 10,
        "auto_recharge_amount": 50,
        "monthly_budget": 500,
    },
)
settings = res.json()

Response#

200 OK

{
  "provider": "mock",
  "auto_recharge_enabled": true,
  "auto_recharge_below": 10,
  "auto_recharge_amount": 50,
  "monthly_budget": 500,
  "month": "2026-10",
  "month_usage": 182.4375,
  "budget_percent": 36.5,
  "budget_reached": false,
  "payment_method": {
    "brand": "visa",
    "last4": "4242",
    "exp": "12/30"
  }
}

Returns the billing settings after the change. Fields are as in Get billing settings.

Errors#

Status When
400 Validation failed, for example auto_recharge_amount: Number must be greater than or equal to 5 or payment_method.last4: Invalid.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the admin scope. A dashboard user without the right role gets Requires role: admin. API keys act as admin.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.