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

Svea Laravel Package

nordkit/svea

Modern PHP SDK for Svea Checkout, Payment Admin, webhook subscriptions and inbound webhook verification. Fluent API with typed value objects, retries, idempotency, async task polling, and a robust testing fake. Includes first-class Laravel integration.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Buy this package to accelerate development of Svea Checkout integration, avoiding reinventing the wheel for API calls, webhook handling, and Laravel-specific integrations. The package’s maturity (PHPStan level 6, Laravel 11/12/13 support, and comprehensive testing tools) reduces technical debt and risk.
  • Roadmap Priorities:
    • Phase 1: Launch Svea Checkout for core payment flows (e.g., e-commerce carts) with minimal dev effort. Leverage the Checkout API and Webhook Subscriptions to handle order creation, status updates, and async notifications.
    • Phase 2: Implement Subscription Management (recurring payments) using the subscriptions module, reducing reliance on manual admin operations.
    • Phase 3: Add Payment Admin features (e.g., refunds, cancellations) via the admin module, enabling self-service for customer support.
  • Use Cases:
    • E-commerce: Seamless cart-to-checkout flows with real-time order status updates via webhooks.
    • Recurring Billing: Subscription management for SaaS/membership models (e.g., auto-renewals, dunning).
    • Global Payments: Support for SEK (and other currencies) with localized checkout pages (e.g., locale: 'sv-SE').
    • Fraud Prevention: Use Svea’s idempotency keys and webhook verification to secure payment retries and callback handling.
  • Tech Stack Alignment:
    • Laravel-First: Native facade (Svea::checkout()), Artisan commands, and Laravel events (SveaWebhookReceived) integrate cleanly with existing Laravel apps.
    • Testing: Svea::fake() mimics Svea’s API for unit/feature tests (critical for CI/CD pipelines).
    • Observability: Optional integration with Wiretap for HTTP request/response logging (audit trails, debugging).

When to Consider This Package

Adopt if:

  • Your product uses Svea Checkout (or plans to) and is built with PHP/Laravel.
  • You need all four Svea APIs (Checkout, Admin, Subscriptions, Webhooks) under one roof with a consistent API design.
  • Your team prioritizes developer velocity over custom SDKs (e.g., avoid manual HMAC signing, retry logic, or webhook verification).
  • You require Laravel-specific features (facades, Artisan commands, event dispatching) to reduce boilerplate.
  • Your payment flows include subscriptions, async webhooks, or high-volume retries (e.g., 429/5xx handling).

Look elsewhere if:

  • You’re not using Laravel and prefer a framework-agnostic solution (though the core SDK works standalone).
  • Your stack is non-PHP (e.g., Node.js, Python) — use Svea’s official SDKs.
  • You need advanced customization (e.g., modifying Svea’s API responses) and are uncomfortable with the package’s immutable value objects (final readonly).
  • Your team lacks PHP 8.2+ or Laravel 11+ experience (though the package is well-documented).
  • You’re evaluating alternative payment providers (e.g., Stripe, PayPal) with more mature SDK ecosystems.

How to Pitch It (Stakeholders)

For Executives: "This package lets us launch Svea Checkout in weeks, not months*, by eliminating manual API integration work. It handles:

  • Checkout flows (cart → payment → confirmation) with Svea’s native minor-unit currency system (e.g., SEK öre).
  • Webhooks with automatic HMAC verification to prevent fraudulent callbacks.
  • Subscriptions for recurring revenue (e.g., SaaS, memberships) with built-in retry logic for failed payments.
  • Laravel-native tools like Artisan commands and facades to reduce dev overhead.

Key benefits: ✅ Faster time-to-market (no custom SDK development). ✅ Reduced risk (battle-tested with PHPStan level 6, Laravel 11/12/13). ✅ Scalable (handles high-volume retries and async tasks). ✅ Audit-ready (optional Wiretap integration logs all API calls).

Cost: Zero upfront (MIT license), with long-term savings from avoided dev time and lower error rates."*


For Engineering: *"This is a first-class Svea SDK for PHP/Laravel with:

  • Fluent API: Chain methods like Svea::checkout()->create()->when(...) for conditional logic.
  • Testing: Svea::fake() lets you mock Svea’s API in tests (like Laravel’s Http::fake()).
  • Webhook Safety: Built-in HMAC verification and timing-safe comparison to block spoofed callbacks.
  • Admin Control: Idempotency keys and retries for safe queue processing (e.g., refunds).
  • Laravel Perks: Facades, events (SveaWebhookReceived), and Artisan commands for subscriptions.

Trade-offs:

  • Less flexibility than a custom SDK (e.g., can’t modify Svea’s response objects).
  • Laravel-only for advanced features (though the core works standalone).

Recommendation: Use this for new projects or greenfield integrations. For legacy systems, evaluate the effort to adapt it vs. building a custom solution."*

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.
iio/libmergepdf
redaxo/project
zatona-eg/zatona-eg-api
patrickbussmann/oauth2-apple
3brs/enterprise-security-bundle
ardenexal/fhir-models
ardenexal/fhir-validation
dpfx/laravel-livewire-wizards
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle
dmstr/api-platform-utils-bundle
dmstr/api-configuration-bundle
chrisdev/ux-components
crudly/encrypted
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony