To add the Stripe payment gateway with your eCommerce marketplace, follow this documentation. It will help you to install, activate and configure the Stripe Connect module to your online marketplace.
Navigate to your WP dashboard->Dokan->Modules. Find Stripe Connect and turn on the toggle button on the top right to activate this module.
Enabling Stripe Connect
To enable this payment gateway, navigate to WP Dashboard → WooCommerce → Settings→ Payments
Toggle On the ‘Dokan Stripe Connect’ section to enable it. Then click on ‘Manage’ to get to the option for Dokan Stripe payments as shown below.
Check the “Enable Stripe” option and enter Title and Description. The plugin already has default text included, you can change it if required.
In the screenshot, we have enabled the test mode to test the payment system. For live transaction, you don’t have to check this box.
You can enable the Stripe Checkout option. This will show a pay button and modal credit card from the checkout page. This also enables a popup that will open and will ask for credentials to pay. You can either turn this on or off. It is totally optional.
To get the redirect URL, copy the line from “
Set your authorized redirect URL https://dokandokani.test/dashboard/settings/payment/ in your Stripe application settings for Redirects.”
Now copy the URL and paste it into the Redirect URL field at your stripe account.
Note: In case you want to enable the vendor to collect order & payment from non-connected sellers, you simply need to check the ‘Non-connected seller’ section shown in the screenshot above.
The Saved cards option allows users to pay with their saved cards during the checkout process. Stripe serve saves the card details (not on your stores) and this ensure security.
Credentials to Setup Stripe on Your Marketplace
The Stripe Settings has Live Credentials and Test Credentials configuration.
Here, you have to enter the secret key and publishable key in case of live transactions. You can also test the payment system using the test credentials.
All you have do is to enter the Secret Key, Publishable Key and Client ID from Stripe and Save changes.
How to Get the Credentials
Sign up or Log in
At first, you have to visit stripe.com and sign up. Follow their verification process. If you already have a Stripe Account, just sign in.
Generate (Test and Live) API Keys
You will find your dashboard after log-in. Now click on the API option from the left menu under Developers settings.
You will find the Secret and Publishable Keys for both Test and Live. Copy and paste the keys to the WooCommerce Settings. If you are testing, use the Test credentials.
For live transactions, use the live credentials. Simply untoggle the “View test data” button to get the live publishable & secret key as shown below.
You need to enable oAuth, otherwise your sellers won’t be able to connect their stripe account.
Adding Webhook with Endpoint
In order to get recurring subcription you need to confgure the webhook of your WooCommerse site.
Simply click on the hyperlinked webhook option to redirect yourself to the webhook settings of stripe account.
Now in the webhook page of developer settings click on +Add Endpoints to input the webhook URL.
A new page to feed the webhook URL would appear after clicking on +Add endpoint. Now simply copy paste the webhook URL collected from the WooCommerce stripe connect settings to add an endpoints to receive events from your account.
You can select multiple events like Order, Customer, Payment Intent, Plan, Charge invoice for Dokan or you can simply select ‘receive all events’ to send all events to your account.
After adding the webhook URL selecting your desired events the URL will be live & it will be all set to connect with your marketplace account.
Connect Your Marketplace and Get the Client ID
Now, you have already entered the API Keys and the only thing required is the Client ID for live transaction or Test Client ID for Testing.
Click on settings from the left Menu. Now, click on the Connect Settings.
Once you enter the Connect settings, input the following details-
- Redirect URL
- Business or Marketplace Name
- Website URL
- Brand Color, Logo and Icon (if any)
Finally, copy the Client ID under the Development section. This is the credential you have to put under the Client ID in Dokan Stripe Connect Settings. Here is a demonstration of the whole process.
Add redirect URL pressing on +Add URL from top right corner.
After adding the redirect URL, enter your business details and website URL.
Activating Stripe for Vendors
You have got the credentials and entered them on the Dokan Stripe Connect Settings page. Now, save changes.
Navigate to- WP Dashboard → Dokan → Settings → Withdraw Options → Withdraw Methods
Check the Stripe box and Save changes.
Settings for Your Vendors
As you have installed a new payment gateway, your vendors should connect their stores to the Stripe Connect as well.
Navigate to – Dokan Vendor Dashboard → Settings → Payment
You will see a new option titled Dokan Stripe and asking to Connect with Strip.
Click on the blue colored button and you will be redirected to Stripe.com website.
(Vendor) Stripe Login or Signup
Login with your stripe account or sign up if you don’t have one.
After logging in, you will see the Marketplace is trying to connect to your Stripe account.
Click on the Connect my Stripe account button.
After confirmation, you will be redirected to your store Payment Settings page.
The Dokan Stripe Connect Option will state that it has been connected with Stripe. And you are done with setting up Dokan Stripe Connect to your store.
There is a disconnect button, which can be used to disconnect your account from this marketplace any time you want.
How Customers Pay with Dokan Stripe
When a customer adds a product to their cart and check in, they will see all the available payment methods. If they select Dokan Credit Card (Stripe), a modal form will appear.
The form will ask for email, credit card number, expiry date, CVC. After entering the credentials, click on the Pay button.
After payment, the order details will show the payment method as Dokan Credit Card (Stripe).
Stripe Connect Announcement
Dokan will show an announcement if the vendor has not connected his/her stripe account to their stores.
The admin needs to enable this feature fromin the settings option in order to use this feature. to be able to show this announcement.
To enable this feature the admin needs to check the Display Notice to Connect Seller checkbox. This option is available in the WordPress Admin Dashboard → WooCommerce → Settings → Payment Gateway –> Dokan Stripe Connect settings.
Also, the admin can choose the interval period that the announcement will show up. Just choose the number of days in the Display Notice Interval option, default is 7 days. The announcement will look like this,
It will appear in the vendor dashboard in the announcement section.
If admin enable this feature, the vendors will receive notifications for,
- If the Dokan Stripe Connect module is enabled and the vendor is not connected to their stripe account.
- If vendors Stripe connect access tokens get expired (due to Stripe restriction and or verification), their Stripe account will be disconnected automatically with an announcement notice explaining the reason.
- If there is something wrong with the stripe id
- In 3DS mode, if vendor stripe currency is not similar to site currency (if vendor’s Stripe currency is different from site/admin stripe account currency, transfer to vendor Stripe account will be failed.)
Dokan Version 2.9.12 Update
The Stripe 3D Secure & Strong Customer Authentication System
With the release of Dokan Pro v2.9.12, you will be able to let the vendors use the stripe 3D secure and strong customer authentication in the checkout process. Here is how the customers will be able to buy using the Stripe 3D Secure:
To allow the customers to use this 3D secured feature, the vendor must have the Stripe 3D secure and strong customer authentication system. Here are a few things to look at:
1. The admin must enable the 3D Secure and Strong Customer Authentication
2. 3D Secure and SCA ready transaction is only supported when both your platform and the connected account (Vendor) are in the same region: both in Europe or both in the U.S.
How will the Admin set the stripe 3D secure & strong customer authentication?
As an admin, navigate to the WP Admin Dashboard > WooCommerce > Settings > Payments > Dokan Stripe Connect (Click on the ‘Manage’ button). After that, you will get the following screen:
Now, check the box beside the 3D Secure and SCA field to activate this secure payment method for your vendors and customers as shown above.
How will customers pay with the 3D secure system?
Supposing that the admin and the vendor both have enabled this feature. Now the customer will follow the normal purchase process:
Step 1: Add to Cart
Step 2: View Cart
Step 3: Proceed to Checkout
Step 4: Place Order
Step 5: 3D Secure Test Payment Page
This is it! In this very step, the 3D secure payment feature that we are talking about will appear. When the customer is paying he or she will be asked to verify their identity with a push notification and a text message in this step. Next, the customer has to hit the “COMPLETE AUTHENTICATION” button to proceed.
Note: If somehow the pop-up doesn’t appear then you should take a look at this.
Table https://stripe.com/docs/testing#three-ds-cards. You’ll find some cards with Supported 3D usage. By default, using this type of card in both test and live modes, you’ll not have the authentication step during 3D checkout. You need to activate the Radar rules for this from your Stripe Dashboard.
Step 6: Order Received
Finally, the order will be received by the admin as usual.
Automatic Refund for Stripe 3DS Mode
From now on, the Stripe 3DS mode will support the automatic refund.
As we know, In Stripe 3DS mode, Admin is responsible for the customer payment, hence if a customer asks for a refund, this will be processed from admin Stripe account.
Refunds will be processed in two steps. Firstly refund will be processed from the admin Stripe account. Secondly, the amount that was passed to the vendor for the corresponding order, will automatically be reversed to the admin Stripe account.
For example, a customer has bought two products ($50+$40)= total $90 from a vendor. So, when the customer completes the payment, that $90 will be added to the admin’s stripe account.
Now, suppose admin commision is set to fixed $6, So after subtracting the admin’s commission ($6) and Stripe processing fee (gateway fee, in settings Gateway fee will be paid by vendors was selected) ($3), $81 will be transferred to the vendor connected Stripe account.
Now, when the customer asks for a refund, initially the amount ($90) will be refunded from the admin’s Stripe account.
Then the amount transferred to the vendor’s Stripe account,
In our case $81, will be automatically reversed from the vendor’s Stripe Account. It will named withdrawal.
If there are not enough funds available in the admin’s account then the automatic refund will be failed and an order note will be added explaining the reason for the failed refund and admin need to process this refund manually As usual, there will be a new record under Dokan → Refund with requested refund details.
And in case of insufficient funds in the account of the vendor(s), the refund will be processed from the admin Stripe account. A new order note will be added stating that the transfer reversed wasn’t successful explaining the failed reason. Also, that amount will stay as a negative amount in the vendor’s balance.
Description & Metadata
In 3DS mode, We have added description and metadata to each transfer made to the vendors so that the vendors and admins can easily track the orders made on their stripe account.
If you click on a order,
You will find all the order details there.
In case of vendor, he/she can search for the same order in their stripe account using the Order ID or Order Number.
They will see the same details,