All Posts
SaaS Platform

Linked Billing Moves the Invoice. The Refusals Stay With You.

Anthropic's linked billing lets customers pay for Claude usage in your app. It never falls back to you and never tells you when a customer unlinks. Model the payer and every refusal.

11 min read

On 17 November Anthropic launched linked billing in beta: a customer connects their own Claude organization to your app once, and from then on you choose on each API request whether they pay for the tokens or you do. Linked billing is a per-request payer switch, with the customer's own Anthropic account on the other end of it. It looks like the end of the margin problem every AI product has, and for some customers it is. What it does not remove is the work. Anthropic refuses a customer-billed request it cannot charge rather than charging you, it does not notify you when a customer unlinks or changes a spend cap, and its usage reports have no field for who paid. If you adopt it, model the payer as data on every request and treat each refusal as a product state.

Why this matters now

The API release notes for 17 November announce linked billing behind the user-profiles-billing-2026-10-01 beta header. It builds on user profiles, which shipped on 20 October and let you tell Anthropic which end customer a request is for, and it arrived less than three weeks after the Usage and Cost Analytics API, which reports usage per profile. Taken together, the platform now knows who your customers are, and linked billing is the first feature that sends one of them the bill.

For a founder the appeal is obvious. Inference is the one cost in an AI product that scales with your heaviest users, and flat pricing leaves you exposed to them. Passing that cost to the customer's own account turns a variable cost into someone else's line item. The linked billing guide is clear about who qualifies, though. The customer's organization has to pay Anthropic directly for API usage, by prepaid credits or invoice. Organizations billed through the AWS, Google Cloud or Azure marketplaces cannot be billed this way, nor can a customer who only has a Claude subscription, and the monthly API credits bundled with Max, Ultra and Team plans do not count. That describes technical buyers and larger companies, not a typical small-business customer.

Technical substance

The mechanics are small. A customer admin approves an OAuth screen, optionally sets a monthly spend limit, and you store a connection ID against a user profile. One Claude organization links to one profile. After that a request names the profile in the anthropic-user-profile-id header and sets billing_policy to bill the user profile. Leave billing_policy out and you pay, as before.

What matters is the behaviour when the charge fails. The guide puts it in one sentence: "It never silently bills you instead." A customer-billed request that cannot be charged is refused, and the refusals are typed.

  • 402 linked_organization_spend_limit_reached: the customer hit a cap they set, or has no credit. Refused before a reply starts, not retryable, and for a cap it lasts until they raise it or the month rolls over at 00:00 UTC.
  • 402 linked_organization_billing_unavailable: the organization is suspended, or credit ran out after the reply started. Not retryable.
  • 403 user_profile_not_billable: Anthropic cannot bill this customer and the response does not say why. Not retryable, apart from the first ten seconds after a new link.
  • 503 overloaded_error: Anthropic could not confirm billing. The request was neither served nor billed, so retry with backoff.

Three other details shape the design. Customers can unlink or change a cap in their Console at any time and you get no webhook and no email, so link status is something you read, not something you are told. The usage and cost reports count both kinds of request, and a customer-paid one appears with an amount of zero, but there is nothing to filter or group by payer and the Console figures refresh about hourly. And the requests still run in your organization, so your rate limits, model access and data retention apply. The customer's zero data retention, BAA or customer-managed keys do not carry over, and the guide says not to link customers who need that coverage. Message Batches cannot bill a customer at all, and neither can requests that use billable code execution.

I put all of that in one module, so that who pays is never decided inline at a call site. The sketch below builds the request for either payer, maps each documented refusal to a state, and makes paying on the customer's behalf an explicit, capped decision.

// payer-router.mjs (sketch): choose the payer per request and turn every refusal into a state
const BILLING_BETA = "user-profiles-billing-2026-10-01"

// documented refusals on a customer-billed request, mapped to what the product should do next
const REFUSALS = {
  linked_organization_spend_limit_reached: "capped", // refused until the cap is raised or the month ends
  linked_organization_billing_unavailable: "unavailable", // suspended, or credit ran out
  user_profile_not_billable: "check_link", // the API does not say why: read the link status
}

export function buildRequest(customer, body, payer = customer.payer) {
  const billTo = payer === "customer" ? "user_profile" : "self"
  return {
    headers: { "anthropic-beta": BILLING_BETA, "anthropic-user-profile-id": customer.userProfileId },
    body: { ...body, billing_policy: { type: "billing_policy", bill_to: billTo } },
  }
}

