Skip to content

Stripe ​

Use LicenseKit with Stripe when payment, subscription, invoice, or checkout events should create enforceable software access.

Who This Is For ​

  • vendors already selling software or digital IP through Stripe
  • teams using Stripe Billing, Payment Links, Checkout, invoices, or subscriptions
  • operators who need payment context linked to licenses, usage, devices, and support evidence

When To Use This ​

Use the Stripe integration when Stripe should remain the billing system and LicenseKit should become the access and observability layer after payment.

Do not use it as a storefront, file delivery app, CRM, or billing replacement.

How It Works ​

The Stripe integration maps Stripe products or prices to LicenseKit products and policies.

When a relevant Stripe event arrives, LicenseKit can:

  • create or reuse the customer
  • create or reuse an order with Stripe external IDs
  • preserve subscription, invoice, payment, product, price, and line-item context
  • issue or renew the linked license
  • write LicenseKit identifiers back to Stripe metadata where supported
  • expose license status inside Stripe dashboard views

The repo includes:

  • cmd/stripe-integration
  • internal/integrations/stripe
  • integrations/stripe-app

The main serve command can mount the Stripe routes when STRIPE_INTEGRATION_ENABLED=true or the Stripe integration environment is configured.

Key Routes ​

  • GET /stripe/oauth/install
  • GET /stripe/oauth/callback
  • POST /stripe/webhook
  • GET /stripe/app/customer
  • GET /stripe/app/subscription
  • GET /stripe/app/invoice
  • GET /stripe/app/payment
  • GET /stripe/admin/catalog
  • GET /stripe/admin/licensekit/catalog
  • GET /stripe/admin/mappings
  • POST /stripe/admin/mappings
  • GET /stripe/admin/fulfillments

Configuration Shape ​

Use the exact environment names from the integration package, including:

bash
STRIPE_INTEGRATION_ENABLED=true
STRIPE_PUBLIC_BASE_URL="https://api.licensekit.dev"
STRIPE_APP_CLIENT_ID="..."
STRIPE_APP_CLIENT_SECRET="..."
STRIPE_WEBHOOK_SECRET="..."
STRIPE_APP_SIGNING_SECRET="..."

LICENSEKIT_BASE_URL="https://api.licensekit.dev"
LICENSEKIT_API_TOKEN="..."
LICENSEKIT_APP_URL="https://app.licensekit.dev"

For the Stripe Apps UI extension, keep the backend CORS allowlist aligned with Stripe dashboard origins and the sandboxed UI-extension iframe origin.

Common Mistakes ​

  • treating Stripe metadata as the license source of truth instead of a pointer back to LicenseKit
  • creating a license from every webhook retry instead of deduping by Stripe event and object IDs
  • using LicenseKit order records for proration or billing logic that belongs in Stripe
  • submitting marketplace distribution before OAuth, hosted backend, testing steps, privacy, support, pricing, screenshots, and review requirements are ready

Prototype docs shell for the rewrite workspace.