---
title: "Change a user's billing plan"
method: POST
path: "/admin/billing/users/{id}/plan"
tags: ["Billing"]
---

# Change a user's billing plan

`POST /admin/billing/users/{id}/plan`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/admin/billing/users/{id}/plan`
- Auth: API key in header `x-api-key`

Admin-only endpoint that applies an immediate local plan change and refreshes the user's billing state. Set comp=true to tag the change as a non-revenue goodwill/support grant (comp_reason required) instead of a real payment: pricing_source is tagged "comp" (price defaults to 0), the grant is recorded on the billing-state audit trail, and it is excluded from revenue/MRR reporting and from the admin plan-mix stat. comp_expires_at is informational only — nothing auto-reverts it today; revert manually with a follow-up call that omits comp.

## Path parameters

- `id` string, required

## Headers

- `x-api-key` string, required

## Request body

- BillingAdminPlanChangeRequestDoc
  - `comp` boolean
  - `comp_expires_at` string
  - `comp_reason` string
  - `currency` string
  - `monthly_price_cents` integer
  - `plan` string, required

## Response `200`

Updated credit snapshot

- BillingAdminPlanChangeResponseDoc
  - `code` integer
  - `data` BillingBillingSnapshotDoc
    - `allow_overage` boolean
    - `credits_remaining` integer
    - `credits_used` integer
    - `currency` string
    - `daily_credit_limit` integer
    - `daily_credits_remaining` integer
    - `daily_credits_used` integer
    - `daily_key` string
    - `expected_subscription_amount_cents` integer
    - `expected_total_amount_cents` integer
    - `hard_limit` boolean
    - `included_credits` integer
    - `overage_credits` integer
    - `period_end` string
    - `period_key` string
    - `period_start` string
    - `plan` string
    - `pricing_source` string
    - `subscription_price_cents` integer
    - `user_id` string
  - `msg` string

## Other responses

- `400`: Invalid request body
- `401`: Authentication required
- `403`: Admin plan required
- `500`: Internal server error

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/0497899e2016?raw)
