Architecture fit
The laravel-sumsub-sdk package (v2.2.6) remains a lightweight, domain-specific integration layer for SumSub’s identity verification API, aligning well with Laravel’s ecosystem. The addition of a SHAREHOLDER_REGISTRY document subtype expands use cases for financial/compliance workflows (e.g., KYC for shareholder onboarding) without altering core architecture. The package’s event-driven design (e.g., webhook handling) and Laravel service provider pattern ensure minimal intrusion into existing systems.
Integration feasibility
.env credentials, middleware) remain unchanged.sumsub:verified events may need to handle the new subtype in business logic (e.g., workflow routing).SumSub\Exceptions\InvalidDocumentType) in edge cases (e.g., malformed payloads).Technical risk
SHAREHOLDER_REGISTRY submissions could stress SumSub’s API if not throttled (e.g., via Laravel’s throttle middleware).SumSubLogger::info('Processing SHAREHOLDER_REGISTRY')) and unit tests for event dispatching.Key questions
SumSubAuditTrait).Stack fit
string for subtype names).Migration path
composer require shureban/laravel-sumsub-sdk:^2.2.6) without code changes.config('sumsub.enable_shareholder_registry')) and monitor via Sentry/New Relic.Compatibility
SumSub::verify() or SumSub::check() remains unchanged.config/sumsub.php may need an optional allowed_document_subtypes array to explicitly whitelist/blacklist subtypes (recommend adding this proactively).Sequencing
SumSub\Exceptions\ValidationException).Maintenance
Updater class simplifies version bumps.SHAREHOLDER_REGISTRY in:
Support
SumSub::validateDocumentSubtype() helper to pre-check subtypes before API calls.sumsub.webhook queue listener handles the new subtype (e.g., via a polymorphic event handler).Scaling
document_subtype column to verification logs if auditing is required.Failure modes
| Scenario | Impact | Mitigation |
|---|---|---|
| SumSub API rejects subtype | Verification fails silently | Add retry logic with exponential backoff |
| Webhook listener crashes | Unprocessed subtype events | Implement dead-letter queue (e.g., failed_jobs table) |
| Rate limit exceeded | Throttled requests | Add throttle:60,1 middleware to SumSubServiceProvider |
Ramp-up
// Handle the new subtype in a webhook listener
public function handle(Verified $event) {
if ($event->document->subtype === 'SHAREHOLDER_REGISTRY') {
$this->routeToComplianceWorkflow($event->user);
}
}
composer require v2.2.5) if SumSub’s API behavior changes unexpectedly (unlikely, but monitor their changelog).How can I help you explore Laravel packages today?