Skip to main content
Note: Stripe integration is available on Builder tier and above. If you’re on the Free tier, you’ll need to upgrade your app to use backend functions and payment features.

Step-by-step setup

Part 1 : The Stripe side

If you already have your Stripe secrets, you can skip ahead to “Part 2 - The Base44 side” setup
1

Create your Stripe account

If you don’t have a Stripe account yet, create one on www.stripe.com.Screenshot2025 07 25at12 05 27PM Pn
  • Stripe will ask you for your contact info, business details and banking information.
  • Not ready to provide those yet? No problem. You can start using Stripe’s sandbox environment, which lets you test everything without moving real money.
You must have an activated account in order to accept real payments. To activate your account, you will need to provide your business and banking details with Stripe. 
2

Get your API key

You’ll find your API keys in your Stripe dashboard.2 API Key Pn
  • Copy and save your secret key somewhere secure, but also keep it handy. You’ll need to paste it into Base44 later. 
If you need extra help, check out Stripe’s API keys guide.
3

Get your webhook secret

To securely send payment updates from Stripe to your app, you’ll need a webhook secret. Stripe uses webhooks to notify your Base44 app when something happens (like a successful payment).
  1. Go to the Stripe Workbench and open the Webhooks tab. 
  2. Click “Add endpoint” (or “add destination”). 3 Add Event Destinations Pn
  3. Choose the event(s) you need.
    For example,  “checkout.session.completed” is commonly used for one-time payments via Stripe checkout.
    4 Selectevent Pn
    You can choose different events depending on what your app does:
    • Invoice.paid -   is great for subscriptions.
    • payment_intent.succeeded - is great for manual payments.
    • customer.subscription.deleted - is great for managing cancellations. 
  4. When asked to choose a destination type, select: Webhook endpoint. 5 Choosedestinationtype Pn
    You might also see Amazon EventBridge which is a tool for advanced apps built with Amazon Web Services (AWS) and used mostly by developers connecting multiple cloud services. If that’s not you, just stick with Webhook endpoint.
  5. Add your destination name and app’s URL as the endpoint, then select “Create destination.” 6 Configure Destination Pn
4

After saving, copy the signing secret

The signing secret starts with “whsec” and you can find it in the destination details section.7 WHSEC Pn
Note: Keep this secret safe and handy, you’ll also need to paste this into Base44

Part 2 : The Base44 side

1

Activate backend functions

To use Stripe (and other advanced features) in your Base44 app, you’ll first need to enable backend functions. Here’s how to do it: Activate Backend Functions Pn
  1. Open Base44 and select the app you want to connect to Stripe.
  2. Click on the app’s Dashboard
  3. Click on Settings
  4. Scroll down and click on App Settings.
  5. Find the section labeled Backend Functions.
  6. Click the “Activate” button. 
Prefer to watch a quick demo? Check out this short video.
2

Connect Stripe to your app

Now that backend functions are enabled:
  1. In your app’s AI chat, type: integrate with Stripe. Integratewithstripe Pn
  2. Click on “Update secrets” in the chat and when prompted, paste in:
    • Your API key (from Stripe step 2)
    • Your webhook secret (from Stripe Step 3)
    Addstripesecrets Pn
That’s it! Your app is now connected to Stripe and ready to start handling payments. 

Running tests

Before you go live, it’s a good idea to test your setup using Stripe’s sandbox mode. 

How to build real payment features in Base44

Once Stripe is connected to your Base44 app, you can start accepting real payments and not just test ones.  But what happens next?  You’ll likely want to do something after a payment goes through, like:
  • Add credits to the user’s account
  • Unlock a digital product
  • Mark the user as “Pro” or subscribed
  • Remove access after a refund
To make those things happen, you’ll need to tell your Base44 app what to do as clearly and specifically as possible in the AI chat. Why do I need to describe it this way? Great question! Stripe does offer a tool called a webhook, which sends a message to your app when a payment is complete. But Base44 doesn’t allow those background messages to change user data (like credits or access) on their own.

Instead, your app needs to make those updates based on a logged-in user’s session for safety and security. We explain more below, but the short version is:
  • Always let the user trigger the update
  • Your prompts in the AI Chat should reflect that, so the flow works as expected
