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

Quick Start

::: tip Source of truth The full quick-start lives in the README. This page links to the most common flows. :::

Minor-unit convention

All numeric values follow Svea's minor-unit convention:

  • quantity100 = 1 unit, 300 = 3 units
  • unitPrice29900 = 299.00 SEK
  • vatPercent2500 = 25%, 1900 = 19%
  • discountPercent1000 = 10%

Create a checkout order

use Svea\Checkout\Cart;
use Svea\Checkout\CheckoutOrder;
use Svea\Checkout\MerchantSettings;
use Svea\Checkout\OrderRow;

$order = Svea::checkout()->create(new CheckoutOrder(
    currency: 'SEK',
    countryCode: 'SE',
    locale: 'sv-SE',
    clientOrderNumber: 'ORD-001',
    merchantSettings: new MerchantSettings(
        pushUri: route('webhooks.svea'),
        termsUri: route('terms'),
        confirmationUri: route('checkout.confirmation'),
        checkoutUri: route('checkout'),
    ),
    cart: new Cart([
        new OrderRow(quantity: 100, unitPrice: 29900, vatPercent: 2500, sku: 'TSHIRT-BLK-M', name: 'T-Shirt Black M'),
    ]),
));

$order->id();      // '12345678'
$order->snippet(); // '<script>...</script>' — embed in your checkout page

See the full Checkout reference for the fluent callback style and all optional fields, and Fluent Builders & Conditionable for the full pattern across every API surface.

Deliver and credit

$deliver = Svea::admin()->order('12345678')->deliver();
$task    = Svea::admin()->order('12345678')->delivery($deliver->deliveryId())->creditAmount(9900);

See the Payment Admin reference.

Verify a webhook

$event = Svea::webhook()->fromRequest($request); // throws SignatureVerificationException on mismatch

See the Webhooks reference.

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.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony