Last updated

Adapters Overview

Adapters are the building blocks of Norce Checkout. Each adapter connects Norce Checkout to an external service, handling the integration details so you can focus on building your checkout experience. Adapters communicate through hooks and notifications, ensuring they stay synchronized as the order progresses through checkout.

How Adapters Work

When an order is created in Norce Checkout, adapters register their interest in specific order events through hooks and notifications. As the order changes (items added, shipping selected, payment initiated), Norce Checkout notifies the relevant adapters, which update their state accordingly.

For example, when a customer changes the quantity of an item in their cart:

  1. The cart update triggers a hook notification
  2. The payment adapter receives the notification and recalculates the payment amount
  3. The shipping adapter may recalculate shipping costs based on the new cart weight
  4. All adapters stay synchronized without requiring explicit coordination

This event-driven architecture allows adapters to work together seamlessly while remaining loosely coupled.

Adapter Types

Norce Checkout supports three categories of adapters:

Platform Adapters

Platform adapters connect e-commerce platforms to Norce Checkout. They handle order creation, cart synchronization, and order export back to the platform when checkout completes.

The primary platform adapter is the Norce Adapter, which connects Norce Commerce to Norce Checkout. It creates Norce Checkout orders from Norce Commerce baskets and exports completed orders back to Norce Commerce.

Read more about the Norce Platform Adapter.

Provider Adapters

Provider adapters integrate external services for payments, shipping, and vouchers. They handle communication with third-party APIs, map Norce Checkout orders to provider-specific formats, and process responses.

Payment Adapters handle payment processing through providers like Klarna, Adyen, Svea, Walley, PayPal, Qliro, and Avarda. They create payment sessions, embed payment widgets, and capture payments when orders complete.

Shipping Adapters manage delivery options through providers like Ingrid. They present shipping choices to customers and update shipping costs as the cart changes.

Voucher Adapters handle gift cards and loyalty points through providers like Awardit. They validate voucher codes and apply discounts to the order total.

Read more about Provider Adapters.

Custom Adapters

You can build custom adapters for services not covered by the standard adapter library. Custom adapters follow the same patterns as built-in adapters, using hooks and notifications to integrate with the checkout flow.

Common use cases for custom adapters include:

  • Integrating proprietary payment systems
  • Connecting to custom shipping calculators
  • Implementing business-specific validation rules
  • Triggering external workflows on order events

See the Advanced Topics section for guidance on building custom adapters.

Adapter Configuration

Each adapter is configured through the Configuration API. Configuration includes:

  • Credentials: API keys, secrets, and authentication details for the external service
  • Behavior Settings: Feature flags and options that control adapter behavior
  • Endpoint URLs: Public and internal URLs for the adapter service

Configurations are scoped by merchant and channel, allowing different settings for different sales channels or environments.

Available Adapters

AdapterTypeDescription
Norce AdapterPlatformConnects Norce Commerce to Norce Checkout
Klarna CheckoutPaymentKlarna's hosted checkout solution
Klarna PaymentsPaymentKlarna's embedded payment widgets
Adyen Drop-inPaymentAdyen's embedded payment component
Svea CheckoutPaymentSvea's hosted checkout solution
Walley CheckoutPaymentWalley's hosted checkout solution
PayPalPaymentPayPal payment integration
Qliro CheckoutPaymentQliro's hosted checkout solution
Avarda CheckoutPaymentAvarda's hosted checkout solution
Non-PSPPaymentManual/invoice payments without a PSP
IngridShippingIngrid delivery management
AwarditVoucherGift cards and loyalty points

Next Steps