Custom Gateways
Subscribd’s gateway system is driver-based. If none of the built-in gateways fit your needs, implement theGateway contract and register your driver in config.
Implement the Gateway contract
DefaultGatewayCapabilities concern provides no-op implementations for optional capability methods. Use it as a starting point:
Register your gateway
Add it toconfig/subscribd.php:
config('subscribd.gateways.my_gateway').
Set as the default
Handling webhooks
Register a webhook controller and route it through Subscribd’s webhook pipeline by creating an event handler for your gateway’s events:handleWebhook(Request $request): Response on your gateway class to process incoming webhook payloads and dispatch the appropriate Subscribd events (SubscriptionCreated, SubscriptionUpdated, etc.).
Next steps
- Hooks and Events — Events your gateway should dispatch
- Testing — Test your gateway with FakeGateway patterns