@kelviq/mcp-server 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -20
- package/dist/config.d.ts +8 -2
- package/dist/config.js +42 -9
- package/dist/config.js.map +1 -1
- package/dist/docs/api-reference/authentication.md +7 -3
- package/dist/docs/api-reference/introduction.md +143 -0
- package/dist/docs/backend-integration/node-sdk.md +148 -6
- package/dist/docs/backend-integration/python-sdk.md +195 -11
- package/dist/docs/changelog/api.md +119 -0
- package/dist/docs/changelog/app.md +693 -0
- package/dist/docs/changelog/node-sdk.md +153 -0
- package/dist/docs/changelog/python-sdk.md +182 -0
- package/dist/docs/cli/commands.md +225 -0
- package/dist/docs/cli/environments.md +95 -0
- package/dist/docs/cli/kelviq-config.md +141 -0
- package/dist/docs/cli/overview.md +223 -0
- package/dist/docs/customer-portal/managing-payment-methods.md +72 -0
- package/dist/docs/guides/mcp-server.md +374 -0
- package/dist/docs/guides/sandbox.md +107 -0
- package/dist/docs/guides/webhooks.md +81 -0
- package/dist/docs/manifest.json +64 -8
- package/dist/docs/openapi.json +1208 -52
- package/dist/docs/product-catalog/one-time-payments.md +3 -1
- package/dist/docs/product-catalog/usage-based-billing.md +86 -7
- package/dist/docs/quickstart/dashboard-setup.md +1 -1
- package/dist/http/client.d.ts +1 -1
- package/dist/http/client.js +1 -5
- package/dist/http/client.js.map +1 -1
- package/dist/schemas/kelviq.d.ts +0 -128
- package/dist/schemas/kelviq.js +0 -63
- package/dist/schemas/kelviq.js.map +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/entitlements.js +1 -1
- package/dist/tools/entitlements.js.map +1 -1
- package/dist/tools/index.js +0 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/plan-files.js +1 -1
- package/dist/tools/plan-files.js.map +1 -1
- package/dist/tools/plans.js +1 -15
- package/dist/tools/plans.js.map +1 -1
- package/dist/tools/portal.d.ts +11 -1
- package/dist/tools/portal.js +27 -2
- package/dist/tools/portal.js.map +1 -1
- package/dist/tools/products.js +1 -1
- package/dist/tools/products.js.map +1 -1
- package/dist/tools/subscriptions.js +1 -1
- package/dist/tools/subscriptions.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "kelviq.config.ts reference"
|
|
3
|
+
slug: "cli/kelviq-config"
|
|
4
|
+
section: "cli"
|
|
5
|
+
description: "The pricing-as-code file format: builders, fields, and the rules that keep it portable."
|
|
6
|
+
---
|
|
7
|
+
`kelviq.config.ts` is a plain TypeScript file that declares your pricing catalog. You author it by hand (starting from `kelviq init`) or generate it from a live environment with `kelviq pull` — the two are interchangeable starting points.
|
|
8
|
+
|
|
9
|
+
The format follows one design idea: the file describes the **desired state** of your catalog, and nothing else. Anything that's an artifact of a particular deployment — UUIDs, draft/published status, server-generated timestamps — stays out, which is what makes the same file portable across sandbox and production and meaningful to diff over time. It's TypeScript rather than YAML or JSON for one reason: **types**. Your editor autocompletes every field, invalid enums fail to compile, and a config that type-checks is a config the CLI can read.
|
|
10
|
+
|
|
11
|
+
A config file imports three **builders** from `@kelviq/cli/config` and exports the results:
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { product, feature, plan } from '@kelviq/cli/config';
|
|
15
|
+
|
|
16
|
+
export const app = product({
|
|
17
|
+
identifier: 'my-app',
|
|
18
|
+
name: 'My App',
|
|
19
|
+
taxCode: 'saas',
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const apiCalls = feature({
|
|
23
|
+
identifier: 'api-calls',
|
|
24
|
+
name: 'API calls',
|
|
25
|
+
type: 'METER',
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const seats = feature({
|
|
29
|
+
identifier: 'seats',
|
|
30
|
+
name: 'Seats',
|
|
31
|
+
type: 'CUSTOMIZABLE',
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export const pro = plan({
|
|
35
|
+
identifier: 'pro',
|
|
36
|
+
name: 'Pro',
|
|
37
|
+
product: 'my-app',
|
|
38
|
+
entitlements: [
|
|
39
|
+
{ feature: 'seats', value: 5 },
|
|
40
|
+
{ feature: 'api-calls', value: 10000, reset: 'EVERY_MONTH', hardLimit: false },
|
|
41
|
+
],
|
|
42
|
+
prices: [
|
|
43
|
+
{
|
|
44
|
+
priceType: 'PAID',
|
|
45
|
+
currency: 'USD',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The builders are typed: your editor autocompletes every field, and a misspelled or wrongly-typed field is a **compile-time error** with a "did you mean" suggestion — validation happens before any API call.
|
|
52
|
+
|
|
53
|
+
How the CLI reads the file: every export created by `product()` / `feature()` / `plan()` is collected, regardless of its export name. Other exports (helper constants, functions) are ignored, so you can organize the file however you like — split values, comment freely, generate plans in a loop. Duplicate identifiers within a kind are a hard error.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## The identity rule
|
|
58
|
+
|
|
59
|
+
Every cross-reference in the format — `plan.product`, `entitlements[].feature` — is an **identifier slug, never a UUID**. Identifiers are lowercase URL-safe slugs matching `^[a-z0-9][a-z0-9-_]*$` (for example `pro`, `api-calls`, `seats_v2`).
|
|
60
|
+
|
|
61
|
+
The Kelviq API sometimes wants UUIDs internally; the CLI resolves identifiers to UUIDs at sync time so your config file stays portable — the same file works against sandbox and production, where the same catalog has different UUIDs.
|
|
62
|
+
|
|
63
|
+
The plan lifecycle (draft → published) is also deliberately absent: the config describes **desired state**, not deployment state. Lifecycle is handled at sync time.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## product()
|
|
68
|
+
|
|
69
|
+
| Field | Type | Required | Description |
|
|
70
|
+
|---|---|---|---|
|
|
71
|
+
| `identifier` | slug | yes | Stable identifier, the join key across environments. |
|
|
72
|
+
| `name` | string | yes | Display name. |
|
|
73
|
+
| `taxCode` | enum | yes | One of: `saas`, `saas_business`, `software`, `videocontent`, `informationservice`, `ebook`, `digitalgraphic`, `videogame`, `eservice`, `training`. |
|
|
74
|
+
| `description` | string | no | Free-text description. |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## feature()
|
|
79
|
+
|
|
80
|
+
| Field | Type | Required | Description |
|
|
81
|
+
|---|---|---|---|
|
|
82
|
+
| `identifier` | slug | yes | Stable identifier, referenced from plan entitlements. |
|
|
83
|
+
| `name` | string | yes | Display name. |
|
|
84
|
+
| `type` | enum | yes | `BOOLEAN` (on/off), `CUSTOMIZABLE` (a configurable limit), or `METER` (usage-tracked). |
|
|
85
|
+
| `description` | string | no | Free-text description. |
|
|
86
|
+
| `featureDetails` | object | no | Type-specific detail payload, passed through to the API. |
|
|
87
|
+
| `meter` | object | no | Meter configuration for `METER` features, passed through to the API. |
|
|
88
|
+
| `metadata` | object | no | Arbitrary key-value metadata. |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## plan()
|
|
93
|
+
|
|
94
|
+
| Field | Type | Required | Description |
|
|
95
|
+
|---|---|---|---|
|
|
96
|
+
| `identifier` | slug | yes | Stable identifier. |
|
|
97
|
+
| `name` | string | yes | Display name. |
|
|
98
|
+
| `product` | slug | yes | Identifier of the parent product. |
|
|
99
|
+
| `description` | string | no | Free-text description. |
|
|
100
|
+
| `isVisible` | boolean | no | Whether the plan is publicly visible. |
|
|
101
|
+
| `entitlements` | array | no | What the plan grants — see below. |
|
|
102
|
+
| `prices` | array | no | The plan's price set — see below. |
|
|
103
|
+
| `metadata` | object | no | Arbitrary key-value metadata. |
|
|
104
|
+
|
|
105
|
+
### Entitlements
|
|
106
|
+
|
|
107
|
+
Each entry grants a feature to the plan:
|
|
108
|
+
|
|
109
|
+
| Field | Type | Required | Description |
|
|
110
|
+
|---|---|---|---|
|
|
111
|
+
| `feature` | slug | yes | Identifier of the granted feature. |
|
|
112
|
+
| `value` | boolean or number | no | The grant: `true`/`false` for `BOOLEAN` features, a number for limits. |
|
|
113
|
+
| `hasUnlimitedUsage` | boolean | no | Grant unlimited usage instead of a numeric value. |
|
|
114
|
+
| `reset` | enum | no | Usage reset cadence: `NEVER`, `EVERY_DAY`, `EVERY_28_DAYS`, `EVERY_MONTH`, `EVERY_QUARTER`, `EVERY_YEAR`. |
|
|
115
|
+
| `hardLimit` | boolean | no | Whether usage is blocked at the limit. |
|
|
116
|
+
| `usageAlerts` | object | no | Alert configuration, passed through to the API. |
|
|
117
|
+
|
|
118
|
+
Entitlements accept additional keys beyond these — the shape varies by feature type, and unrecognized keys are passed through to the API rather than rejected.
|
|
119
|
+
|
|
120
|
+
Some enum values (for example `EVERY_28_DAYS`) are only available when enabled for your account. The CLI's enum fields autocomplete the standard values but accept any string: values it doesn't recognize are passed through verbatim, and the API validates them when you push. This means new server-side values work without a CLI update.
|
|
121
|
+
|
|
122
|
+
### Prices
|
|
123
|
+
|
|
124
|
+
The price envelope is validated; the charge structures inside it are deliberately loose and passed through to the API as-is:
|
|
125
|
+
|
|
126
|
+
| Field | Type | Required | Description |
|
|
127
|
+
|---|---|---|---|
|
|
128
|
+
| `priceType` | enum | yes | `FREE`, `PAID`, or `CUSTOM`. |
|
|
129
|
+
| `currency` | string | no | ISO currency code, e.g. `USD`. |
|
|
130
|
+
| `freeTrial` | boolean | no | Whether the price includes a free trial. |
|
|
131
|
+
| `trialPeriod` | number | no | Trial length in days. |
|
|
132
|
+
| `taxBehavior` | enum | no | `INCLUSIVE`, `EXCLUSIVE`, or `UNSPECIFIED`. |
|
|
133
|
+
| `chargeCatalogPrice` | array of objects | no | The full charge structure (price models, tiers, billing periods). Passed through verbatim — see the plan-prices endpoints in the [API Reference](/api-reference/introduction) for the shape. |
|
|
134
|
+
|
|
135
|
+
A pulled config reproduces your remote prices in full, including nested charge structures. You rarely need to author `chargeCatalogPrice` by hand — pull an existing plan and adapt it. If you do author prices by hand, set `freeTrial`, `trialPeriod`, `enabled`, and `taxBehavior` explicitly — omitting them makes `kelviq push` see a difference against the server's stored defaults on every run (see the [push reference](/cli/commands#kelviq-push)).
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Schemas as values
|
|
140
|
+
|
|
141
|
+
Everything the builders validate against is exported from `@kelviq/cli/config` if you want to reuse it — `productDefSchema`, `featureDefSchema`, `planDefSchema`, `entitlementDefSchema`, `priceDefSchema`, `kelviqConfigSchema`, the enums (`taxCodeSchema`, `featureTypeSchema`, `priceTypeSchema`, `resetSchema`, `taxBehaviorSchema`, `identifierSchema`), and their TypeScript types (`ProductDef`, `FeatureDef`, `PlanDef`, and so on). They're standard [Zod](https://zod.dev) schemas.
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Kelviq CLI"
|
|
3
|
+
slug: "cli/overview"
|
|
4
|
+
section: "cli"
|
|
5
|
+
description: "Pricing-as-code for Kelviq — define your products, features, and plans in TypeScript and sync them with your account from the terminal."
|
|
6
|
+
---
|
|
7
|
+
**The Kelviq CLI is in beta.** It's fully functional — and safe by design, with previews and confirmations before every write — but commands, flags, and the `--json` output shape may still change between releases. Pin an exact version in CI and review the release notes before upgrading.
|
|
8
|
+
|
|
9
|
+
The Kelviq CLI (`@kelviq/cli`) lets you manage your pricing catalog as **code** instead of dashboard clicks. Your products, features, plans, entitlements, and prices live in a single typed TypeScript file — `kelviq.config.ts` — that you can review, diff, and version-control like the rest of your codebase.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { product, feature, plan } from '@kelviq/cli/config';
|
|
13
|
+
|
|
14
|
+
export const app = product({
|
|
15
|
+
identifier: 'my-app',
|
|
16
|
+
name: 'My App',
|
|
17
|
+
taxCode: 'saas',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const seats = feature({
|
|
21
|
+
identifier: 'seats',
|
|
22
|
+
name: 'Seats',
|
|
23
|
+
type: 'CUSTOMIZABLE',
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const pro = plan({
|
|
27
|
+
identifier: 'pro',
|
|
28
|
+
name: 'Pro',
|
|
29
|
+
product: 'my-app',
|
|
30
|
+
entitlements: [{ feature: 'seats', value: 5 }],
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The loop is complete in both directions: `kelviq pull` turns a live environment into a config file, and `kelviq push` deploys a config file back — with a diff preview, draft-first writes, and explicit gates before anything customer-facing changes. `kelviq promote` moves your whole sandbox catalog to production the same way.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Why pricing-as-code?
|
|
39
|
+
|
|
40
|
+
Your pricing model decides what customers are billed, what features they can reach, and what limits they hit. It is production infrastructure. But when it lives only in a dashboard, it's managed unlike any other production infrastructure you run:
|
|
41
|
+
|
|
42
|
+
- **Changes are invisible to your engineering workflow.** A plan edit doesn't show up in a pull request, doesn't get a review, and doesn't appear in `git log`. The first your team hears of it may be a support ticket.
|
|
43
|
+
- **There's no meaningful diff.** "What exactly changed in our Pro plan last quarter?" has no good answer when the only record is the current dashboard state.
|
|
44
|
+
- **Environments drift silently.** Sandbox and production start identical and slowly diverge — a limit tweaked in one, a price fixed in the other — until "it worked in sandbox" stops meaning anything.
|
|
45
|
+
- **The model lives in people's heads.** Understanding your own packaging means clicking through screens, plan by plan, feature by feature.
|
|
46
|
+
|
|
47
|
+
A `kelviq.config.ts` under version control changes each of those:
|
|
48
|
+
|
|
49
|
+
| Without | With pricing-as-code |
|
|
50
|
+
|---|---|
|
|
51
|
+
| Dashboard edits leave no trail | Every change is a commit — author, date, diff, and the PR discussion that approved it |
|
|
52
|
+
| Pricing changes skip review | Pricing changes go through the same pull-request review as any other production change |
|
|
53
|
+
| Sandbox/production drift is invisible | Pull both environments and `diff` them — drift is a one-command check |
|
|
54
|
+
| The catalog is spread across dashboard screens | The whole monetization model is one readable file — onboarding is "read this" |
|
|
55
|
+
| Mistakes surface at runtime, via the API | The file is **typed**: a misspelled field or invalid enum is a compile-time error with a "did you mean" suggestion, before Kelviq ever sees it |
|
|
56
|
+
|
|
57
|
+
The concepts in the file map one-to-one to Kelviq's own — products, features, plans, entitlements, prices. If you know the [core concepts](/quickstart/core-concepts), you already know the format.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## What you can do today
|
|
62
|
+
|
|
63
|
+
### Put your catalog under version control
|
|
64
|
+
|
|
65
|
+
If you've already built your pricing in the dashboard, one command gets it into git:
|
|
66
|
+
|
|
67
|
+
```shell
|
|
68
|
+
kelviq pull
|
|
69
|
+
git add kelviq.config.ts && git commit -m "Snapshot pricing catalog"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
From here on, re-running `kelviq pull --force` and committing captures every catalog change as a diff. Run it on a schedule in CI and dashboard edits stop being invisible — they become commits your team can read.
|
|
73
|
+
|
|
74
|
+
### Catch drift between sandbox and production
|
|
75
|
+
|
|
76
|
+
Pull both environments and compare:
|
|
77
|
+
|
|
78
|
+
```shell
|
|
79
|
+
kelviq pull -o sandbox.config.ts --force
|
|
80
|
+
kelviq pull --prod -o production.config.ts --force
|
|
81
|
+
diff sandbox.config.ts production.config.ts
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Because the config format references everything by stable `identifier` slugs — never per-environment UUIDs — the two files are directly comparable. A clean diff means your environments genuinely match; anything else shows you exactly where they don't. Run it before a launch, after a migration, or whenever "it worked in sandbox" needs verifying.
|
|
85
|
+
|
|
86
|
+
### Review pricing changes like code — then deploy them
|
|
87
|
+
|
|
88
|
+
Propose a pricing change by editing `kelviq.config.ts` in a pull request — the reviewer sees exactly what changes: the new limit, the removed entitlement, the price that swapped. After the merge, deploying is one command with a preview built in:
|
|
89
|
+
|
|
90
|
+
```shell
|
|
91
|
+
kelviq push --dry-run # exactly what would change, zero writes
|
|
92
|
+
kelviq push # apply as drafts, after showing the diff and asking
|
|
93
|
+
kelviq push --publish # and publish the changed plans, after a second confirmation
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Everything push writes is a **draft** by default — nothing a customer sees changes until you publish, and migrating existing customers to new entitlements or pricing always requires its own explicit flags. Pricing changes get the full GitOps treatment: PR → review → merge → push, with the dashboard as a viewer rather than the editor.
|
|
97
|
+
|
|
98
|
+
### Promote sandbox to production
|
|
99
|
+
|
|
100
|
+
Build and test your pricing in sandbox, then move it to production in one reviewed step:
|
|
101
|
+
|
|
102
|
+
```shell
|
|
103
|
+
kelviq promote --dry-run # read-only: exactly what production would change
|
|
104
|
+
kelviq promote # apply it, drafts first, confirmation required
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Promote matches resources across environments by identifier — no files, no UUID bookkeeping — and inherits every one of push's safety rails.
|
|
108
|
+
|
|
109
|
+
### Give your AI tools your pricing model
|
|
110
|
+
|
|
111
|
+
A typed, self-contained TypeScript file is something coding assistants are genuinely good at working with — ask one to "add a Team plan between Pro and Enterprise with 25 seats" and the builders' types keep it honest; anything invalid fails to compile. Pair the CLI with the [Kelviq MCP server](/guides/mcp-server) and your assistant can read the config for context *and* apply catalog changes through the API today.
|
|
112
|
+
|
|
113
|
+
### Start a new project from a template
|
|
114
|
+
|
|
115
|
+
```shell
|
|
116
|
+
kelviq init
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Writes a starter `kelviq.config.ts` to edit by hand — useful when you're designing pricing for a new product and want to sketch the model in code (with autocomplete and validation) before anything exists in Kelviq.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## How it fits with the rest of Kelviq
|
|
124
|
+
|
|
125
|
+
Each Kelviq surface has a distinct job — the CLI doesn't replace the others:
|
|
126
|
+
|
|
127
|
+
| Tool | Use it for |
|
|
128
|
+
|---|---|
|
|
129
|
+
| **CLI** (this) | Managing the **catalog itself** — the definition of your products, features, plans, and prices — as versioned code. |
|
|
130
|
+
| [Dashboard](https://app.kelviq.com) | Visual management, analytics, customer operations, feature renames — and reviewing the drafts push creates. |
|
|
131
|
+
| [Backend](/backend-integration/node-sdk) & [frontend SDKs](/frontend-integration/react-sdk) | Your **application's** runtime integration — checkouts, entitlement checks, usage reporting inside your product. |
|
|
132
|
+
| [MCP server](/guides/mcp-server) | Driving the Kelviq API conversationally from Claude, Cursor, or any MCP client. |
|
|
133
|
+
| [REST API](/api-reference/introduction) | Everything, programmatically — the layer all of the above are built on. |
|
|
134
|
+
|
|
135
|
+
A useful rule of thumb: SDKs are how your **product** talks to Kelviq at runtime; the CLI is how your **team** manages what Kelviq is configured to sell.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Installation
|
|
140
|
+
|
|
141
|
+
Requires Node.js 18 or newer.
|
|
142
|
+
|
|
143
|
+
```shell
|
|
144
|
+
npm install -g @kelviq/cli
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Verify the install:
|
|
148
|
+
|
|
149
|
+
```shell
|
|
150
|
+
kelviq --version
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Quickstart
|
|
156
|
+
|
|
157
|
+
### Step 1: Authenticate
|
|
158
|
+
|
|
159
|
+
```shell
|
|
160
|
+
kelviq login
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
`login` opens the dashboard's [API keys page](https://app.kelviq.com/settings/api-keys) in your browser and prompts you to paste a **Server API Key**. Input is masked and the key is stored locally with owner-only file permissions.
|
|
164
|
+
|
|
165
|
+
The CLI targets your **sandbox** environment by default. To store a production key too, run `kelviq login --prod`. See [Environments & authentication](/cli/environments) for how keys are stored and how to use environment variables instead (for example, in CI).
|
|
166
|
+
|
|
167
|
+
### Step 2: Pull your catalog
|
|
168
|
+
|
|
169
|
+
```shell
|
|
170
|
+
kelviq pull
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
`pull` fetches your sandbox catalog — products, features, plans, entitlements, and prices — and writes it as a `kelviq.config.ts` in the current directory. If you've already set up pricing in the dashboard, this is the fastest way to get it under version control.
|
|
174
|
+
|
|
175
|
+
### Step 3: Or start from scratch
|
|
176
|
+
|
|
177
|
+
```shell
|
|
178
|
+
kelviq init
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
`init` writes a starter `kelviq.config.ts` you can edit by hand. The file is plain TypeScript with full autocomplete — misspell a field and the compiler tells you before Kelviq ever sees it.
|
|
182
|
+
|
|
183
|
+
### Step 4: Check where you're pointed
|
|
184
|
+
|
|
185
|
+
```shell
|
|
186
|
+
kelviq env
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Prints which environment the CLI targets and which keys are configured — useful before any command that touches your account.
|
|
190
|
+
|
|
191
|
+
### Step 5: Make a change and deploy it
|
|
192
|
+
|
|
193
|
+
Edit the config — bump a limit, add a plan — then:
|
|
194
|
+
|
|
195
|
+
```shell
|
|
196
|
+
kelviq push --dry-run # see exactly what would change
|
|
197
|
+
kelviq push # apply it as drafts, after confirmation
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
When you're happy, `kelviq push --publish` makes the changed plans live, and `kelviq promote` carries the whole catalog from sandbox to production.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## The commands
|
|
205
|
+
|
|
206
|
+
| Command | What it does |
|
|
207
|
+
|---|---|
|
|
208
|
+
| [`kelviq init`](/cli/commands#kelviq-init) | Write a starter `kelviq.config.ts`. |
|
|
209
|
+
| [`kelviq login`](/cli/commands#kelviq-login) | Paste and store a Server API key. |
|
|
210
|
+
| [`kelviq logout`](/cli/commands#kelviq-logout) | Remove stored API keys. |
|
|
211
|
+
| [`kelviq env`](/cli/commands#kelviq-env) | Show the configured environment and key status. |
|
|
212
|
+
| [`kelviq pull`](/cli/commands#kelviq-pull) | Write your remote catalog to `kelviq.config.ts`. |
|
|
213
|
+
| [`kelviq push`](/cli/commands#kelviq-push) | Deploy a `kelviq.config.ts`: diff, confirm, draft-first writes, optional publish and prune. |
|
|
214
|
+
| [`kelviq promote`](/cli/commands#kelviq-promote) | Move the sandbox catalog to production with the same preview and gates. |
|
|
215
|
+
|
|
216
|
+
See the full [command reference](/cli/commands) for every flag, and the [`kelviq.config.ts` reference](/cli/kelviq-config) for the file format.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## What's coming
|
|
221
|
+
|
|
222
|
+
- **Catalog browse commands** — list and inspect products, features, and plans without a full pull.
|
|
223
|
+
- **Browser-based login** — a pairing flow that mints a scoped key from your dashboard session, replacing paste-a-key.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Managing Your Payment Methods"
|
|
3
|
+
slug: "customer-portal/managing-payment-methods"
|
|
4
|
+
section: "customer-portal"
|
|
5
|
+
description: "A guide for managing payment methods for your subscriptions."
|
|
6
|
+
---
|
|
7
|
+
## Why Do I Have Multiple Customer Accounts?
|
|
8
|
+
|
|
9
|
+
You might notice that you have multiple customer accounts under your profile, even if you are using a single email address.
|
|
10
|
+
|
|
11
|
+
When you subscribe to multiple products using the same email address, our system automatically creates a **separate customer ID** for each product subscription. This is intentionally designed so that you can independently manage the payment methods for each individual product—such as setting a default payment method, adding a new payment method, or deleting an existing one.
|
|
12
|
+
|
|
13
|
+
If you have multiple products managed under the *same* customer ID, those products will be listed together under that specific customer profile.
|
|
14
|
+
|
|
15
|
+
**Key takeaway:** Each separate customer account has its own:
|
|
16
|
+
|
|
17
|
+
* Assigned products and active subscriptions
|
|
18
|
+
* Payment methods
|
|
19
|
+
* Billing details
|
|
20
|
+
|
|
21
|
+
Make sure you are viewing the correct customer account from your Settings when updating payment methods or checking your subscription statuses.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Payment Methods and Fallback
|
|
26
|
+
|
|
27
|
+
When managing your subscriptions and billing details, it's important to understand how payment methods are prioritized to ensure your services remain uninterrupted.
|
|
28
|
+
|
|
29
|
+
### Default Payment Method
|
|
30
|
+
|
|
31
|
+
In your Billing Settings, you can add multiple payment methods (such as credit cards, Amazon pay, Link, UPI etc.. ) and designate one as your **Default Payment Method**.
|
|
32
|
+
|
|
33
|
+
### How the Fallback Works
|
|
34
|
+
|
|
35
|
+
When a subscription renews or an automatic charge occurs, the system will primarily attempt to charge the payment method that was selected at the time of subscription.
|
|
36
|
+
|
|
37
|
+
However, if the primary payment method used for the subscription fails (e.g., due to an expired card, insufficient funds, or a processing error), the system will automatically use your **Saved Default Payment Method** as a fallback.
|
|
38
|
+
|
|
39
|
+
This fallback mechanism ensures that your subscription remains active and you do not experience any disruption in service.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Managing Your Payment Methods
|
|
44
|
+
|
|
45
|
+
Below are detailed instructions on how to keep your billing information up to date across your customer accounts.
|
|
46
|
+
|
|
47
|
+
### Adding a Payment Method
|
|
48
|
+
|
|
49
|
+
You can add multiple payment methods to ensure you always have a valid card on file for your subscriptions.
|
|
50
|
+
|
|
51
|
+
1. Navigate to **Settings** from the main menu and select the **Billing** tab.
|
|
52
|
+
2. Locate the specific customer account you wish to update (if you have multiple accounts).
|
|
53
|
+
3. Click on the **Add Payment Method** button.
|
|
54
|
+
4. Securely enter your new credit card details (card number, expiration date, and CVC or other payment methods) and click save. The card will now appear under your "Saved payment methods".
|
|
55
|
+
|
|
56
|
+
### Setting a Default Payment Method
|
|
57
|
+
|
|
58
|
+
Your default payment method acts as a reliable fallback if an active subscription charge fails.
|
|
59
|
+
|
|
60
|
+
1. Navigate to **Settings** > **Billing**.
|
|
61
|
+
2. Find the card you want to prioritize under your saved payment methods.
|
|
62
|
+
3. Click the **star icon** next to the saved card to set the it as default. You should see a "DEFAULT" badge appear next to the card, indicating it is now your primary fallback payment method
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### Deleting a Payment Method
|
|
67
|
+
|
|
68
|
+
If a card has expired or you no longer want to use it for future billing, you can easily remove it. *Note: You cannot delete a card that is currently set as your default payment method.*
|
|
69
|
+
|
|
70
|
+
1. Navigate to **Settings** > **Billing**.
|
|
71
|
+
2. Locate the saved card you want to remove.
|
|
72
|
+
3. Click the **trash can icon** next to the payment method to remove payment method from your account.
|