deeprelay billing upgrade
Upgrade your subscription to a bigger plan (charges the card on file now)
Upgrade your subscription to a bigger plan (charges the card on file now)
Synopsis
Moves your existing subscription onto a bigger plan — Base to Plus today.
Unlike subscribe this does not print a
link: Stripe already has your card, so the server charges it and the command
answers with your new status.
Upgraded to Plus.
Your card was charged the new plan's full price and a new billing period started now.
Plan Plus — $4.99 / month
Status subscribed (active)
Period 2026-10-07 → 2026-11-07 (UTC)
Input tokens 0 of 2.5B used (0.0%) — 2.5B left this period
Output tokens 0 of 250M used (0.0%) — 250M left this period
Weekly input 4.2M of 625M used (0.7%) — 620.8M left (resets Thu 2026-10-08 10:14 UTC)
Weekly output 1.1M of 62.5M used (1.8%) — 61.4M left (resets Thu 2026-10-08 10:14 UTC)
Metered usage $0.00 of $500.00 used (0.0%) — $500.00 left this period
The terms
- You pay the new plan's full price now, whatever day of the cycle it is. There is no proration and no credit for the unused part of the old plan's period.
- A new billing period starts now. Renewal moves to today's date, and the monthly meters start from zero on the new allowance. The weekly caps do not reset: this week's usage counts against the new, larger caps, and the week still resets at its usual weekday and time.
- The plan's price is the one Stripe holds; this CLI never hardcodes it.
deeprelay billing plansshows every plan on offer with its price and allowance before you commit.
When your bank asks you to confirm
Some banks want the cardholder to approve a charge themselves (3-D Secure). Every Indian card does this for a recurring plan, under RBI's e-mandate rules. The card can't be charged with nobody at the keyboard, so the command prints a payment page instead of upgrading:
Your bank needs you to confirm the Plus payment before the upgrade can go through.
Open this page within 23 hours and confirm it:
https://invoice.stripe.com/i/acct_…
Nothing is charged until you confirm. Until then you stay on your current plan.
Confirm the payment on that page and the upgrade applies within a minute,
on the terms above. Running the command again while the page is still open
prints the same link. Leave it unconfirmed and it lapses after 23 hours with
nothing charged. In JSON the link is pending_upgrade.payment_url.
Paying from your balance
--from-balance pays the new plan's full price from your deposited balance
instead of the card. The terms above are the same: full price now, new period
now, no proration.
Paid for Plus ($5.00 / month) from your deposited balance.
The full price was taken from your balance and a new billing period started now.
Renewals charge your saved payment method; to pay them from balance, run `deeprelay billing renew-from-balance on`.
Only deposited funds pay: free credit (referral and promo credit, credit
codes, post rewards, grants, adjustments) never pays for a plan, and card and
UPI deposits count 24 hours after they land. Payment is all-or-nothing in US
dollars — a short balance is 402 insufficient_balance and nothing is
charged. See
deeprelay billing renew-from-balance
for the split and for paying renewals from balance.
Downgrades
There is no downgrade command. To move to a smaller plan, cancel in the
portal (deeprelay billing cancel) — your
current plan stays active until the end of the period — and subscribe to the
smaller plan once it has ended.
Permissions and errors
Requires an org admin API key with the billing write scope, the same as
subscribe. A member key gets 403.
| Situation | Result |
|---|---|
| No active subscription to upgrade | 409 not_subscribed — use deeprelay billing subscribe --plan |
| Already on that plan, or on a bigger one | 409 not_an_upgrade |
| The subscription is set to end at the close of the period | 409 subscription_cancelling — an upgrade starts a new period, which would move that end date; resume it first with deeprelay billing resume |
| Unknown plan key, or one this deployment does not offer | 400 unknown_plan |
| The charge failed (declined card, no card) | 402 payment_failed — nothing changed; choose another payment method and run it again |
| Your bank wants you to confirm the payment (3-D Secure, Indian cards) | 200 with pending_upgrade.payment_url — confirm on that page; nothing is charged until you do |
--from-balance: the organization has no active plan | refused before any request — start one with deeprelay billing subscribe --plan |
--from-balance: the deposited balance does not cover the full price | 402 insufficient_balance — nothing was charged |
--from-balance: a rupee (UPI) plan | 409 not_usd_plan — only a dollar plan can be paid from balance |
--from-balance: a plan billed through our previous payment account | 409 renew_with_card |
--from-balance: the payment went to your saved payment method instead | 502 paid_by_card — your balance was not charged |
--from-balance: the price changed mid-payment, or the payment could not complete | 409 price_changed / 502 payment_failed — your balance was not charged; try again |
| Subscriptions not configured on this deployment | 503 |
| Not an org admin | 403 |
A 402 is the one to read carefully: the upgrade is all-or-nothing, so a
failed charge leaves you exactly where you were, on your old plan with its
old period. Choose another payment method for the plan with
deeprelay billing payment-methods set
(or add one with deeprelay billing payment-methods add --for plan) and
re-run the command. Do not use deeprelay billing cancel for this: it
cancels the plan.
Examples
# Move to Plus (the default target).
deeprelay billing upgrade
# Name the plan explicitly.
deeprelay billing upgrade --plan plus
# Pay for the upgrade from your deposited balance instead of the card.
deeprelay billing upgrade --plan plus --from-balance
# For a script: the post-upgrade status, same shape as `billing subscription`.
deeprelay billing upgrade --plan plus --output json | jq .plan.key
deeprelay billing upgrade [flags]
Options
--from-balance Pay the new plan's full price from your deposited balance instead of the card (free credit can't pay a plan)
-h, --help help for upgrade
--plan deeprelay billing plans Plan to move to, by key (deeprelay billing plans lists them) (default "plus")
Options inherited from parent commands
--api-base string API base URL (override with DEEPRELAY_API_BASE env) (default "https://api.deeprelay.ai/v1")
--debug Enable debug logging to stderr
--no-preflight Skip the plan/credit check before inference requests (override with DEEPRELAY_NO_PREFLIGHT env)
-o, --output string Output format: table|json (default table on TTY, json otherwise) (default "table")
SEE ALSO
- deeprelay billing - Check your balance, add funds, and review deposits