Introduction
This guide explains how to connect Stripe to our managed hosting eCommerce Builder store so you can accept payments for digital downloads.
With managed hosting:
-
Your store runs on Djangify’s infrastructure
-
You do not manage servers, Docker, or .env files
-
All Stripe configuration is done through the admin dashboard
-
You are still fully responsible for your own Stripe account and email configuration keys
What you need before you start
You must have:
-
A Stripe account
-
A configured email (see documentation on setting up email)
-
Admin access to your store (/admin)
No server access is required.
How payments work in managed hosting
Quick outline of how it all works:
-
You create products and prices in the eCommerce Builder admin
-
At checkout, the store calculates the total internally
-
Stripe processes the card payment and customer details securely
-
Stripe sends a webhook event to your store
-
The store:
-
Creates the order
-
Unlocks downloads
-
Sends the confirmation email
Stripe does not manage products or prices for your shop.
Stripe settings used by managed hosting stores
Your store requires the following Stripe values:
-
Stripe Publishable Key
-
Stripe Secret Key
-
Stripe Webhook Signing Secret
These are entered via the admin dashboard.
Plus the email configuration added in the same area.
Stripe Test Mode vs Live Mode (must be configured separately)
Stripe has two completely separate environments:
-
Test mode (sandbox – no real money)
-
Live mode (real payments)
Each mode has:
-
its own API keys
-
its own webhook endpoint
-
its own signing secret
You must fully test your store in Test Mode with email configuration in place before switching to Live.
Part A — Set up Stripe in Test Mode
Step 1: Enable Test Mode in Stripe
-
Log in to Stripe: https://dashboard.stripe.com
-
Go to the left hand menu with your business name (drop down) and select Switch To Sandbox (top-right of the dashboard)
-
You will now see test data only
Step 2: Get your Stripe Test API keys
While still in Test Mode:
-
Go to Developers → API keys
-
Copy:
-
Publishable key (pk_test_...)
-
Secret key (sk_test_...)
Step 3: Create the Test webhook endpoint
Your managed hosting shop webhook endpoint is:
https://YOURSTORE.djangify.com/shop/webhook/
(Use your actual store domain.)
In Stripe Dashboard (still in Test mode):
-
While in Test Mode, go to Developers (bottom left-hand side of your screen) → Webhooks
-
Click Add destination
-
Select events:
-
payment_intent.succeeded
-
payment_intent.payment_failed
-
Enter: https://yourdomain.com/shop/webhook
-
Create the endpoint
-
Copy the Signing secret (whsec_...)
Step 4: Enter Test keys in your store dashboard
-
Log in to /admin
-
Go to: Pages → Dashboard Settings
-
Enter:
-
Stripe Publishable Key (pk_test_...)
-
Stripe Secret Key (sk_test_...)
-
Stripe Webhook Signing Secret (whsec_...)
-
Save changes
Changes take effect immediately.
Step 5: Run a full Test Mode checkout
Use Stripe’s standard test card:
Card number: 4242 4242 4242 4242
Expiry date: any future date - e.g. 05/35
CVC: any 3 digits
Postcode: any value
Confirm all of the following:
-
Payment appears in Stripe Test mode
-
Order appears in Admin → Orders
-
Download access is unlocked
-
Stripe → Webhooks shows the event delivered successfully
If Stripe shows a successful payment but no order appears, the webhook configuration is incorrect.
Part B — Switch to Stripe Live Mode
Only proceed once Test Mode works end-to-end.
Step 6: Get your Stripe Live API keys
-
In Stripe Dashboard, toggle to Live mode
-
Go to Developers → API keys
-
Copy:
-
Publishable key (pk_live_...)
-
Secret key (sk_live_...)
Step 7: Create the Live webhook endpoint
Live mode requires a separate webhook.
In Stripe Dashboard (Live mode):
-
Go to Developers → Webhooks
-
Click Add endpoint
-
Select events:
-
payment_intent.succeeded
-
payment_intent.payment_failed
-
Create the endpoint. Endpoint URL: https://YOURSTORE.djangify.com/shop/webhook/
-
Copy the Live signing secret (whsec_...)
Step 8: Replace Test keys with Live keys in the dashboard
-
Log in to /admin
-
Go to: Pages → Dashboard Settings
-
Click the Stripe Live Mode box - blue tick appears.
-
Replace:
-
Test Publishable Key → Live Publishable Key
-
Test Secret Key → Live Secret Key
-
Test Webhook Secret → Live Webhook Secret
-
Save changes
Your store is now live.
Email Configuration
Before a purchase will work you need to set up your Email Configuration next.
Step 9: Verify a real payment
Make a small real purchase and confirm:
-
Payment appears in Stripe Live mode
-
Order is created in admin
-
Downloads unlock correctly
-
Stripe shows a successful webhook delivery
-
Issue a refund to yourself (optional)
Common issues and fixes
Payment succeeds in Stripe but no order is created
-
Webhook URL incorrect (must be /shop/webhook/)
-
Wrong webhook signing secret
-
Webhook created in the wrong Stripe mode (Test vs Live)
Checkout fails immediately
-
Publishable key and secret key don’t match the same mode
-
Old keys still saved in Dashboard Settings
Nothing changes after saving keys
-
Page not refreshed
-
Keys saved in the wrong settings section
Managed Hosting Summary
-
Prices managed inside the store
-
Stripe configured entirely through admin
-
Separate setup required for Test and Live mode
-
Webhook endpoint is always /shop/webhook/
FREE DOWNLOAD: Stripe Managed Hosting (eBuilder) - Includes a checklist for setting up Stripe