Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Whop Symfony Bundle

Whop Symfony Bundle Laravel Package

devmatchable/whop-symfony-bundle

Symfony 7 bundle for the Whop PHP SDK. Autowires WhopApiClient and WebhookVerifier from config, provides a ready-to-use (overridable) webhook controller/route, and supports sandbox base URL and custom HTTP client selection.

View on GitHub
Deep Wiki
Context7

Symfony bundle for the Whop PHP SDK — autowired client, webhook verification, and an overridable webhook controller.

Frequently asked questions about Whop Symfony Bundle
Can I use this bundle in a Laravel project even though it's a Symfony package?
No, this bundle is specifically designed for Symfony 7 and won’t work natively in Laravel. However, you could extract its core logic (e.g., the Whop API client or webhook verifier) and adapt it for Laravel. The underlying `devmatchable/whop-php-sdk` might be more directly usable in Laravel if you avoid the Symfony-specific dependencies.
What Laravel alternatives exist for Whop API/webhook integration?
For Laravel, consider packages like `spatie/laravel-webhook-client` for generic webhook handling or custom implementations using Guzzle for API calls. Whop’s official PHP SDK (if available) could also be adapted. This bundle’s Symfony-specific features (e.g., autowiring, event listeners) won’t translate directly, but its core SDK functionality might.
How do I configure the bundle for sandbox mode in development?
Set the `base_url` to `https://sandbox-api.whop.com/api/v1` in your `whop.yaml` config and ensure your `webhook_secret` starts with `ws_` (sandbox format). The bundle automatically handles sandbox vs. production via the `base_url` and secret format, so no additional code changes are needed.
Is there a way to customize the webhook verification logic beyond the default signature check?
Yes, the bundle provides an overridable `WhopWebhookController` via dependency injection. You can extend or replace this controller in your Symfony services.yaml to implement custom validation (e.g., payload schema checks) while keeping the autowired `WebhookVerifier` for signature validation.
What happens if I override the webhook controller but forget to call the parent’s verify method?
If you override the controller but skip the parent’s `verify()` call, the webhook signature won’t be validated, exposing your endpoint to spoofing. The bundle’s default controller includes this check, so ensure your custom logic either delegates to the parent or reimplements the verification logic using the `WebhookVerifier` service.
Does the bundle support custom HTTP clients like Guzzle in Laravel?
The bundle adheres to PSR-18, so you can configure a custom HTTP client (e.g., Guzzle) via the `http_client` setting in `whop.yaml`. However, since this is a Symfony bundle, you’d need to manually integrate a PSR-18 client in Laravel (e.g., using `php-http/guzzle7-adapter`). The bundle itself won’t work in Laravel, but its client logic could be adapted.
How do I test the webhook endpoint locally without hitting Whop’s servers?
Use Whop’s sandbox environment (with `ws_` secrets) and tools like `ngrok` to expose your local webhook endpoint (`/_whop/webhook`). Alternatively, mock the `WhopApiClient` and `WebhookVerifier` in tests by overriding their services in Symfony’s test container. The bundle’s event-driven design (`WhopWebhookReceivedEvent`) also makes it easy to test handlers in isolation.
What’s the performance impact of using the event-driven webhook approach?
The event-driven design adds minimal overhead—events are dispatched asynchronously after verification. For high-throughput scenarios, ensure your event listeners are optimized (e.g., avoid blocking I/O). The bundle’s default setup is lightweight, but custom handlers should batch or queue heavy operations to avoid bottlenecks.
How do I migrate from a custom Whop webhook implementation to this bundle?
Replace your custom route with the bundle’s `/_whop/webhook` endpoint. Update your `WhopApiClient` instantiation to use the autowired service. Migrate any custom verification logic to the overridable controller or event listeners. Test thoroughly in staging, as the bundle’s webhook path and signature validation may differ from your prior setup.
When will this bundle reach 1.0.0 stability, and how can I track changes?
The bundle is pre-1.0.0, with no official timeline for stability. Monitor the [GitHub repo](https://github.com/devmatchable/whop-symfony-bundle) for release notes and breaking change warnings. Since it depends on the unreleased `whop-php-sdk`, stability hinges on that SDK’s progress. Avoid production use until both packages hit 1.0.0.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity