Last updated

Provider Adapters

Provider adapters connect Norce Checkout with external service providers for payments, shipping, and vouchers. They handle the communication between Norce Checkout and third-party APIs, ensuring orders stay synchronized as customers progress through checkout.

How Provider Adapters Work

When a customer interacts with a provider service during checkout (selecting a payment method, choosing shipping, applying a voucher), the provider adapter:

  1. Receives the request from your checkout frontend
  2. Translates the Norce Checkout order into the provider's expected format
  3. Communicates with the provider's API
  4. Updates the Norce Checkout order with the provider's response
  5. Registers hooks to stay informed of subsequent order changes

Provider adapters use hooks and notifications to maintain synchronization. When the cart changes, payment adapters automatically recalculate amounts. When shipping is selected, the order total updates to reflect shipping costs.

Payment Adapters

Payment adapters integrate payment service providers (PSPs) with Norce Checkout. They handle payment session creation, widget embedding, payment authorization, and capture.

AdapterProviderCheckout Type
klarna_checkout_adapterKlarnaHosted checkout
klarna_payments_adapterKlarnaEmbedded widgets
adyen_dropin_adapterAdyenEmbedded drop-in
svea_checkout_adapterSveaHosted checkout
walley_checkout_adapterWalleyHosted checkout
paypal_adapterPayPalRedirect/embedded
qliro_checkout_adapterQliroHosted checkout
avarda_checkout_adapterAvardaHosted checkout
nonpsp_adapterNoneManual/invoice

Each payment adapter supports the standard payment flow: create payment, authorize, and capture. Some adapters support additional features like partial captures, refunds, and recurring payments.

Read more about Payment Adapters.

Shipping Adapters

Shipping adapters integrate delivery management services with Norce Checkout. They present shipping options to customers and calculate delivery costs based on cart contents and delivery address.

AdapterProviderFeatures
ingrid_adapterIngridDelivery options, pickup points, delivery dates

Shipping adapters register hooks on cart and customer address changes to recalculate shipping options and costs as the order evolves.

Read more about Shipping Adapters.

Voucher Adapters

Voucher adapters handle gift cards, discount codes, and promotional vouchers. They validate voucher codes, check balances, and apply discounts to the order total.

AdapterProviderFeatures
awardit_adapterAwarditGift cards, loyalty points

Voucher adapters create payments of type voucher with an upperLimitAmount that caps how much of the order the voucher can cover. The remaining amount is paid through a regular payment adapter.

Read more about Voucher Adapters.

Configuring Provider Adapters

Each provider adapter requires configuration through the Configuration API. Configuration typically includes:

  • API Credentials: Keys, secrets, and merchant identifiers for the provider
  • Environment: Production or sandbox/test environment
  • Feature Flags: Enable or disable specific adapter features
  • Localization: Default locale and supported languages

See the individual adapter documentation for specific configuration requirements.

Combining Multiple Adapters

Norce Checkout supports multiple provider adapters working together on a single order. Common combinations include:

  • Payment + Shipping: Klarna Checkout with Ingrid for delivery options
  • Payment + Voucher: Adyen with Awardit gift cards
  • Multiple Payments: A voucher covering part of the order, with the remainder paid via Klarna

Adapters coordinate through the order's hooks and notifications system, ensuring all adapters stay synchronized as the order changes.

Next Steps