Stripe

Card payments, Stripe Checkout

What it is

Stripe gateway processes card payments via Stripe Checkout (hosted payment page) or Stripe Payment Intents (embedded). Stripe handles PCI compliance; card data never touches your server.

How it works

When a client pays an invoice, WHMDC calls the Stripe module's process action. The module creates a Stripe Checkout Session (or Payment Intent) and returns a redirect_url or client_secret. After payment, Stripe sends a webhook to your server; the module verifies the signature and marks the invoice as paid.

Webhook endpoint: https://yourdomain.com/webhooks/stripe

Key event: checkout.session.completed

How to set up

  1. Go to Admin → Settings → Payment Gateways (/admin/settings/payment-gateways).
  2. Enable the Stripe module.
  3. Enter your Publishable Key and Secret Key from the Stripe Dashboard.
  4. In Stripe Dashboard → Developers → Webhooks, click Add endpoint.
  5. Set URL to https://yourdomain.com/webhooks/stripe (replace with your actual domain).
  6. Select event checkout.session.completed.
  7. Copy the Signing secret (starts with whsec_) and paste it into the Stripe module's Webhook Secret field
  8. Save the gateway configuration.

Testing

Use Stripe test keys (prefix pk_test_ and sk_test_) and test card 4242 4242 4242 4242. For webhooks in development, use Stripe CLI or ngrok to forward to your local server.

Was this helpful?