Laravel 12 and 13, PHP 8.2 or later. Built on the PHP library, so everything there applies. Source on GitHub.
To change anything else (base URL, retries, timeout, log channel, webhook path): php artisan vendor:publish --tag=ketapay-config.

Call the API

Type-hint the client anywhere Laravel injects, or use the facade:

Webhooks

The package registers POST /ketapay/webhook. Add https://<your domain>/ketapay/webhook as a webhook endpoint. Every delivery is verified before anything runs, then dispatched as KetaPay\Laravel\Events\WebhookReceived and as ketapay.<type>:
  • Repeat deliveries are acknowledged without dispatching again (event ids kept in your cache for 3 days).
  • Do slow work in a queued listener (ShouldQueue): KetaPay waits 10 seconds.
  • While rotating, list both secrets: KETAPAY_WEBHOOK_SECRET=whsec_new,whsec_old.

Testing

KetaPay\Laravel\Testing\InteractsWithKetaPayWebhooks posts signed webhooks in your feature tests: