Ana Sayfa / Kod ve Scriptler / Stripe Connect Express Accounts using PHP API

Stripe Connect Express Accounts using PHP API

Stripe Connect (Express hesaplarla) ve PHP API kullanarak pazarınızı oluşturun

  • Yayın tarihi21 Temmuz 2022
  • Nerede çalışırPHP 7.0, PHP 7.1, PHP 7.2, PHP 7.3, PHP 7.4, PHP 8.0, PHP 8.1, PHP 8.2, PHP 8.3, PHP 8.4, PHP 5.x, PHP 5.0, PHP 5.1, PHP 5.2, PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6
  • VeritabanıMySQL 4.x, MySQL 5.x
  • Paket içeriği.php, .css, .html, .sql, JavaScript .js
  • Son güncelleme4 Mayıs 2026
Stripe Connect Express Accounts using PHP API

Overview

Build and start your own marketplace by integrating the Stripe Connect API using PHP to process the payments between your Platform, Connected Accounts and Customers.

This script is a working example of a typical integration of the Stripe Connect API using PHP. Its code has been written to be easily modified to fit your very own needs so you can integrate Stripe Connect to your website using Stripe "Express Accounts".

Please take enough time to understand the differences between Stripe "Custom" and "Express" Accounts on Stripe's website before buying this script! The main difference you want to consider is how it affects the onboarding process, which is the process during which your users will fill in the required legal information that will be sent and validated by Stripe, before they can start selling their services/products on your website.

- using "Custom" Accounts: your users will have a full white-label experience, they won't even notice that Stripe is being used when they interact with your website as the onboarding process will all be done on your website. Though my "Custom Accounts" script includes this process, this requires more effort to integrate and maintain, as the regulations change from time to time and you will need to keep an eye on these changes and go back to your code to take these changes into consideration. - using "Express" Accounts: your users will be redirected from your website to Stripe's website to complete the onboarding process, and will be redirected back to your website once the process is complete. So the onboarding process isn't "white-label", your sellers/shops will clearly see that they are on Stripe's website at some point. This requires less effort to integrate and should be preferred if you are not sure of having all the ressources needed to integrate and maintain all the Stripe Connect integration part on your website. The experience of your end Customers (those paying for products or services on your Platform) won't be different, and the integration on your backoffice side shouldn't be too different either.

Please keep in mind that this script is meant to be integrated to your own website and adapted to your own needs, and isn't some kind of plugin that you configure in a few clics and use without looking at what's under the hood - you need to be a PHP developper to integrate it. The code is written in the simplest possible way for you to quickly understand how it works, with as much comments as I could think of to help you understand what each line does, including the corresponding links to the documentation for each Stripe API function use. The design of the script doesn't matter as it's meant to be integrated on your own website using your own branding and CSS framework, I used Bootstrap so it'd look decent without adding too much code just for the UI. The Stripe Connect API version is the latest to date and the script uses PHP, jQuery, Bootstrap and MySQL (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 included in a “Read me.txt” 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 onboarding process/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. Once the onboarding process is completed, your Connected Accounts will be ready to start making business on your platform.

• 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 details of the payment via the included Webhook script so you can record the payment, send an email to the Connected Account(s), Customer and the Platform when a payment has been made 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 Connected Accounts to the Customers.

• Listing: A sort of dashboard/back office base, retrieving (using the Stripe Connect API) and listing most of the information you might want to display on your Platform, 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 (ex

Features

  • Script written in vanilla PHP (no framework)
  • The code is well documented with a lot of comments and clean variable names
  • The code is clean and consistent, each step of the integration is in separated files to keep things very clear
  • "Read me" file with additional tips on how to use and integrate Stripe Connect and its API that will save you some time reading their documentation

Requirements

  • A server running PHP and MySQL (it has to be accessible from the outside, if you want to receive the webhook information, be aware of that if you code on a local server)
  • You've got to be a PHP developper, of course, who has ideally already worked with APIs...