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.
Every API call returns a SveaResource — a typed, read-only, array-accessible object.
$order = Svea::checkout()->get('12345678');
$order->status(); // named getter (preferred in typed code)
$order->status; // magic property access
$order['status']; // ArrayAccess read
$order->successful(); // bool helper
$order->getLastResponse()->statusCode; // int — raw HTTP status
$order->getLastResponse()->headers; // array
$order->getLastResponse()->body; // string
Attempting $order['key'] = $value or unset($order['key']) throws \BadMethodCallException. Response objects are immutable snapshots.
| Class | Returned by |
|---|---|
CheckoutResponse |
Svea::checkout()->create() / get() / update() |
AdminOrderResponse |
Svea::admin()->order(...)->get() |
DeliverResponse |
Svea::admin()->order(...)->deliver(...) |
TaskResponse |
Svea::admin()->task(...) |
Subscription |
Svea::subscriptions()->get() / add() / update() |
WebhookEvent |
Svea::webhook()->fromRequest() / Webhook::constructEvent() |
How can I help you explore Laravel packages today?