PHPackages                             alexvargash/laravel-stripe-plaid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. alexvargash/laravel-stripe-plaid

ActiveLibrary[Payment Processing](/categories/payments)

alexvargash/laravel-stripe-plaid
================================

Simple package for creating a Stripe Bank Account Token from a Plaid token.

1.1.0(5y ago)632.2k4[1 issues](https://github.com/alexvargash/laravel-stripe-plaid/issues)MITPHPCI failing

Since May 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/alexvargash/laravel-stripe-plaid)[ Packagist](https://packagist.org/packages/alexvargash/laravel-stripe-plaid)[ RSS](/packages/alexvargash-laravel-stripe-plaid/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

Laravel Stripe Plaid
====================

[](#laravel-stripe-plaid)

[![Build Status](https://camo.githubusercontent.com/48b67b3883f6f300793097a42433b4f440fd005f8fa036058d4248d040a15aeb/68747470733a2f2f7472617669732d63692e6f72672f616c6578766172676173682f6c61726176656c2d7374726970652d706c6169642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alexvargash/laravel-stripe-plaid)[![StyleCI](https://camo.githubusercontent.com/1b2732f8e081646254cef0573413d7cd62ae2a1d89b362e60f11eeaaacd3ae71/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3138353837383132332f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/185878123)

Simple package for creating a Stripe Bank Account Token from Plaid Link.

Installation
------------

[](#installation)

This package requires Laravel 5.5 or higher.

Require the package using composer:

```
composer require alexvargash/laravel-stripe-plaid
```

The service provider will automatically get registered.

You can publish the configuration file with:

```
php artisan vendor:publish --provider="AlexVargash\LaravelStripePlaid\StripePlaidServiceProvider" --tag="config"
```

When published, the `config/stripe-plaid.php` config file contains:

```
return [

    /*
    |--------------------------------------------------------------------------
    | Environment
    |--------------------------------------------------------------------------
    |
    | The environment on which the API host will be set up, the accepted values
    | are: sandbox, development and production.
    | https://plaid.com/docs/api/#api-host
    |
    */
    'environment' => env('PLAID_ENVIRONMENT', ''),

    /*
    |--------------------------------------------------------------------------
    | Secret
    |--------------------------------------------------------------------------
    |
    | Private API key, here you need to add the respective secret key based on
    | the environment that is set up. This value can be found on your Plaid
    | account under the keys section.
    | https://plaid.com/docs/api/tokens/#token-endpoints
    |
    */
    'secret' => env('PLAID_SECRET', ''),

    /*
    |--------------------------------------------------------------------------
    | Client Id
    |--------------------------------------------------------------------------
    |
    | The client id is an identifier for the Plaid account and can be found
    | on your Plaid account under the keys section. This value is always
    | the same, doesn't change based on environment.
    | https://plaid.com/docs/api/tokens/#token-endpoints
    |
    */
    'client_id' => env('PLAID_CLIENT_ID', ''),

    /*
    |--------------------------------------------------------------------------
    | Client Name
    |--------------------------------------------------------------------------
    |
    | The name of your application, as it should be displayed in Link.
    | https://plaid.com/docs/api/tokens/#token-endpoints
    |
    */
    'client_name' => env('PLAID_CLIENT_NAME', ''),

    /*
    |--------------------------------------------------------------------------
    | Language
    |--------------------------------------------------------------------------
    |
    | The language that Link should be displayed in.
    | When using a Link customization, the language configured here must match the setting
    | in the customization, or the customization will not be applied.
    | Supported languages are: English ('en'), French ('fr'), Spanish ('es'), Dutch ('nl')
    | https://plaid.com/docs/api/tokens/#token-endpoints
    |
    */
    'language' => 'en',

    /*
    |--------------------------------------------------------------------------
    | Country Codes
    |--------------------------------------------------------------------------
    |
    | Specify an array of Plaid-supported country codes using the ISO-3166-1 alpha-2 country code standard.
    | Note that if you initialize with a European country code, your users will see the European consent panel
    | during the Link flow.
    | If Link is launched with multiple country codes, only products that you are enabled for in all countries will be used by Link.
    | Supported country codes are: US, CA, ES, FR, GB, IE, NL. Example value: ['US', 'CA'].
    | https://plaid.com/docs/api/tokens/#token-endpoints
    |
    */
    'country_codes' => ['US'],

    /*
    |--------------------------------------------------------------------------
    | Products
    |--------------------------------------------------------------------------
    |
    | List of Plaid product(s) you wish to use. If launching Link in update mode,
    | should be omitted; required otherwise
    | Supported products are: transactions, auth, identity, assets, investments, liabilities, payment_initiation.
    | Example value: ['auth', 'transactions']
    | https://plaid.com/docs/api/tokens/#token-endpoints
    |
    */
    'products' => ['auth', 'transactions'],

];
```

Usage
-----

[](#usage)

First, add the Plaid keys and environment to the `config/stripe-plaid.php` file or on your `.env`.

```
PLAID_ENVIRONMENT=sandbox
PLAID_SECRET=your_plaid_secret_key
PLAID_CLIENT_ID=your_plaid_client_id
PLAID_CLIENT_NAME=your_app_name
```

Then, you need to create the `link_token` which is required as a parameter when initializing Link. Once Link has been initialized, it returns a `public_token`.

To create the public token use `createLinkToken`, this function needs the `$clientUserId` (you can find more information [here](https://plaid.com/docs/api/tokens/#token-endpoints)), optionally this fuction accepts `$clientName, $products, $language, $countryCodes` if you don't provide these values the values on `config/stripe-plaid.php` config file will be used.

```
use AlexVargash\LaravelStripePlaid\StripePlaid;

$clientUserId = 'client_user_id';

$stripePlaid = new StripePlaid();
$linkToken   = $stripePlaid->createLinkToken($clientUserId);
```

Now you can use the value of `$linkToken` on [Link Web](https://plaid.com/docs/link/link-token-migration-guide/) to get the `public_token` and `account_id` values.

```
use AlexVargash\LaravelStripePlaid\StripePlaid;

$accountId   = 'plaid_link_account_id';
$publicToken = 'plaid_link_public_token';

$stripePlaid = new StripePlaid();
$stripeToken = $stripePlaid->getStripeToken($publicToken, $accountId);
```

After that you can process the payment with the `$stripeToken` as you do with a Stripe Elements token.

The link creation and the exchange can be done with a Facade too.

```
use AlexVargash\LaravelStripePlaid\Facades\StripePlaid;

$clientUserId = 'your_end_user_id';

$linkToken    = StripePlaid::createLinkToken($clientUserId);
```

```
use AlexVargash\LaravelStripePlaid\Facades\StripePlaid;

$accountId   = 'plaid_link_account_id';
$publicToken = 'plaid_link_public_token';

$stripeToken = StripePlaid::getStripeToken($publicToken, $accountId);
```

Alternatively the Plaid keys can be set prior token exchange, this is handy when multiple Plaid accounts are going to be used.

```
use AlexVargash\LaravelStripePlaid\StripePlaid;

$secret      = 'your_plaid_secret_key';
$clientId    = 'your_plaid_client_id';
$environment = 'sandbox';
$accountId   = 'plaid_link_account_id';
$publicToken = 'plaid_link_public_token';

$stripeToken = StripePlaid::make($secret, $clientId, $environment)->getStripeToken($publicToken, $accountId);
```

### Exceptions

[](#exceptions)

When an error occurs a `PlaidException` will be thrown. You can catch the `PlaidException` on the `Exceptions\Handler.php` file:

```
public function render($request, Exception $exception)
{
    if ($exception instanceof \AlexVargash\LaravelStripePlaid\Exceptions\PlaidException) {
        // Manage exception here ...
    }

    return parent::render($request, $exception);
}
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Contributors
------------

[](#contributors)

[![Rogelio Bazan](https://camo.githubusercontent.com/575a07783ceec89e559129d49f13da122d89cf1418d4478000fa1427c73baccc/68747470733a2f2f7062732e7477696d672e636f6d2f70726f66696c655f696d616765732f3935303736373236373033333133333035372f34444e742d6d4f7a5f343030783430302e6a7067)](https://twitter.com/rogeliobazh)

License
-------

[](#license)

[MIT](./LICENSE.md)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~541 days

Total

2

Last Release

2008d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/df52ebf280bf305b370e4421f02014c7e050b1f105fdd2f396924ce029ef4727?d=identicon)[alexvargash](/maintainers/alexvargash)

---

Top Contributors

[![alexvargash](https://avatars.githubusercontent.com/u/40900979?v=4)](https://github.com/alexvargash "alexvargash (5 commits)")

---

Tags

laravelstripeplaidLaravel-Stripestripe plaid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alexvargash-laravel-stripe-plaid/health.svg)

```
[![Health](https://phpackages.com/badges/alexvargash-laravel-stripe-plaid/health.svg)](https://phpackages.com/packages/alexvargash-laravel-stripe-plaid)
```

###  Alternatives

[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[certly/spark

Laravel Spark provides a starter scaffolding for Laravel SaaS applications.

451.6k](/packages/certly-spark)[lunarphp/stripe

Stripe payment driver for Lunar.

2055.8k4](/packages/lunarphp-stripe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
