---
title: "Preview a subscription plan change"
method: POST
path: "/billing/me/subscription/preview"
tags: ["Billing"]
---

# Preview a subscription plan change

`POST /billing/me/subscription/preview`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/billing/me/subscription/preview`
- Auth: API key in header `x-api-key`

Previews an authenticated user's immediate upgrade or next-renewal downgrade. Stripe calculates the upgrade proration; downgrades keep the current plan and credits active until the current period ends.

## Request body

- BillingStripeSubscriptionChangeRequestDoc
  - `idempotency_key` string
  - `plan` string
  - `previewed_at` string
  - `proration_date` integer

## Response `200`

Subscription change preview

- BillingStripeSubscriptionChangePreviewResponseDoc
  - `code` integer
  - `data` BillingStripeSubscriptionChangePreview
    - `action` string
    - `amount_due_cents` integer
    - `currency` string
    - `current_period_end` string
    - `current_plan` string
    - `effective_at` string
    - `next_renewal_amount_cents` integer
    - `preview_id` string
    - `previewed_at` string
    - `proration_date` integer
    - `remaining_credits_after_change` integer
    - `target_daily_credit_limit` integer
    - `target_included_credits` integer
    - `target_plan` string
    - `target_rate_limit_per_minute` integer
    - `used_credits` integer
  - `msg` string

## Other responses

- `400`: Invalid plan or subscription change
- `401`: Authentication 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/afac9b012a27?raw)
