Dokan Stripe Connect – Multi Payment Methods
This plugin enhances Dokan's Stripe payment integration with Stripe Payment Element, allowing buyers to use
by Mathes IT-Consulting · github.com/shaheen2013/dokan-stripe-multiplay · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/shaheen2013/dokan-stripe-multiplay/archive/refs/heads/main.zipDeclares an update source (https://mathesconsulting.de), so updates arrive through the plugin's own updater.
Readme
Dokan Stripe – Multi Payment Methods
Overview
This plugin enhances Dokan's Stripe payment integration with Stripe Payment Element, allowing buyers to use:
- Credit & Debit Cards
- Klarna
- SEPA Debit
- PayPal (via Stripe)
- Apple Pay
- Google Pay
- TWINT (CHF)
It reuses Dokan Stripe credentials and vendor commission logic but provides a rich, multi-method checkout experience via the Payment Element.
This version is fully refactored using SOLID principles with a feature-based structure under src/ and a PSR-4 style autoloader.
Compatibility
Supports both Dokan Stripe Express (recommended, newer) and Dokan Stripe Connect (older) modules. Credentials are automatically fetched from whichever module is installed and configured (Express has priority).
No Dokan core files are modified.
Key design choices:
- Feature modules (Payments, Webhooks, Admin, Settings) keep concerns separate.
- Services handle business logic; controllers register hooks and validate requests.
- Bootstrapping is centralized in
src/Bootstrap/Plugin.php. - Autoloading is PSR-4 style from
src/.
Key Features
- Uses Stripe Payment Intents + Payment Element
- Supports async payment methods (Klarna, SEPA, PayPal redirects)
- Compatible with Dokan Pro vendor payouts via automatic transfers
- Multi-vendor cart support
- Per-site currency support (EUR / CHF / others)
- Works with both Dokan Stripe modules
- Upgrade-safe (no core overrides)
Requirements
- WordPress 6.x+
- WooCommerce 7.x+
- Dokan Pro (latest) with either:
- Dokan Stripe Express module (recommended), or
- Dokan Stripe Connect module (legacy)
- PHP 7.4+
- Stripe PHP SDK (
stripe/stripe-php)
Installation
- Upload the plugin ZIP via Plugins → Add New
- Activate Dokan Stripe – Multi Payment Methods
- Ensure Dokan Stripe Express or Dokan Stripe Connect module is installed and activated in Dokan
- Ensure at least one vendor has completed Stripe onboarding
Stripe Configuration
In your Stripe Dashboard:
- Enable Payment Element
- Enable required payment methods per country:
- DE / FR: Cards, Klarna, SEPA, PayPal, Apple Pay, Google Pay
- CH: Cards, TWINT, PayPal, Apple Pay, Google Pay
- Add webhook endpoints in Stripe → Developers → Webhooks.
Per-Site Payment Methods (Configuration ID)
To show different payment methods for different sites (e.g. TWINT only for Switzerland, Klarna for Germany):
- Go to Stripe Dashboard → Settings → Payment methods.
- Scroll to "Payment method configurations" and create a new configuration (e.g. "German Market").
- Assign it to your connected accounts if necessary, or just the platform.
- Copy the Configuration ID (starts with
pmc_...). - Go to your WordPress Admin → settings → Stripe Multi-Pay.
- Paste the ID into the Payment Method Configuration ID field.
Dokan Module Configuration
Configure credentials in your preferred Dokan Stripe module:
Dokan Stripe Express (Recommended)
- WooCommerce Settings → Payments → Dokan Stripe Express
- Configure test/live API keys:
sandbox_publishable_key,sandbox_secret_key,publishable_key,secret_key - Enable sandbox mode if testing
Dokan Stripe Connect (Legacy)
- WooCommerce Settings → Payments → Dokan Stripe Connect
- Configure test/live API keys:
test_publishable_key,test_secret_key,publishable_key,secret_key - Enable test mode if testing
For webhook secrets, configure them in this plugin's gateway settings per mode (test/live).
How It Works (Technical Summary)
- Checkout renders Stripe Payment Element.
- Plugin creates/updates a platform-level PaymentIntent.
- Buyer completes payment using selected method.
- Stripe webhook confirms payment.
- WooCommerce order is marked paid.
- Vendor payouts are created via Stripe Transfers (per vendor order).
Internally, the Payment Intent flow is handled by PaymentIntentController and PaymentIntentService, while transfer and reversal logic live in dedicated services under src/Payments and src/Webhooks.
Refunds trigger transfer reversals. Disputes move orders to on-hold until closed.
Vendor Payouts and Commission
- Vendor earnings are calculated using Dokan commission APIs.
- Transfers are created for each vendor order and grouped by parent order.
- If a vendor has no Stripe account, a note is added and payout is skipped.
- Optional: seller can pay Stripe processing fee (fee is prorated across transfers).
Order Status Logic
| Payment Method | Initial Status | Final Status |
|---|---|---|
| Cards (includes Apple Pay & Google Pay) | Processing | Completed |
| PayPal | Processing | Completed |
| Klarna | On-hold | Completed |
| SEPA | On-hold | Completed |
| TWINT | Processing | Completed |
Note: Apple Pay and Google Pay are processed as tokenized card payments and follow the card payment flow.
Webhooks are the source of truth.
Testing Checklist
See docs/testing-checklist.md.
Known Limitations
- Requires Stripe PHP SDK to be available
- Async payments depend on webhook delivery
- Saved cards are only enabled when buyers opt in at checkout
Maintenance & Updates
- No Dokan core overrides
- No WooCommerce template overrides
- Safe to update Dokan / WooCommerce
- Stripe Payment Element is future-proof
- SOLID, service-based architecture keeps future changes isolated
Support Notes
This plugin is intended for advanced Stripe Connect marketplaces.
Any customization should follow Stripe Payment Intent best practices.
License
Proprietary / Custom Development