Stripe

Add payment processing and subscription billing to your App2 projects. Connect your Stripe account to accept payments, manage subscriptions, and build monetized applications.

Written By Nick Gatzoulis

Last updated 4 months ago

What is Stripe integration?

Stripe integration connects your App2 workspace to your Stripe account, enabling payment processing across your projects. The AI can then implement checkout flows, subscription billing, and payment management features.

What Stripe provides:

  • Payment processing: Accept credit cards, digital wallets

  • Subscription billing: Recurring revenue management

  • Checkout: Pre-built payment pages

  • Customer management: Track customers and payments

  • Webhooks: Payment event notifications

  • Analytics: Revenue and payment insights

How integration works:

  1. Add Stripe API keys to your workspace

  2. Link Stripe integration to specific projects

  3. AI implements payment features

  4. Your app can accept payments

Note: Stripe integration requires Pro subscription ($25/month minimum).

Why connect Stripe?

Stripe turns your App2 projects into monetized applications.

With Stripe, you can:

Accept payments:

  • One-time purchases

  • Product sales

  • Service fees

  • Donations

Manage subscriptions:

  • Monthly/annual billing

  • Tiered pricing plans

  • Free trials

  • Usage-based pricing

Build checkout flows:

  • Secure payment pages

  • Customer portal

  • Invoice management

  • Refund processing

AI can implement:

  • Stripe checkout integration

  • Subscription management

  • Payment webhook handlers

  • Customer portal

  • Invoice generation

  • Payment history

Prerequisites

Before connecting Stripe:

  1. Pro subscription: Stripe integration requires Pro or Lifetime tier ($25/month minimum)

  2. Stripe account: Free or paid account at stripe.com

  3. API keys: Publishable and secret keys from Stripe dashboard

  4. Workspace role: Owner or Admin permissions

Getting Stripe API keys:

  1. Log into dashboard.stripe.com

  2. Navigate to Developers β†’ API keys

  3. Copy your Publishable key (starts with pk_test_ or pk_live_)

  4. Copy your Secret key (starts with sk_test_ or sk_live_)

Important: Use test mode keys during development. Switch to live mode only when ready for production.

Setup steps

Step 1: Get Stripe API keys

Test mode (recommended first):

  1. Ensure you're in "Test mode" (toggle in Stripe dashboard)

  2. Go to Developers β†’ API keys

  3. Copy Publishable key (pk_test_...)

  4. Reveal and copy Secret key (sk_test_...)

Keep both keys ready for next step.

Step 2: Add Stripe integration

Add your Stripe account to your App2 workspace.

  1. Go to Workspace Settings β†’ Integrations β†’ Stripe

  2. Click "Add Stripe Integration" or "Connect Stripe"

  3. Enter Publishable key

  4. Enter Secret key

  5. Click "Validate credentials"

App2 validates your keys with Stripe.

Step 3: Confirm integration

Review detected account details.

You'll see:

  • Stripe account organization name

  • Account country

  • Default currency

  • Account status

Click "Confirm and save" to complete setup.

Keys are encrypted and stored securely in your workspace.

Step 4: Link to projects

Connect Stripe integration to specific App2 projects.

  1. Open your App2 project

  2. Go to Project Settings β†’ General β†’ Stripe Payments

  3. Select your Stripe integration from dropdown

  4. Click "Connect Stripe integration"

  5. Project linked successfully

The AI can now implement payment features for this project.

Managing integrations

Multiple Stripe integrations

Workspaces can have multiple Stripe integrations.

Why multiple integrations:

  • Separate test and live mode

  • Different Stripe accounts for different projects

  • Client-specific Stripe accounts

  • Multi-currency support

Example:

  • Integration 1: Test mode for development

  • Integration 2: Live mode for production

  • Integration 3: Client's Stripe account

Naming: Integrations show Stripe organization name for easy identification.

Viewing integrations

See all Stripe integrations in your workspace.

Where to view:Workspace Settings β†’ Integrations β†’ Stripe

What you'll see:

  • Organization name

  • Default currency

  • Account country

  • Linked projects count

  • Last validated timestamp

  • Action buttons

Updating API keys (rotation)

Replace existing Stripe keys with new ones.

How to update:

  1. Go to Workspace Settings β†’ Integrations β†’ Stripe

  2. Find the integration to update

  3. Click "Edit" or "Update keys"

  4. Enter new publishable key

  5. Enter new secret key

  6. Click "Validate credentials"

  7. Confirm update

What happens:

  • Old keys deleted

  • New keys encrypted and saved

  • Linked project sandboxes restart automatically

  • Payment features continue working with new keys

When to rotate:

  • Moving from test to live mode

  • Security best practice (periodic rotation)

  • Compromised key

  • Changing Stripe accounts

Deleting integrations

Remove Stripe integrations you no longer need.

When you can delete:

  • Integration has no linked projects

  • All projects unlinked first

  • No longer need this Stripe account

How to delete:

  1. Go to Workspace Settings β†’ Integrations β†’ Stripe

  2. Find integration to remove

  3. Verify no projects are linked (unlink them first if needed)

  4. Click "Delete" or "Remove"

  5. Confirm deletion

What gets deleted:

  • Stripe integration in App2

  • Encrypted API keys

  • Integration metadata

What stays intact:

  • Your Stripe account (unchanged)

  • Customer and payment data in Stripe

  • Webhooks (manually remove from Stripe dashboard if needed)

If projects are linked:

  • Cannot delete integration

  • Must unlink all projects first

  • Error shows which projects use it

Linking to projects

Connect Stripe integrations to individual projects.

How to link

  1. Open your App2 project

  2. Go to Project Settings β†’ General

  3. Find "Stripe Payments" section

  4. Select Stripe integration from dropdown

  5. Click "Connect Stripe integration"

  6. Wait for sandbox restart (~10 seconds)

  7. Linked successfully

One integration per project

Rule: Each App2 project can link to one Stripe integration at a time.

Why:

  • Prevents payment routing conflicts

  • Clear webhook configuration

  • Single source of truth

  • Better security

To switch integrations:

  1. Unlink current integration

  2. Link different integration

  3. Sandbox reconfigures automatically

Auto-configuration

App2 automatically configures your project when linked.

What happens:

  • Stripe secret key added to sandbox environment

  • Stripe MCP tools enabled for AI

  • AI can implement Stripe features

  • Webhook endpoint URL available

AI capabilities unlocked:

  • Create checkout sessions

  • Manage subscriptions

  • Handle payment webhooks

  • Implement customer portals

Using Stripe

Ask the AI to implement payment features once Stripe is linked.

AI payment implementation

The AI can:

  • Create Stripe checkout flows

  • Implement subscription billing

  • Set up webhook handlers

  • Build customer portals

  • Generate payment receipts

  • Handle refunds

  • Manage invoices

Example prompts

One-time payments:

  • "Add Stripe checkout for $29 one-time payment"

  • "Create product purchase flow with Stripe"

  • "Implement 'Buy Now' button with Stripe payment"

Subscriptions:

  • "Add monthly subscription billing with 3 pricing tiers using Stripe"

  • "Create subscription management page where users can upgrade/cancel"

  • "Implement free trial period with Stripe subscriptions"

Customer management:

  • "Build customer portal using Stripe where users can manage their subscription"

  • "Add payment history page showing all past invoices"

  • "Implement automatic receipt emails via Stripe"

Webhooks:

  • "Set up Stripe webhook handler for payment success events"

  • "Add webhook processing for subscription cancellations"

  • "Implement invoice payment failed handler"

Stripe MCP tools

AI has direct access to Stripe through MCP tools.

What AI can do:

  • Create products and prices

  • Generate checkout sessions

  • Manage customers

  • Process subscriptions

  • Handle webhooks

  • Query payment data

Transparent usage:

  • AI uses tools automatically when needed

  • No manual Stripe API calls required

  • Best practices followed

  • Secure implementation

Best practices

Test mode first

Always start in test mode:

  1. Use test API keys (pk_test_, sk_test_)

  2. Test checkout flows

  3. Verify webhooks work

  4. Test subscription flows

  5. Only then switch to live mode

Test mode benefits:

  • No real money charged

  • Test credit card numbers available

  • Safe for experimentation

  • Easy to reset

Stripe test cards:

  • 4242 4242 4242 4242 - Successful payment

  • 4000 0000 0000 0002 - Card declined

  • 4000 0025 0000 3155 - Requires authentication (3D Secure)

Security

Protect your Stripe keys:

  • Never commit keys to git

  • Never expose secret key in client code

  • Rotate keys periodically

  • Monitor Stripe dashboard for suspicious activity

  • Revoke compromised keys immediately

App2 security:

  • Keys encrypted at rest

  • Only workspace owners/admins can manage

  • Secret keys never exposed in UI

  • Transmitted over HTTPS

  • Sandbox environment isolated

Key rotation

When to rotate:

  • Moving test β†’ live mode

  • Every 90 days (best practice)

  • Suspected compromise

  • Team member changes

  • Ending client project

How to rotate:

  1. Generate new keys in Stripe dashboard

  2. Update integration in App2

  3. Old keys automatically revoked

  4. Sandboxes restart with new keys

Multiple integrations strategy

Organize by purpose:

  • Development: Test mode for building features

  • Staging: Test mode for client review

  • Production: Live mode for real payments

  • Client A, Client B: Separate accounts per client

Project linking:

  • Dev projects β†’ Development integration

  • Staging projects β†’ Staging integration

  • Production projects β†’ Production integration

Troubleshooting

Can't add Stripe integration (not Pro)

Issue: Stripe integration settings show upgrade prompt.

Solution: Stripe integration requires Pro subscription ($25/month). Upgrade to access this feature.


Stripe key validation failed

Issue: "Invalid API key" error when adding integration.

Solutions:

  1. Verify you copied both keys completely

  2. Check keys match mode (both test or both live, not mixed)

  3. Ensure keys are from same Stripe account

  4. Test keys in Stripe dashboard

  5. Generate new keys if needed


Can't link Stripe to project

Issue: "Connect Stripe integration" button disabled or fails.

Solutions:

  1. Verify you have at least one Stripe integration in workspace

  2. Check you selected an integration from dropdown

  3. Ensure you're workspace owner/admin

  4. Confirm project isn't already linked to another integration

  5. Try unlinking current integration first


Can't delete Stripe integration

Issue: Delete button disabled or shows error "Integration in use".

Solutions:

  1. Check which projects use this integration (shown in settings)

  2. Unlink all projects from this integration

  3. Verify all projects are unlinked

  4. Try delete again


Payment features not working

Issue: Implemented Stripe features but payments fail.

Solutions:

  1. Verify Stripe integration is linked to project

  2. Check using correct mode (test cards with test keys)

  3. Ensure webhooks are set up (AI should handle this)

  4. Check Stripe dashboard for error logs

  5. Verify API keys are still valid

FAQ

Can Free tier users use Stripe?

No. Stripe integration requires Pro or Lifetime subscription ($25/month minimum). Upgrade to access payment processing features.

Can I use test mode and live mode simultaneously?

Yes. Create two integrations: one with test keys, one with live keys. Link test integration to development projects and live integration to production projects.

How many Stripe integrations can I have?

Unlimited. Add as many Stripe accounts as you need. Useful for multiple clients or test/live separation.

Can I link one Stripe integration to multiple projects?

Yes. One integration can serve multiple projects. But each project can only link to one Stripe integration at a time.

What if I delete a linked Stripe integration?

You can't. Integrations with linked projects cannot be deleted. Unlink all projects first, then delete the integration.

Will App2 charge my Stripe account?

No. App2 doesn't create charges, customers, or subscriptions. Only you (or the AI when you prompt it) can create Stripe resources through your connected integration.

Can team members see my Stripe secret key?

No. Keys are encrypted and masked in the UI. Only workspace owners/admins can manage Stripe integrations, and secret keys are never displayed.

How do I switch from test to live mode?

Create a second integration with your live mode keys. Link production projects to the live integration. Keep test integration for development projects.

Do I need to set up webhooks manually?

No. Ask the AI to set up webhooks and it will create the webhook endpoints, register them with Stripe, and implement the handlers automatically.

Can I use different Stripe accounts for different projects?

Yes. Create multiple integrations (one per Stripe account), then link each project to its corresponding integration.

Related links