Prerequisites
- A Stripe account (free to create)
- Your domain must use HTTPS for webhooks
1. Get your API keys
In the Stripe dashboard:
- Go to Developers → API keys
- Copy your Publishable key and Secret key
- Use test keys during development, live keys in production
Navigate to Admin → Settings → Payments → Stripe and enter:
| Field | Where to find it |
|---|
| Publishable Key | Stripe → Developers → API keys |
| Secret Key | Stripe → Developers → API keys |
| Webhook Secret | Created in step 3 below |
3. Set up the webhook
Stripe needs to notify StartMyVPN when payments succeed.
- In Stripe, go to Developers → Webhooks
- Click Add endpoint
- Set the endpoint URL to:
https://yourdomain.com/stripe/webhook
- Select these events to listen for:
payment_intent.succeeded
invoice.payment_succeeded
customer.subscription.deleted
- Copy the Signing secret and paste it into the Webhook Secret field in StartMyVPN
4. Test the integration
In test mode, use Stripe’s test card numbers:
| Scenario | Card number |
|---|
| Successful payment | 4242 4242 4242 4242 |
| Declined card | 4000 0000 0000 0002 |
| 3D Secure required | 4000 0025 0000 3155 |
Use any future expiry date, any 3-digit CVV, and any ZIP code.
Subscription vs. one-time payments
StartMyVPN supports both:
- One-time invoice payments — customer pays each billing cycle manually
- Stripe recurring subscriptions — Stripe charges the customer automatically at renewal
Whether a plan uses recurring billing depends on the plan configuration in Admin → Plans.
Never expose your Stripe Secret Key in client-side code or public repositories. It is stored encrypted in the database.