export async function send(customer, body, { call, usage, graceUsd = 0 }) {
  const res = await call(buildRequest(customer, body))
  if (res.ok) {
    usage.push({ customer: customer.id, payer: customer.payer, requestId: res.requestId })
    return { ...res, action: "served" }
  }
  if (res.status === 503) return { ...res, action: "retry_with_backoff" } // not served, not billed
  const state = REFUSALS[res.error?.details?.error_code]
  if (!state) return { ...res, action: "surface_error" }
  customer.linkState = state
  // Anthropic will not fall back to you. Paying for the customer is your decision, with a limit.
  if (customer.graceSpentUsd >= graceUsd) return { ...res, action: "ask_customer_to_fix_billing" }
  const retry = await call(buildRequest(customer, body, "self"))
  if (!retry.ok) return { ...retry, action: "surface_error" }
  usage.push({ customer: customer.id, payer: "self", reason: state, requestId: retry.requestId })
  return { ...retry, action: "served_on_grace" }
}

// demo: a fake API where the customer's organization has hit its spend cap
const call = async (req) =>
  req.body.billing_policy.bill_to === "self"
    ? { ok: true, status: 200, requestId: "req_2" }
    : { ok: false, status: 402, error: { details: { error_code: "linked_organization_spend_limit_reached" } } }
const usage = []
const acme = { id: "acme", payer: "customer", userProfileId: "uprof_01HV9Z", graceSpentUsd: 0 }
console.log((await send(acme, { model: "claude-sonnet-5-5" }, { call, usage, graceUsd: 25 })).action)
console.log((await send(acme, { model: "claude-sonnet-5-5" }, { call, usage, graceUsd: 0 })).action)
console.log(acme.linkState, JSON.stringify(usage))

Run as written against the fake API, it serves the first request on grace, refuses the second once the grace budget is zero, and leaves the customer marked as capped with one usage row whose payer is self. That usage row matters as much as the routing does. Anthropic's reports will not tell you who paid, so the only record of it is the one you write.

Business implication

Linked billing is a pricing decision that arrives looking like an API flag. There are three ways to arrange who pays for inference, and they suit different customers.

  • You pay. Inference sits in your cost of goods and your price has to cover the heaviest user. It works for everyone and puts all of the margin risk on you.
  • The customer pays through linked billing. Inference leaves your cost base and your price becomes a platform fee. It only works for customers with a directly billed Claude organization, and you give up any markup on tokens.
  • The customer brings an API key. The cost also leaves your books, but you now store a customer secret and run in their organization under their limits.

For most SaaS products that makes linked billing a tier and not a replacement: a "use your own Claude account" option for the enterprise plan, where procurement would sooner put AI spend on a contract it already has. Everyone else stays on a metered or capped plan that you fund. The spend cap also changes your support load. A cap counts usage at list price, a change takes about a minute to apply, and once it is reached every request you bill to that customer is refused until someone on their finance side acts. Your product has to explain that to an end user who has never heard of the cap.

Practical framework

These are the five decisions I would make before setting billing_policy on a single production request.

  1. Store the payer on the customer record and on every request you log. Plans decide the payer; call sites read it. Your own usage table is the only place the payer is recorded.
  2. Give each refusal code a product state and customer-facing copy: capped, billing unavailable, link needs checking. A raw 402 in the UI is a support ticket.
  3. Set a grace policy in dollars. Decide whether you resend a refused request at your own cost, up to what amount per customer per month, and who is told when it happens.
  4. Poll link status on a schedule and after any 403. Nothing tells you about an unlink, so stale state is the default unless you read it.
  5. Fence off what cannot be customer-billed: batch jobs, code execution, and any customer who needs zero data retention, a BAA or their own encryption keys for this usage.

My perspective

In June I argued that per-user token budgets belong in your own backend, because a vendor's billing rules change and your product should keep working when they do. Linked billing does not retire that layer. A customer's spend cap is one monthly number for their whole organization, set by someone outside your product, and it fails as a hard stop. Inside that organization you still need per-user budgets, model step-downs and a degraded mode, or one enthusiastic user will take the whole account offline by the twentieth of the month. The budget layer stays where it was, and the only thing that changes is whose money it is protecting.

The pattern is familiar from payments work. When I migrated ListKit's payment flow to Stripe Checkout, the happy path was the small part of the scope and the edge cases were most of it. Linked billing is the same kind of project. The OAuth link and the request field take an afternoon to wire up. The refusal states, the grace policy and the status polling take most of the effort, and they decide whether a customer on this plan has a good month or files a ticket.

Recommended action

This quarter, do not rebuild your pricing around a beta. Ask your ten largest customers whether they have a Claude Console organization that pays Anthropic directly; that answer sizes the tier. Add the payer column and the refusal states to your request path now, with every customer set to self, so the change is a data migration and not a rewrite. Then pilot linked billing with one customer who asked for it, with a grace budget you have agreed in writing. Note that publishing the OAuth app needs domain verification and an Anthropic review unless your own organization is on invoiced billing, so start that early.

Decide who pays before the first refusal

If you are working out how an AI feature should be priced and metered, start the conversation, or see how I work on the services page.

#Claude API#SaaS Architecture#AI Pricing#Usage-Based Billing#Unit Economics