Documentation Index
Fetch the complete documentation index at: https://docs.insforge.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Payments CLI is the admin and agent control surface for Stripe setup. Use it to configure Stripe keys, sync Stripe as the source of truth, manage catalog objects, configure webhooks, and inspect synced subscription or payment-history state. Runtime checkout and Billing Portal redirects belong in application code through the TypeScript Payments SDK, not in the CLI.All examples use
npx @insforge/cli. Do not install the CLI globally.The CLI is meant for setup and visibility. For refunds, disputes, and other sensitive financial operations, continue using the Stripe Dashboard directly.
Command Summary
| Command | Purpose |
|---|---|
payments status | Show Stripe key, account, sync, and webhook status |
payments config | Show configured test/live Stripe keys |
payments config set <environment> [secretKey] | Configure a Stripe test or live secret key |
payments config remove <environment> | Remove a configured Stripe key |
payments sync | Sync products, prices, customers, and subscriptions from Stripe |
payments catalog | Show synced products and prices together |
payments products ... | List, get, create, update, or delete Stripe products |
payments prices ... | List, get, create, update, or archive Stripe prices |
payments webhooks configure <environment> | Create or recreate the managed Stripe webhook endpoint |
payments subscriptions | Read synced subscriptions |
payments history | Read synced payment history |
Recommended Workflow
Check project and payment status
Verify the current linked project, then inspect the Stripe connection state.
Sync Stripe state
Pull products, prices, customers, and subscriptions from every configured Stripe environment.
Create or inspect catalog objects
Use products and prices commands to set up one-time purchases or subscriptions.
Status
status first. It shows each environment’s key status, Stripe account identity, latest sync status, sync timestamp, and managed webhook configuration.
If the CLI says Payments are not available on this backend, the project is running a backend version that does not expose the payments API. Upgrade the self-hosted backend or ask the project admin to enable payments.
Stripe Keys
payments config set, not generic secrets commands. The payments config flow validates the key with Stripe, records the Stripe account identity, stores the secret in the InsForge secret store, best-effort configures webhooks, and runs sync when the connected Stripe account changes.
When configuring interactively, omit the key and the CLI prompts for it:
--json and provide the key argument:
Sync Stripe State
payments webhooks configure <environment> for webhook setup.
Stripe is the source of truth. Sync overwrites local catalog drift with Stripe data.
payments.stripe_customer_mappings, which is the operational subject-to-customer lookup used by portal creation and subscription ownership.
Catalog
catalog to inspect products and prices together. This is usually the fastest way for agents to discover usable Stripe price IDs before building checkout UI.
Products
Prices
List or inspect prices:Webhooks
Subscriptions and Payment History
These commands are read-only operational views over InsForge’s synced payment data:orders, credit_ledger, user_entitlements, or team_billing_status and protect them with RLS.
JSON Output
Use the global--json flag for scripts and agents:
--yes:
Troubleshooting
| Symptom | What to do |
|---|---|
Payments are not available on this backend | Upgrade the self-hosted backend or ask the project admin to enable payments |
| No products or prices appear | Run payments sync, then check that the correct environment key is configured |
| Webhook setup fails on localhost | Deploy to a public URL or use Stripe CLI for local webhook forwarding |
| Checkout cannot find a price | Check payments catalog --environment test and use a price ID from the same environment |
| Product deletion fails | Deactivate the product instead; Stripe only allows deletion in limited cases |
| Portal creation returns no customer mapping | Have the customer complete Checkout first, then retry the portal flow |
Related Pages
Payments Architecture
Learn how Stripe keys, sync, checkout, webhooks, and fulfillment work together.
TypeScript Payments SDK
Create Checkout Sessions and Billing Portal Sessions from app code.