Skip to main content

Stripe Integration

There are two ways to take payments with Stripe in EZsite:

  • With your Stripe API key (recommended): EZsite connects to your Stripe account, sets up the webhook, and creates the product and order tables for you.
  • With a Stripe Payment Link (no API key): paste a Payment Link into a prompt. See Stripe Payments without API Key.

Connect Stripe with your API key​

1. Prepare your project​

Your app needs a database and sign-in / sign-up. If you haven't set them up yet, enable the database (see Enhance Your Project with Full-Stack Capabilities) and ask the AI:

add signin signup

2. Copy your Stripe secret key​

  1. Log in to your Stripe Dashboard.
  2. Go to Developers → API keys and copy the Secret key.
    • For testing, copy the test secret key (starts with sk_test_).
    • For real payments, copy the live secret key (starts with sk_live_).

Don't paste your secret key into the AI chat. Save it in the Payment settings as shown below.

3. Save the key in EZsite​

  1. Open your project and go to Project Settings → Payment.
  2. Choose the Payment Mode: One-time Payment or Subscription Payment. You can't change the Payment Mode after a key has been saved, so choose carefully.
  3. Under Payment Platform, choose Stripe.
  4. Paste your Stripe secret key and click Save.

EZsite then sets up the Stripe webhook and creates the product and order tables in your project automatically.

4. Ask the AI to add checkout​

Now ask the AI to build the payment flow, for example:

Create a product listing page and a checkout flow that uses Stripe to pay for the selected product.

For step-by-step examples, see:

5. Test, then go live​

  1. While you use the test secret key, pay with Stripe's test card:
    • Card number: 4242 4242 4242 4242
    • Any future expiration date
    • Any 3-digit CVC
  2. When everything works, replace the test key with your live secret key and publish your site.

PayPal​

To take payments with PayPal instead, go to Project Settings → Payment, choose PayPal under Payment Platform, enter your PayPal client ID and secret, and click Save.