pkboom/laravel-plaid-webhooks is a Laravel package.
It currently has 0 GitHub stars and 2 downloads on Packagist.
Install it with composer require pkboom/laravel-plaid-webhooks.
Discover more Laravel packages by pkboom
or browse all Laravel packages to compare alternatives.
Last updated
Before using this package we highly recommend reading the entire documentation on webhooks over at Plaid.
You can install the package via composer:
composer require pkboom/laravel-plaid-webhooks
The service provider will automatically register itself.
You must publish the config file with:
php artisan vendor:publish --tag="plaid-config"
This is the contents of the config file that will be published at config/stripe-webhooks.php:
return [
/*
* You can define the job that should be run when a certain webhook hits your application here.
*
* You can find a list of Plaid webhook types here:
* https://plaid.com/docs/#auth-webhooks
*/
'jobs' => [
// 'AUTH' => \App\Jobs\PlaidWebhookCall\AUTH::class,
],
/*
* The classname of the model to be used. The class should equal or extend
* Pkboom\PlaidWebhooks\PlaidWebhookCall.
*/
'model' => Pkboom\PlaidWebhooks\PlaidWebhookCall::class,
];
Next, you must create the plaid_webhook_calls table:
php artisan vendor:publish --tag="plaid-migration"
php artisan migrate
Finally, take care of the routing: you must set up Plaid webhooks when you create an item. In the routes file of your app you must pass that route to Route::plaidWebhooks:
Route::plaidWebhooks('webhook-url');
Behind the scenes this will register a POST route to a controller provided by this package. Because Plaid has no way of getting a csrf-token, you must add that route to the except array of the VerifyCsrfToken middleware:
protected $except = [
'webhook-url',
];
For usage, refer to spatie/laravel-stripe-webhooks.
composer test
The MIT License (MIT). Please see MIT license for more information.