Change subscription plan
Upgrades, downgrades, or re-prices a subscription (product, variant, interval, or quantity). Upgrades charge a prorated difference immediately; downgrades and end-of-period changes apply at the next renewal. Requires the SUBSCRIPTIONS_WRITE scope.
POST
https://api.pandabase.io/v2/core/stores/{storeId}/subscriptions/{subscriptionId}/change Authentication
Requires a bearer token (sk_…) or an API key in the header Authorization.
Path parameters
storeId string required (length 12–48)
subscriptionId string required (length 12–48)
Header parameters
idempotency-key string (length 8–32)
Body parameters
product_id string (length 12–48)
variant_id string or null No description.
billing_interval enum No description.
quantity integer (range 1–100000)
proration_behavior enum No description.
Response 200
Default Response
ok enum required (one of true)
data object required No description.
Response 400
Default Response
ok enum required (one of false)
error string required No description.
Response 404
Default Response
ok enum required (one of false)
error string required No description.
Request
curl -X POST https://api.pandabase.io/v2/core/stores/:storeId/subscriptions/:subscriptionId/change \ -H "Content-Type: application/json" \ -d '{"product_id":"string","variant_id":"string","billing_interval":"WEEKLY","quantity":0,"proration_behavior":"IMMEDIATELY"}'Response
{ "ok": true, "data": { "id": "sub_h7n4tr3bcfp2v8q1mzj0kxw5", "status": "ACTIVE", "billingInterval": "MONTHLY", "amount": 2900, "currency": "USD", "currentPeriodStart": "2026-05-14T12:34:56.000Z", "currentPeriodEnd": "2026-06-14T12:34:56.000Z", "nextChargeAt": "2026-06-14T12:34:56.000Z", "trialEnd": null, "cancelledAt": null, "pausedAt": null, "endsAt": null, "retryCount": 0, "product": { "id": "prd_8h4t6sqzy3x9w5n2k1m0vqbf", "title": "Pro Plan", "price": 2900 }, "customer": { "id": "cus_j8h0r1n4tzcbfp2v8q1mzwx5", "email": "buyer@example.com" }, "paymentMethod": { "id": "pmm_n4tr3bcfp2v8q1mzj0kxw5h7", "brand": "visa", "lastFour": "4242", "expMonth": 12, "expYear": 2030 }, "createdAt": "2026-05-14T12:34:56.000Z" }}