Skip to main content

Prerequisites

  • A Stripe account (free to create)
  • Your domain must use HTTPS for webhooks

1. Get your API keys

In the Stripe dashboard:
  1. Go to Developers → API keys
  2. Copy your Publishable key and Secret key
  3. Use test keys during development, live keys in production

2. Configure in StartMyVPN

Navigate to Admin → Settings → Payments → Stripe and enter:
FieldWhere to find it
Publishable KeyStripe → Developers → API keys
Secret KeyStripe → Developers → API keys
Webhook SecretCreated in step 3 below

3. Set up the webhook

Stripe needs to notify StartMyVPN when payments succeed.
  1. In Stripe, go to Developers → Webhooks
  2. Click Add endpoint
  3. Set the endpoint URL to:
    https://yourdomain.com/stripe/webhook
    
  4. Select these events to listen for:
    • payment_intent.succeeded
    • invoice.payment_succeeded
    • customer.subscription.deleted
  5. 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:
ScenarioCard number
Successful payment4242 4242 4242 4242
Declined card4000 0000 0000 0002
3D Secure required4000 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.