Cofounder Docs

Payments And Stripe

Connect Stripe, sync it into the managed app, and use the Payments agent to add billing to your app.

Where To Add Stripe Keys

Add Stripe from Settings > Payments.

Org admins can paste:

  • the Stripe publishable key
  • the Stripe secret key

Cofounder verifies the keys before treating Stripe as connected.

What Happens When Stripe Is Connected

Once the keys are valid:

  • Stripe shows up as a connected integration for the workspace
  • Cofounder syncs the Stripe config into the managed app
  • the app is ready for Stripe implementation work
  • the Stripe webhook is configured to point at the managed app

Test keys stay out of production. Live keys sync to production only.

Payments Agent

From Settings > Payments, you can kick off the Payments agent.

The Payments agent works with you to add Stripe to the app. That can include:

  • wiring Stripe into the app
  • adding checkout or subscription flows
  • setting up billing-related app logic
  • finishing work when Stripe is already partially connected

This is the path to use when you want Cofounder to help implement payments, not just store keys.

Stripe In The Managed App

When Stripe is connected, Cofounder syncs the Stripe configuration into the managed app project.

That includes:

  • the publishable key
  • the secret key
  • the webhook signing secret

Stripe Webhook

When you connect Stripe, Cofounder also configures the Stripe webhook for the managed app automatically.

The webhook points at the managed Vercel app's Stripe webhook route:

/api/stripe/webhook

If a domain has already been assigned to the app, Cofounder uses that domain for the webhook URL. Otherwise it uses the managed Vercel app URL.

The webhook signing secret is then synced into the managed app as well.

Seeded Webhook Route

The managed app starter already includes a Stripe webhook route.

That route verifies the Stripe signature and gives the app a starting point for webhook handling. The Payments agent can then help add the app-specific billing logic on top of it.

Next Steps