Building Your App › Integrations
Stripe Integration
Accept payments and subscriptions in your app with Stripe
What is Stripe?
Stripe lets you accept credit card payments, subscriptions, and one-time purchases in your app. It's the most popular payment platform used by companies like Shopify, Lyft, and Amazon.
Perfect for:
- Selling products or services
- Monthly subscriptions (like Netflix)
- Taking donations
- Membership fees
What You'll Need
Stripe Account
Sign up at stripe.com - it's free!
Get API Keys
Copy two keys from your Stripe dashboard
A good initial prompt
That's all you need to set this up
Step 1: Get Your Stripe Keys
Create Your Stripe Account
- Go to stripe.com
- Click Sign up
- Enter your email and create a password
- Verify your email
That's it! You can start testing immediately. Stripe gives you test mode to try everything before going live.
Find Your API Keys
- Log into your Stripe Dashboard
- Look in the top right corner - switch to Test mode (there's a toggle)
- Click Developers at the top
- Click API keys
- You'll see two keys:
Publishable Key
Starts with: pk_test_
This one is safe to share - it should be accessible via the dashboard
Secret Key
Starts with: sk_test_
Keep this one private!
Click Reveal to see it
- Copy both keys somewhere safe
Step 2: Tell the Emergent Agent
Now just tell the Emergent agent what you want! Copy this template and fill in your details:
For One-Time Payments
I need to accept payments with Stripe.
What I'm selling:
- [Product 1] for $XX
- [Product 2] for $XX
My Stripe keys:
- Publishable key: pk_test_xxxxx
- Secret key: sk_test_xxxxx
I want customers to:
1. Click a "Buy Now" button
2. Enter their card details
3. Get a confirmation after payment
Please set this up for me.
For Monthly Subscriptions
I need to accept monthly subscriptions with Stripe.
My pricing plans:
- Basic: $9/month
- Pro: $19/month
- Premium: $49/month
My Stripe keys:
- Publishable key: pk_test_xxxxx
- Secret key: sk_test_xxxxx
I want customers to:
1. Choose a plan
2. Enter payment details
3. Get charged automatically each month
4. Be able to cancel anytime
Please set this up for me.
<Tip>
**That's all you need to say!** The agent will handle all the technical setup.
</Tip>
Step 3: Test It Works
After the agent sets everything up:
Click Preview
In Emergent, click the Preview button
Try Buying Something
Go through the purchase flow like a customer would
Use Test Card
When it asks for a card, use: 4242 4242 4242 4242
- Expiry: Any future date
- CVC: Any 3 digits
- ZIP: Any ZIP code
Complete Purchase
Finish the payment
Check It Worked
You should see a success message!
Check Stripe Dashboard: Go to Stripe → Payments. You'll see your test payment there!
More Test Cards
Step 4: Go Live (Accept Real Payments)
When you're ready to accept real money:
Switch to Live Mode
In Stripe, toggle from Test mode to Live mode (top right)
Get Live Keys
Go to Developers → API keys
Copy your live keys (start with pk_live_ and sk_live_)
Update in Emergent
When deploying, enter your live keys instead of test keys
Complete Stripe Setup
Stripe will ask for:
- Business details
- Bank account (to receive money)
- Identity verification
Deploy!
Deploy your app and start accepting real payments!
Common Questions
2.9% + 30¢ per successful transaction
For example:
- On a sale of 10, you get 9.41
- On a sale of 100, you get 96.80
No monthly fees, no setup fees. You only pay when you make a sale.
Stripe pays you automatically every 2 days (after initial 7-day period).
Money goes directly to your bank account.
Stripe handles this for you. They'll notify you and help manage the dispute process.
Yes! Just tell the agent:
I need to be able to refund payments.
Please add a refund feature to my Stripe integration.
Stripe works in 45+ countries. Check stripe.com/global to see if your country is supported.
Something Not Working?
Payment Button Doesn't Work
Tell the agent:
The payment button isn't working when I click it.
Can you check the Stripe integration?
Customer Sees an Error
Tell the agent:
Customers are seeing this error when trying to pay:
[Copy and paste the exact error message]
Can you fix this?
Payments Not Showing in Stripe
Tell the agent:
I completed a test payment but don't see it in my Stripe dashboard.
Can you check if Stripe is connected correctly?
Real Examples
Example 1: Selling a Course
I'm selling an online course for $97.
I need Stripe to:
- Let students pay with credit card
- Give them instant access after payment
- Send them a receipt email
My Stripe keys: [paste keys]
Please set this up.
Example 2: SaaS Subscription
I'm building a SaaS app with these plans:
- Starter: $15/month
- Business: $49/month
- Enterprise: $99/month
I need:
- Monthly recurring billing
- Let users upgrade or downgrade
- Cancel anytime
- 7-day free trial
My Stripe keys: [paste keys]
Please set this up.
Example 3: Accepting Donations
I need to accept donations of any amount.
Features I need:
- Let donors enter custom amount
- Suggested amounts: $5, $10, $25, $50
- One-time or monthly donations
- Thank you message after donating
My Stripe keys: [paste keys]
Please set this up.
Quick Checklist
Before you go live:
- Tested payment with test card (4242...)
- Checked payment appears in Stripe dashboard
- Tested on mobile phone
- Set up your Stripe account completely
- Switched to live keys
- Tried a small real payment yourself
- Know how to issue refunds
Help & Resources
Ask Emergent Agent
Just describe what's not working or what you want to change
Remember
Always test first with test mode before accepting real payments
Keep your secret key private - never share it publicly
Start simple - You can always add more features later
Ask the agent if you're unsure about anything
<Info> Need help? Just tell the agent: "I need help with my Stripe integration" and describe what's not working. </Info>