Below are some example prompts that you can paste directly into the chat to set up real payment flows. You can copy them as-is or tweak them to describe exactly what you want your app to do.  
Let users buy credits (e.g., “Buy 10 credits for $10”) and automatically update their account after payment.
What to type in the chat: I want to let users buy credits in my app using Stripe. When someone buys a credit package, they should be sent to a Stripe payment page. After the payment is successful, they should be sent back to my app, and the credits should be added to their account.Please:
  • Create a backend function to start the Stripe Checkout session
  • Add the user’s ID to the Stripe session so we know who paid
  • Redirect the user back to a PaymentSuccess page
  • Create another function that checks the payment and adds the credits
  • Make sure the credits only get added once, even if someone refreshes the page
Optional follow-up: Add a “Buy 10 Credits” button to my homepage.
Let users purchase a downloadable item and unlock access after payment.
What to type in the chat: Create a one-time Stripe Checkout flow to sell a digital product (like an eBook). Please:
  • Trigger a checkout session from the frontend
  • Set the product name and price in the backend function
  • After successful payment, verify the session and grant the user download access
  • Store a record of the purchase in a collection
  • Make sure to prevent multiple downloads from re-verifying the same session
Let users pay to book a time slot and save the appointment to their account.
What to type in the chat: Create a checkout flow for booking a service (specify your service here). The user should:
  • Choose a service and time slot
  • Go through Stripe Checkout to pay
  • Be redirected to a confirmation page
After payment:
  • Verify the Stripe session and match it to the logged-in user
  • Save the booking details (service, time, user ID) to a Bookings collection
  • Prevent double-booking from repeated confirmation attempts
Let users sign up for a recurring plan and tag them as subscribed.
What to type in the chat: Build a Stripe subscription flow where users can sign up for a recurring plan.Please:
  • Start a Stripe Checkout subscription session from the frontend
  • After the user returns, verify the subscription via session ID
  • Tag the user as “Pro” or update their account type
  • Store the subscription ID so I can manage cancellations or billing updates later
Allow users to cancel their plan and downgrade their access level.
What to type in the chat: Create a cancellation flow for subscriptions.Please:
  • Let users cancel their subscription using the Stripe customer portal or a button in the app
  • After cancellation, detect it using a backend function triggered by the user
  • Remove their “Pro” tag or downgrade their access
  • Optionally, show a message or redirect them to a downgraded page
If a refund is processed, remove credits or block content access.
What to type in the chat: Set up a secure flow to handle Stripe refunds. 
When a refund is detected:
  • Call a backend function from the frontend using a logged-in admin or system user
  • Check if the refunded payment session exists and belongs to a user
  • Revoke access or subtract credits from the user’s account
  • Prevent accidental double-processing using a session log
Make sure the refund trigger comes from a logged-in context and not directly from a webhook.
Optional follow-up: Create a refund management page for admins where I can enter a Stripe session ID and process the refund reversal manually.
Let users buy a ticket for a one-time event and save their registration.
What to type in the chat: I want to sell tickets for an event using Stripe.When someone buys a ticket:
  • Send them to a Stripe Checkout page
  • After payment, redirect them back to the app
  • Confirm the payment using the session ID
  • Save their name and email as an attendee for the event
  • Optionally, show a thank-you page or generate a simple ticket
Let users support your work or project with a one-time or monthly payment.
What to type in the chat: Create a Stripe Checkout flow to accept donations or tips.Please:
  • Let users pick a suggested amount ($5, $10, $25) or enter a custom amount
  • Redirect them to a Stripe payment page
  • After payment, send them to a thank-you page
  • Optionally, save their donation in a Donations collection linked to their account
Optional follow-up: Add a “Support Me” button to my About page.
Let users pay from other countries using local currency or methods. 
What to type in the chat: Set up Stripe Checkout to accept international payments.
Please:
  • Enable payment methods like iDEAL, Bancontact, Apple Pay, and Google Pay
  • Use Stripe’s automatic currency conversion
  • Show prices in USD, but let Stripe handle local pricing at checkout
  • Make sure checkout works for international users
