Looking to hire Laravel developers? Try LaraJobs

ecourier-laravel maintained by ecourier

Description
Laravel wrapper for the eCourier PHP SDK.
Last update
2026/07/09 14:55 (dev-main)
License
Links
Downloads
0

Comments
comments powered by Disqus

eCourier Laravel

Laravel wrapper for ecourier/ecourier.

Installation

composer require ecourier/ecourier-laravel
php artisan vendor:publish --tag=ecourier-config

Usage

use Ecourier\EcourierConnector;

$document = app(EcourierConnector::class)->documents()->find('doc_01xyz');

Config

Set your API key in .env:

ECOURIER_API_KEY=pk_test_your_key

Incoming webhooks are registered at /webhooks/ecourier by default and are handled by spatie/laravel-webhook-client.

ECOURIER_WEBHOOK_SECRET=your_webhook_secret
ECOURIER_WEBHOOK_MODEL="App\Models\WebhookCall"

Listen for parsed webhook events:

use Ecourier\Laravel\Events\EcourierWebhookReceived;

Event::listen(EcourierWebhookReceived::class, function (EcourierWebhookReceived $event) {
    $event->webhook; // Ecourier\Data\Webhook\DocumentWebhook
    $event->webhookCall; // Spatie webhook call model
});