engyahmed7 / laravel-plaid
The skeleton application for the Laravel framework.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
pkg:composer/engyahmed7/laravel-plaid
Requires
- php: ^8.2
- laravel/framework: ^12.0
- laravel/tinker: ^2.10.1
- laravel/ui: ^4.6
Requires (Dev)
- fakerphp/faker: ^1.23
- laravel/pail: ^1.2.2
- laravel/pint: ^1.13
- laravel/sail: ^1.41
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- phpunit/phpunit: ^11.5.3
README
A robust and secure integration between Laravel, Plaid API, and Stripe API, enabling users to link bank accounts, process card or ACH payments, and transfer payouts to car owners.
System Flow
1. Card Payments (Pay-In via Stripe)
sequenceDiagram
participant Customer
participant Laravel
participant Stripe
Customer->>Laravel: Provide Card Info
Laravel->>Stripe: Create Payment Method (Card)
Stripe-->>Laravel: Payment Method ID
Laravel->>Stripe: Create Payment Intent
Stripe-->>Laravel: Payment Confirmation
Laravel-->>Customer: Payment Success
Loading
2. Bank Account Pay-In (Plaid + Stripe ACH Debit)
sequenceDiagram
participant User
participant Laravel
participant Plaid
participant Stripe
User->>Laravel: Request Plaid Link Token
Laravel->>Plaid: POST /link/token/create
Plaid-->>Laravel: Link Token
Laravel-->>User: Return Link Token
User->>Plaid: Select Bank & Authenticate
Plaid-->>User: Public Token
User->>Laravel: Send Public Token
Laravel->>Plaid: Exchange Public Token for Access Token & Account Info
Plaid-->>Laravel: Bank Account Details
Laravel->>Stripe: Create Bank Account Payment Method
Stripe-->>Laravel: Payment Method ID
Laravel->>Stripe: Create Payment Intent (ACH Debit)
Loading
3. Merchant Payout to Car Owners (Stripe Payout)
sequenceDiagram
participant Merchant
participant Laravel
participant Stripe
participant CarOwner
Laravel->>Stripe: Create Connected Account for Car Owner
Laravel->>Stripe: Initiate Payout
Stripe-->>CarOwner: Funds Deposited to Bank
Loading
Key Features
-
Plaid Integration for secure bank account linking
-
Stripe Pay-In with:
- Credit/Debit cards
- ACH debits via Plaid-linked bank accounts
-
Stripe Payouts to car owners’ bank accounts
-
Transaction Management Dashboard
-
Secure API-first architecture
-
Responsive UI built with BootstrapCSS
Prerequisites
- PHP 8.1+
- Composer
- Node.js 16+
- MySQL 5.7+
- Plaid API credentials
- Stripe API keys (secret & publishable)
Installation
- Clone the repository:
git clone https://github.com/engyahmed7/laravel-plaid-to-stripe-payments.git
cd laravel-plaid-to-stripe-payments
- Install PHP dependencies:
composer install
- Install JavaScript dependencies:
npm install npm run dev
- Create environment file:
cp .env.example .env
- Generate application key:
php artisan key:generate
- Configure environment variables in
.env:
DB_DATABASE=your_database_name DB_USERNAME=your_db_username DB_PASSWORD=your_db_password PLAID_CLIENT_ID=your_plaid_client_id PLAID_SECRET=your_plaid_secret PLAID_ENV=sandbox # or development/production STRIPE_KEY=your_stripe_publishable_key STRIPE_SECRET=your_stripe_secret_key
- Run migrations:
php artisan migrate
Usage
Card Pay-In
- Create a Stripe customer
- Add a payment method (card)
- Create a payment intent to charge the customer
Bank Account Pay-In via Plaid
- Use Plaid Link to connect a bank account
- Exchange the public token for bank account info
- Create a Stripe payment method of type
us_bank_account - Create a Stripe payment intent to debit the bank account
Payout to Car Owners
- Create a Stripe connected account for the owner
- Initiate payout using
Stripe::payouts->create()
Development Notes
⚠️ This project uses Plaid’s Sandbox Environment and Stripe test mode by default for development and testing.
For production deployment, follow these steps:
- Replace sandbox credentials with production keys
- Set
PLAID_ENV=productionin.env - Complete Plaid's production onboarding process
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add some amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request with a clear description
Learn More
For detailed documentation, visit: