> ## Documentation Index
> Fetch the complete documentation index at: https://docs.patchline.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing

> Manage your Patchline subscription — invoices, payment methods, plan changes, cancellation. All powered by Stripe Billing.

export const TierBadge = ({tier}) => {
  const styles = {
    free: {
      label: "Free",
      color: "#A1A1AA"
    },
    starter: {
      label: "Starter+",
      color: "#00E6E2"
    },
    pro: {
      label: "Pro+",
      color: "#0068FF"
    },
    scale: {
      label: "Scale+",
      color: "#7A5BFF"
    },
    enterprise: {
      label: "Enterprise",
      color: "#FF7A59"
    },
    all: {
      label: "All plans",
      color: "#22C55E"
    }
  };
  const t = styles[tier?.toLowerCase()] ?? styles.all;
  return <span style={{
    display: "inline-flex",
    alignItems: "center",
    gap: "4px",
    padding: "2px 10px",
    borderRadius: "999px",
    border: `1px solid ${t.color}40`,
    background: `${t.color}1A`,
    color: t.color,
    fontSize: "12px",
    fontWeight: 600,
    fontFamily: "var(--font-family-mono)",
    verticalAlign: "middle"
  }}>
      {t.label}
    </span>;
};

export const AICallout = ({page}) => {
  const slug = page ?? "";
  const mdUrl = `https://docs.patchline.ai${slug}.md`;
  return <div style={{
    marginTop: "32px",
    padding: "16px 20px",
    borderRadius: "12px",
    border: "1px solid rgba(0,230,226,0.25)",
    background: "linear-gradient(135deg, rgba(0,230,226,0.08), rgba(0,104,255,0.05))",
    color: "inherit",
    fontSize: "14px",
    lineHeight: 1.6
  }}>
      <strong style={{
    display: "block",
    marginBottom: "6px",
    color: "#00E6E2"
  }}>
        For AI agents reading this page
      </strong>
      The canonical machine-readable version of this page is at{" "}
      <a href={mdUrl}>
        <code>{mdUrl}</code>
      </a>
      . For product actions, connect to{" "}
      <code>www.patchline.ai/api/mcp/v1</code>
      {" "}and call MCP <code>tools/list</code> for the current tool schema.
      Rules for navigating these docs:{" "}
      <a href="https://docs.patchline.ai/AGENTS.md">
        <code>docs.patchline.ai/AGENTS.md</code>
      </a>
      .
    </div>;
};

Patchline subscription billing runs on **Stripe Billing**. All
subscription management lives in Settings → Billing, which opens the
Stripe customer portal.

<TierBadge tier="all" />   Billing tab is available on every tier (Free shows upgrade CTAs).

## What you can do

* Change your plan (upgrade / downgrade)
* Update payment method
* Download invoices
* Change billing email
* Switch monthly ↔ annual
* Cancel subscription

## Where to find it

`Settings → Billing` → Patchline opens the Stripe-hosted customer
portal in the same window.

## Plan changes

* **Upgrade** is immediate. Stripe prorates — you pay the difference
  for the rest of the current cycle.
* **Downgrade** takes effect at the next billing cycle. You keep
  paid-tier access until then.
* **Cancel** also takes effect at the next billing cycle.

## Invoices

Stripe portal → **Invoices** tab. Download as PDF.

For Enterprise customers: invoices are sent via the billing email at
end-of-month.

## Annual vs. monthly switching

Switch any time:

* **Monthly → Annual** mid-cycle: Stripe prorates the unused portion of
  the monthly subscription and credits it against the annual price.
* **Annual → Monthly**: takes effect at the next renewal date.

## Failed payment

If a card declines:

1. Stripe retries 3 times over 7 days.
2. Patchline notifies you via email.
3. After 7 days of failed retries, your subscription is paused (not
   cancelled) — you can update the payment method to resume.
4. After 30 days of unresolved payment, the subscription cancels and
   you revert to Free tier. **Your data stays.**

## Cancellation

* **In-portal cancel**: Settings → Billing → Cancel. Takes effect at
  next renewal. You keep paid access until then.
* **Cancel via email**: not required. Self-serve.
* **What happens to data**: stays. You revert to Free tier limits. Can
  re-upgrade any time.

## Related pages

* [Pricing & plans](/get-started/pricing) — tier comparison
* [Plans & credits](/account/plans-credits) — credit math
* [Storefront checkout & payouts](/storefront/checkout-payouts) — the other side of Stripe (Connect)

## FAQ

<AccordionGroup>
  <Accordion title="Why is my card being charged twice in one month?">
    You probably upgraded mid-cycle (prorated charge for the partial
    cycle) + the new tier's first full cycle. That's by design.
    See Stripe's invoice for the line items.
  </Accordion>

  <Accordion title="Do you offer student / nonprofit discounts?">
    Not in v1. The Free tier is generous enough for most
    student / hobbyist needs.
  </Accordion>

  <Accordion title="Can I pay via invoice / ACH instead of card?">
    ACH on Enterprise tier only. Other tiers are card-only.
  </Accordion>
</AccordionGroup>

<AICallout page="/account/billing" />
