Last updated

Svea Checkout Adapter

Overview Document: Payment Adapters Overview

Overview and Unique Capabilities

The Svea Checkout Adapter integrates Svea Checkout with Norce Checkout. This page focuses on the unique technical details and configuration for Svea.

Supported payment methods and other features: Features Overview

Configuration in Norce Admin

The adapter is configured using the following details obtained from Svea and your storefront URLs:

Required Settings

FieldDescriptionExample Value
apiUrlSvea Checkout API URL (test or production).https://checkoutapistage.svea.com
orderManagementApiUrlSvea Payment Admin API URL for order management operations.https://paymentadminapistage.svea.com
merchantIdYour Svea merchant identifier.12345
apiSecretYour Svea API secret key.xyz123abc
checkoutUrlURL to your checkout page where the Svea iframe is displayed.https://your-store.com/checkout
confirmationUrlURL to redirect customers after successful payment.https://your-store.com/confirmation
merchantTermsUrlURL to your terms and conditions page.https://your-store.com/terms

Optional Settings

FieldDescriptionExample Value
useDeliveryModuleSet to true if using Svea's integrated Delivery Module (nShift).false
minAgeMinimum age requirement for purchases (shop-wide). Not supported for B2B orders.18
activePartPaymentCampaignsComma-separated list of valid CampaignIDs to filter part payment options.111,222,333
promotedPartPaymentCampaignCampaignID to promote first in payment method lists.222
useRecurringPaymentEnable recurring/subscription payments.false
discountLocalizationsLocalized labels for discount rows by culture.{"sv-SE": "Rabatt"}
voucherLocalizationsLocalized labels for voucher rows by culture.{"sv-SE": "Presentkort"}

Svea API Environments

In addition to the generic Norce Adapter URLs (see Payment Adapters Overview), Svea uses the following external API environments:

EnvironmentSvea Checkout APISvea Payment Admin API
Productionhttps://checkoutapi.svea.comhttps://paymentadminapi.svea.com
Stage/Testhttps://checkoutapistage.svea.comhttps://paymentadminapistage.svea.com

B2B vs B2C Handling

The adapter automatically detects whether the customer is a business (B2B) or private consumer (B2C) based on the customer.type field in the Norce order. When the customer type is Organization, the adapter sets the IsCompany preset value to true in the Svea checkout session.

Key differences for B2B orders:

  • The minAge validation option is not supported for B2B orders (Svea limitation)
  • PEPPOL invoicing is available for B2B customers

Note that the adapter always sends prices including VAT to Svea. The VAT rate is calculated from each item's vatRate field. For discounts, the VAT rate is derived from the difference between includingVat and excludingVat values.

Merchant Settings (Auto-generated Callbacks)

When creating a Svea checkout session, the adapter automatically generates the following callback URLs. These are sent to Svea as part of the merchantSettings and do not need to be configured manually:

CallbackPurpose
checkoutValidationCallBackUriCalled by Svea before payment confirmation to validate stock and discounts.
pushUriCalled by Svea when the order status changes (e.g., payment confirmed).
webhookUriCalled by Svea for shipping-related events when using the Delivery Module.

Creating a Recurring Payment

To create an order using a previously stored recurring token:

POST /api/checkout/v1/orders/{order_id}/payments/recurring
Host: {slug}.api-se.stage.norce.tech
x-merchant: {merchant}
x-channel: {channel}
Authorization: Bearer {token}
Content-Type: application/json

{
  "token": "cd45444b-e125-4660-b5c0-08dce7ff05be"
}
Recurring Token Limitations

Token usage is capped at three orders per day in the production environment. Additionally, recurring orders cannot be created when the merchant uses nShift shipping.

Troubleshooting (Svea Specific)

In addition to the generic troubleshooting steps:

  • Review the order status directly in Svea's Payment Admin.
  • If Capture fails, verify the Norce order is in the reserved state and that the Svea order status is Final.
  • Use the Svea-specific refresh call to update available payment actions:

POST /api/order/v1/orders/{order_id}/payments/{payment_id}/refresh
Host: {slug}.api-se.stage.norce.tech
x-merchant: {merchant}
x-channel: {channel}
Authorization: Bearer {token}