Walley Checkout Adapter
Overview Document: Payment Adapters Overview
Overview and Unique Capabilities
The Walley Checkout Adapter integrates Walley Checkout with Norce Checkout. This page focuses on the unique technical details and configuration for Walley.
Supported payment methods and other features: Features Overview
Configuration in Norce Admin
The adapter is configured using the following unique details obtained from Walley:
| Field | Description | Example Value |
|---|---|---|
apiUrl | Walley Checkout API URL (test or production). | https://api.uat.walleydev.com |
authenticationUrl | Walley OAuth authentication URL. | https://api.uat.walleydev.com |
frontEndUrl | Walley frontend URL for the checkout iframe loader script. | https://checkout.uat.walleydev.com |
scope | Walley OAuth scope (environment-specific constant). UAT: 705798e0-8cef-427c-ae00-6023deba29af/.default, Production: a3f3019f-2be9-41cc-a254-7bb347238e89/.default | 705798e0-8cef-427c-ae00-6023deba29af/.default |
clientId | Your Walley client identifier. | your-client-id |
apiSecret | Your Walley API secret key. | your-api-secret |
Store ID Configuration
Configure Store IDs for each country and customer type combination:
| Field | Description |
|---|---|
storeId-SE-B2C | Store ID for Sweden B2C customers |
storeId-SE-B2B | Store ID for Sweden B2B customers |
storeId-NO-B2C | Store ID for Norway B2C customers |
storeId-NO-B2B | Store ID for Norway B2B customers |
storeId-FI-B2C | Store ID for Finland B2C customers |
storeId-FI-B2B | Store ID for Finland B2B customers |
storeId-DK-B2C | Store ID for Denmark B2C customers |
storeId-DK-B2B | Store ID for Denmark B2B customers |
Feature Toggles
| Field | Description | Default |
|---|---|---|
useDeliveryModule | Enable Walley Delivery Module for integrated shipping. | false |
useCustomerPrefill | Enable customer information prefill for returning customers. | false |
profileName | Walley profile name for customized checkout experience (configured by Walley Merchant Services). | — |
useUpsell | Enable upsell offers to be added to a completed Walley Checkout order. When enabled, orders eligible for upsell remain in Accepted state instead of Completed, allowing reauthorization before capture. | false |
upsellTimeoutSeconds | Maximum time window in seconds during which upsell offers can be added before completing the order. | 300 |
Redirect URLs
Configure the URLs that Walley uses for callbacks and redirects:
| Field | Description | Example Value |
|---|---|---|
merchantTermsUri | URL to merchant terms displayed and linked in the checkout. | https://example.com/terms |
redirectPageUri | URI to redirect to after checkout completion. | https://example.com/confirmation |
notificationUri | URI for Walley notification callbacks (order completion). | https://{slug}.api-se.norce.tech/checkout/walley-adapter |
validationUri | URI for Walley validation callbacks (pre-purchase validation). | https://{slug}.api-se.norce.tech/checkout/walley-adapter |
checkoutAbortedRedirectPageUri | URI to redirect to if checkout is aborted. | https://example.com/checkout-aborted |
Styling Options
Customize the appearance of the Walley Checkout iframe:
| Field | Description | Example Value |
|---|---|---|
dataPadding | Set to none to cancel out the left and right padding inside the iframe (by adjusting its margins and width). | none |
dataContainerId | ID of an element on the page where the iframe will render instead of immediately above the script element. | walley-checkout-container |
dataActionColor | Hexadecimal color code for the background color of call-to-action buttons. Button text color is automatically set based on WCAG 2.0 contrast requirements. | #582f87 |
dataActionTextColor | Override the automatic text color of call-to-action buttons. Valid values: black, white, #000000, #ffffff. | #FFFFFF |
Mapping Options
Configure how order data is mapped to Walley:
| Field | Description | Default |
|---|---|---|
referenceSource | Selects the order property mapped to Walley Merchant Reference. Options: orderId, cartReference. | orderId |
shippingReferenceSource | Selects the shipping property mapped to Walley Shipping Fee ID. Options: ShippingId, CustomValue. | ShippingId |
customShippingReference | Custom value for shipping reference (required when shippingReferenceSource is CustomValue). | — |
mapDiscountPerRow | If true, applied discounts are included directly in item row prices instead of being represented as separate discount order lines. | false |
Localization Options
Configure localized text for discounts and vouchers:
| Field | Description | Example Value |
|---|---|---|
discountText | Localized discount text by culture code. | {"sv-SE": "Rabatt", "en-US": "Discount"} |
voucherText | Localized voucher text by culture code. | {"sv-SE": "Presentkort", "en-US": "Gift Card"} |
Frontend Integration Requirements
Walley will not inform the Norce adapter directly of customer changes made through the Walley checkout widget. When a user enters or updates their customer information in the Walley widget, the widget triggers client-side events. You must listen for these events and call the Norce Walley Adapter API to update the order in real-time.
Failure to implement these event handlers will result in:
- Email-based discounts not being validated correctly
- Customer information not being synchronized with Norce until purchase completion
- Potential order validation failures when the order is locked during payment processing
Required Event: Customer Update
Before implementing the Walley Checkout customer update event handler, ensure you have:
- The Walley Checkout script loaded on your page
- A valid Norce Checkout order ID and payment ID
- Your Norce merchant and channel identifiers
- A valid Norce authentication token (Bearer token)
Listen for the walleyCheckoutCustomerUpdated event from Walley and call the customer update endpoint:
// Initialize Walley event listener (after the Walley checkout script loads)
window.addEventListener('walleyCheckoutCustomerUpdated', async function(data) {
const orderId = /* your order ID */;
const paymentId = /* your payment ID */;
const merchant = /* your merchant ID */;
const channel = /* your channel ID */;
const token = /* your authentication token */;
await fetch(`/api/checkout/v1/callback/orders/${orderId}/payments/${paymentId}/customer-update`, {
method: 'POST',
headers: {
'x-merchant': merchant,
'x-channel': channel,
'Authorization': 'Bearer ' + token
}
});
});Endpoint:
POST /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/customer-updateThis endpoint updates the Norce order with the latest customer information from Walley, including email address (critical for discount validation), billing address, delivery address, and loyalty membership data.
Failure to implement this event handler will result in:
- Email-based discounts not being validated correctly
- Customer information not being synchronized with Norce until purchase completion
- Potential order validation failures when the order is locked during payment processing
Required Event: Shipping Option Update
When using Walley's delivery module (useDeliveryModule enabled), listen for shipping option changes to keep the Norce order synchronized:
window.addEventListener('walleyCheckoutShippingOptionUpdated', async function(data) {
const orderId = /* your order ID */;
const paymentId = /* your payment ID */;
const merchant = /* your merchant ID */;
const channel = /* your channel ID */;
const token = /* your authentication token */;
await fetch(`/api/checkout/v1/callback/orders/${orderId}/payments/${paymentId}/shipping-option-update`, {
method: 'POST',
headers: {
'x-merchant': merchant,
'x-channel': channel,
'Authorization': 'Bearer ' + token
}
});
});Endpoint:
POST /api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/shipping-option-updateThis endpoint updates the Norce order with the selected shipping option from Walley, including shipping method, shipping cost, and delivery address.
Failure to implement this event handler will result in:
- Shipping costs not being synchronized with Norce until purchase completion
- Order totals being incorrect due to mismatched shipping prices
- Potential order validation failures when the order is locked during payment processing
- Customer experiencing unexpected price differences between Walley and the order confirmation
The customer-update and shipping-option-update endpoints do not require a request body. The adapter fetches the current session state directly from Walley when called.
Walley Checkout UI Locking During Payment Processing
When the customer initiates payment (clicks the purchase button), your checkout frontend should enter a locked state where:
- All form inputs are disabled
- Shipping options cannot be changed
- Cart modifications are prevented
- A loading indicator is displayed
This prevents race conditions where the customer might modify the order while payment is being processed, which can cause validation failures or unexpected order states.
For more details on Walley client-side events, see the Walley Checkout Client Events documentation.
Loyalty Integration
The Walley adapter automatically captures loyalty membership data from Walley orders. No configuration is required to enable this feature.
When a completed Walley order includes a loyaltyMembership on the customer object, the adapter reads this value and stores it as a Norce customer attribute with the key walleyCustomerLoyaltyMembership.
Unlike other features such as useDeliveryModule or useUpsell, there is no feature toggle for loyalty — the capture happens passively whenever Walley provides membership data on the order.
Walley API Environments
In addition to the generic Norce Adapter URLs (see Payment Adapters Overview), Walley uses the following external API environments:
| Environment | Walley API Base URL | Walley Frontend URL |
|---|---|---|
| Production | https://api.walleypay.com | https://checkout.walleypay.com |
| Test (UAT) | https://api.uat.walleydev.com | https://checkout.uat.walleydev.com |
Idempotency and Retries
Walley may send multiple notification callbacks for the same event. The adapter handles idempotency to ensure that duplicate notifications do not result in duplicate order processing. For detailed information about Walley's retry behavior, see the Walley Checkout documentation on Idempotency and retries.
Troubleshooting (Walley Specific)
In addition to the generic troubleshooting steps:
- Review the order status directly in Walley's merchant portal.
- If Capture fails, verify the Norce order is in the reserved state and that the Walley order status allows capture.
- If Refund fails, ensure the order has been captured and has not already been returned.
- Use the refresh call to update available payment actions:
POST /api/order/v1/orders/{order_id}/payments/{payment_id}/refresh
Host: {slug}.api-se.norce.tech
x-merchant: {merchant}
x-channel: {channel}
Authorization: Bearer {token}