/
WebsiteSupport

DocsDeveloper guideBuild an add-on

Payment, shipping and SMS drivers

A provider add-on registers a driver class. The shared Integrations screen then shows its settings, test button and webhook address.

1 min read

  1. Extend App\Support\Integrations\IntegrationDriver. Implement key(), kind(), label(), credentialFields() and testConnection() (app/Support/Integrations/IntegrationDriver.php:24-45).
  2. Register it from a boot hook: IntegrationRegistry::register(KEY, Driver::class) (app/Support/Integrations/IntegrationRegistry.php:77). Stripe does this in app/Addons/Stripe/StripeAddon.php:15, with 'hooks' => ['boot' => [...]] in its manifest, as Paystack does at app/Addons/Paystack/addon.php:19.
  3. To receive notifications, override receivesWebhooks(), verifyWebhook(), webhookEvent() and handleWebhook() (app/Support/Integrations/IntegrationDriver.php:121-171). See Webhooks.

See also