ax7-cmd/sumsub
PHP example project for integrating Sumsub verification: install via Composer, set SUMSUB_SECRET_KEY and SUMSUB_APP_TOKEN, then run example.php. Demonstrates authorization, creating applicants, uploading ID documents, checking status, and generating SDK access tokens.
ax7-cmd/sumsub package is a PHP/Laravel wrapper for the SumSub API, a service for identity verification, fraud prevention, and e-signatures. It fits well in architectures requiring KYC (Know Your Customer), AML (Anti-Money Laundering), or document verification (e.g., fintech, SaaS with regulated users, or compliance-heavy applications).createVerification, getVerification).config/sumsub.php for API keys/secrets, aligning with Laravel’s conventions.Http facade or Guzzle under the hood (verify in code).| Risk Area | Severity | Mitigation |
|---|---|---|
| Undocumented Features | High | Audit SumSub API docs vs. package methods; fill gaps with direct API calls. |
| Webhook Reliability | High | Implement redundant webhook validation (e.g., HMAC signatures) and retries. |
| Laravel Version Compatibility | Medium | Test against your Laravel version (package may not declare support for LTS). |
| Rate Limiting | Medium | Monitor SumSub API usage; implement exponential backoff for retries. |
| Dependency Bloat | Low | Review package’s composer.json for unnecessary dependencies (e.g., Guzzle). |
verifications, documents, webhooks)? If not, can gaps be filled with direct API calls?429 Too Many Requests) translated into Laravel exceptions?$this->app->singleton(SumSubClient::class, function ($app) {
return new SumSubClient($app['config']['sumsub.api_key']);
});
.env and config/sumsub.php:
SUMSUB_API_KEY=your_key
SUMSUB_WEBHOOK_SECRET=your_secret
Http facade for consistency (if the package uses Guzzle, wrap it in a facade).verifications table. Example schema:
CREATE TABLE verifications (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
user_id BIGINT UNSIGNED, -- FK to users table
sumsub_id VARCHAR(255), -- SumSub's verification ID
status ENUM('pending', 'completed', 'failed'),
metadata JSON,
created_at TIMESTAMP
);
class SumSubVerificationJob implements ShouldQueue {
public function handle() {
$verification = app(SumSubClient::class)->createVerification($user);
// Store $verification->id in DB
}
}
createVerification, getVerification)./sumsub/webhook) with HMAC validation.500 errors).Artisan::command('sumsub:verify {user}', function ($userId) {
$verification = app(SumSubClient::class)->createVerification($userId);
info("Initiated verification: {$verification->id}");
});
guzzlehttp/guzzle).composer require ax7-cmd/sumsub
php artisan vendor:publish --provider="Ax7\Sumsub\SumsubServiceProvider"
.env with SumSub credentials.Route::post('/sumsub/webhook', [SumsubWebhookController::class, 'handle']);
composer.json for bloated dependencies (e.g., unused libraries).ax7-cmd/sumsub and its dependencies to avoid surprises.How can I help you explore Laravel packages today?