---
name: bijection-stripe
description: "Evaluate and integrate the Stripe component with Bijection."
---

# Stripe

Checkout, subscriptions and billing

- Package: @bijectionhq/stripe
- Category: Payments
- Status: Included
- License: Apache-2.0
- Bijection source (repository access required): https://github.com/bijectionhq/stripe/tree/22e23e2bdfcc88b48a1604a80bf60d8f15494360
- Upstream: https://github.com/convex/stripe/tree/5681a698cb59d96e87a2dc219904fc848b90ec9d
- Documentation: https://docs.bijection.com/components/using
- Directory: https://bijection.com/components/stripe

## Get the source

Bijection repository access is required. Request access at https://bijection.com/contact.

```sh
git clone https://github.com/bijectionhq/stripe.git
cd stripe
git checkout 22e23e2bdfcc88b48a1604a80bf60d8f15494360
```

## Before using this component

Read the package README at the recorded revision for setup, dependencies, and API examples. Upstream documentation describes the original package and may differ from the Bijection adaptation. This source is included in Bijection's workspace. Catalog inclusion does not establish npm availability or runtime qualification. Check compatibility with your SDK and deployment before adoption. External providers run their own compute.

## Integration workflow

1. Read the source README and package manifest at the recorded revision.
2. Confirm the required SDK, dependency availability, and runtime compatibility.
3. Follow the component's documented setup and configuration. Never invent an npm install command from a catalog package name.
4. Keep credentials in the project's existing secret store.
5. Follow the project's execution rules for verification and report what was actually checked.

## Original upstream skill

The following guidance describes @convex-dev/stripe. Its installation commands and APIs refer to the upstream package. Evaluate compatibility with the Bijection source separately.


> Agents: read this skill fully before writing code that uses Stripe. Follow the installation and configuration steps exactly.

# Stripe

## Instructions

A Convex component that handles the complete Stripe integration lifecycle including checkout sessions, subscription management, customer billing portals, and webhook synchronization. It automatically creates and manages customers, processes payments and subscriptions, and keeps Stripe data synchronized with your Convex database through webhook handlers. The component provides both a StripeSubscriptions client API and direct database queries for real-time payment data.

### Installation

```bash
npm install @convex-dev/stripe
```

Current npm version: `@convex-dev/stripe@0.1.7`

## Use cases

- **SaaS subscription billing** - Implement recurring billing with seat-based pricing, subscription upgrades/downgrades, and automatic customer portal access for plan management
- **One-time payment processing** - Handle product purchases, service fees, or donations with Stripe Checkout integration and payment status tracking
- **Team billing management** - Link subscriptions to organizations with quantity-based pricing, allowing teams to add or remove seats dynamically
- **Customer self-service billing** - Generate Customer Portal sessions so users can update payment methods, download invoices, and manage their billing without support
- **Multi-tenant payment tracking** - Query payments, subscriptions, and invoices in real-time across users and organizations with automatic webhook synchronization

## How it works

The component uses a StripeSubscriptions client that wraps Stripe API calls within Convex actions, handling customer creation, checkout sessions, and subscription management. You configure it by adding the component to your convex.config.ts and setting up webhook routes in http.ts that point to the component's webhook handler at /stripe/webhook.

Webhook events automatically synchronize Stripe data to dedicated Convex tables (customers, subscriptions, payments, invoices) in the component's namespace. The component handles 10+ webhook events including checkout.session.completed, customer.subscription.updated, and payment_intent.succeeded, maintaining real-time data consistency.

You access payment data through the component's public queries like listSubscriptionsByUserId and getPayment, or use the client methods like createCheckoutSession and updateSubscriptionQuantity in your actions. The component supports linking payments to both individual users and organizations through metadata, enabling flexible billing models.

## When NOT to use

- When a simpler built-in solution exists for your specific use case
- If you are not using Convex as your backend
- When the functionality provided by Stripe is not needed

## Resources

- [npm package](https://www.npmjs.com/package/%40convex-dev%2Fstripe)
- [GitHub repository](https://github.com/get-convex/stripe)
- [Live demo](https://stripe-component.vercel.app/)
- [Convex Components Directory](https://www.convex.dev/components/stripe)
- [Convex documentation](https://docs.convex.dev)