Let users receive a professional invoice and pay later using a Stripe-hosted page.
What to type in the chat: Set up a Stripe invoicing flow.Please:
  • Create a backend function to generate and send an invoice to a user
  • Use the Stripe API to send an email with a secure payment link
  • Let me include a description, amount, and due date
  • After the invoice is paid, update the user’s record in the app
Optional follow-up: Add an “Invoice a Client” button to my admin dashboard.
Let users sell their own products or services and receive direct payouts.
What to type in the chat: Create a basic marketplace using Stripe Connect.Steps:
  • Let users register as sellers and connect their Stripe accounts
  • When a customer makes a purchase, send the payment to the correct seller
  • Optionally take a small fee for the platform
  • Track transactions and show each seller their earnings
Note: Stripe Connect is more advanced and may require additional setup or approval from Stripe.

Why you can’t use Stripe webhooks alone

Stripe does offer a feature called a webhook which is like a little bot that notifies your app when a payment is successful. However, Base44 has some important security rules:
  • Webhook functions can’t update user data directly (like credits, roles, or subscriptions)
  • Even if you use a service key, you may see errors like:
    • 403 Forbidden
    • “You must be logged in to access this app”
This is a guardrail to protect your app. Base44 only allows sensitive updates when they’re triggered by someone who’s logged in.

The right way: Let the user trigger the update

Here’s how to securely update user data after a payment:
  1. The user picks something to buy (credits, product, service, etc.)
  2. Your app calls a backend function to create a Stripe Checkout session — this includes their user ID
  3. The user is sent to Stripe to pay
  4. After payment, they’re redirected back to your app
  5. On the success page, your app uses the Stripe session ID to:
    • Confirm the payment
    • Match the session to the logged-in user
    • Make the update (like adding credits)
This flow works because every step is tied to a real user session — and that’s exactly what Base44 needs to allow the update.

FAQ

You don’t need to have a registered business to test things out. You can use Stripe’s sandbox (test) mode without entering real business details. But to accept real payments, Stripe requires verified business and banking information.
Yes! Stripe offers a sandbox environment where you can simulate transactions using test credit card numbers. No real money moves, and it’s great for checking that everything works.
  • Your API key is in your Stripe dashboard → Developers → API Keys.
  • Your webhook secret is underStripe Workbench → Webhooks , after you set up your endpoint.

    You’ll need both to connect Stripe to your Base44 app.
Nope! Base44 handles the Stripe integration for you. All you need to do is activate backend functions, tell the AI that you want to integrate with Stripe,  paste in your API key and webhook secret, and your app is ready to accept payments.
Yes, once your Stripe account is activated, you can switch from test to live mode at any time. Just make sure to use your live API key and webhook secret when you’re ready to accept real payments.
Once connected, your app can accept:
  • Credit and debit cards
  • Apple Pay and Google Pay
  • Local payment methods (like iDEAL, Bancontact, etc.)
  • Multiple currencies with automatic conversion
All handled by Stripe behind the scenes.
Yes. You can offer subscriptions or memberships in your Base44 app using Stripe. Stripe will automatically handle recurring payments and renewals.
Yes. Once Stripe is connected, your users can update their card details, view invoices, and manage subscriptions through Stripe’s secure billing portal.
If Stripe isn’t working as expected in your app, for example, nothing happens when a user clicks a “Pay” or “Checkout” button, you can view Function Logs in your Base44 Dashboard to find out what’s going wrong. This works for any payment-related feature, whether you’re selling products, accepting bookings, or offering subscriptions. Here’s how to check the logs: 
  1. Open your Dashboard in Base44. 
  2. Go to Code → Functions. 
  3. Find the function related to your payment flow (e.g., createCheckout for a store). 
  4. Click on the function, then scroll to the Logs section.
The Logs will show messages about what happened when the function ran. Look for red error messages — these can help pinpoint what went wrong
Example:
If your app is a store and the createCheckout function fails, the logs might show:
  • “Product not found” → one of the items in the cart is missing or has an incorrect ID
  • “Invalid price” → a product is missing a price or set to 0
  • “Missing success_url” → Stripe doesn’t know where to send users after they pay
  • “API Key invalid” → Stripe isn’t connected properly
Once you find the error message, you can copy it and paste it into the AI chat to ask your Base44 app for help fixing it.