Description
Build and start your own marketplace by using the Stripe Connect API with PHP to process the payments between your platform, Connected accounts and Customers!
This script has been written to be easily modified to fit your very own needs so you can integrate Stripe Connect to your website in a white-label way (your users stay on your website and won’t have to leave on Stripe’s website to register, pay, etc). The code is written in the simplest possible way for you to understand how it works quickly, it’s also fully commented with every Stripe API function use having a link to its API documentation and other useful links when needed. Even if the design of the script doesn’t really matter here, you’ll be happy to know that it’s also responsive. The Stripe Connect API version is the latest to date and the script uses PHP 7, jQuery, Bootstrap 4 and MySQL 5. Please note that a MySQL database will be needed to run the script, using just one single table (simple, told you!).
All the instructions to install the script are in a “Read me” file, it will take just a few minutes for you to set it up and start testing it.
Once installed, you will get a welcome page with the links to five steps covering for your integration. The code for these steps is separated into 5 respective folders to keep things as clear as possible for you. The 5 steps are:
• Create an account: Full creation of Custom Connected accounts (the sellers/shops on your platform) with all of their details required by Stripe and the regulations of their own countries, as well as their bank accounts so they can receive the payouts from their sales on your platform. In the end of the onboarding process, your Connected accounts will be ready to start making business on your website.
• Create a customer: Creation of a customer (the buyers of products/services on your platform) with the needed details.
• Payment process: Create a payment intent using the best practices Stripe Connect requires, working both with “one-to-one” (one payment to one single account) and “one-to-many” (one payment to several accounts) methods. Then you can pay using a payment card and get the results of the payment via the included Webhook script so you can record the payment, send an email to the account(s), customer and the platform when a payment has been passed etc. The payment process supports Visa/Mastercard/American Express cards, covers the 3D Secure payments (which is a requirement in the European Union) and detects fake cards, insuffisant provisions, expired cards, …
• Refund process: Select a payment and do partial or full refunds from your accounts to the customers.
• Listing: A sort of dashboard/back office base, listing most of the information you might want to display on your platform that are retrieved from Stripe, including:
– List of all your Connected accounts
– Account page with their details (information, missing information, balance, bank accounts, payments, transfers, payouts)
– List of all your customers
– Customer page with their details (information, cards, bank accounts, payment intents, charges)
– Platform activity (list all the events involving the Stripe API on your platform)
– Platform balance (available/reserved/pending balance in all currencies, list of all the transactions on your platform)
– Platform earnings (explaining how to record and display those, as the Stripe API doesn’t allow to get them)
Just so you can quickly try the script, most of the inputs are pre-filled so you don’t have to fill them all when creating a test customer, for instance.
Be aware that the Stripe Connect API can take quite some time to fully understand, so don’t expect to integrate this script in two days and be all ready! This is not a WordPress plugin so be sure to have some time to run tests, read the code, modify it and learn from your mistakes when integrating the Stripe Connect API and/with this script. Also, this script is meant to cover the most important needs a marketplace might have in general, but obviously cannot cover the very needs of your platform, so you will indeed have to spend time adapting it, adding or removing certain functionalities etc. See it as a solid structure for your house, the walls, electricity and plumbing is done and you still need to paint the walls with the colors you like, so don’t expect to move in in two hours after your purchase!
As I was working on creating this script, I thought it’d be useful to share a bunch of advices and useful information, which I included in a “Read me” file and in the code comments to save you some time understanding the script and how Stripe Connect and its API work, as well as where to find more information on specific points of your integration. As specified in this file, I had to create this integration for a web project and as it took a lot of time to figure out everything and code everything in a right way (dealing with errors, making the whole thing user-friendly with some JavaScript/Ajax here and there, …), I thought it could be great to help other developers to save some time too, or in other words, to create the script that I would have loved to buy if it was available somewhere before I started this, so I could have saved a lot of time myself. Now this script exists, and I am a hundred per cent confident that you will save many many hours with this script if you need to integrate the Stripe Connect API to your website!
Please note that I am not a Stripe developper and am not affiliated to Stripe in any way, so I won’t answer any question on how Stripe and its API work! I do mention the best ways to get their help if you need (they are pretty reactive in my experience), it’s all in the “Read me” file.
I will maintain this script up to date when the Stripe API is updated and changes are needed in the code though, and will try my best to be reactive and do the needed corrections if someone reports a bug or security issue in the script. Everything works perfectly as far as I know, and as the Stripe API version used is set in the script, even if Stripe updates their API, there shouldn’t be any problem using this script for a good while… I’ve seen a comment from someone using a version of the script from 2014 and their script was still working perfectly in 2020. Of course, regulations can change, so mostly if your platform is based and/or make some business in the European Union, you will need to keep an eye on the changes required from time to time.
There are no reviews yet.