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
- Go to Admin → Settings → Payment Gateways (
/admin/settings/payment-gateways). - Enable the Stripe module.
- Enter your Publishable Key and Secret Key from the Stripe Dashboard.
- In Stripe Dashboard → Developers → Webhooks, click Add endpoint.
- Set URL to
https://yourdomain.com/webhooks/stripe(replace with your actual domain). - Select event
checkout.session.completed. - Copy the Signing secret (starts with
whsec_) and paste it into the Stripe module's Webhook Secret field - 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?