Skip to main content

Ledyer Checkout Adapter

Overview Document: Payment Adapters Overview

Overview and Unique Capabilities​

The Ledyer Checkout Adapter integrates Ledyer Checkout with Norce Checkout. Ledyer is a B2B-focused payment provider that specializes in invoice payments for business customers. This page focuses on the unique technical details and configuration for Ledyer.

Supported payment methods and other features: Features Overview

Configuration in Norce Admin​

The adapter is configured using the following unique details obtained from Ledyer:

FieldDescriptionExample Value
apiUrlLedyer API URL (test or production).https://api.ledyer.com
authenticationUrlLedyer OAuth authentication URL.https://auth.ledyer.com
scriptUrlURL for the Ledyer checkout iframe script.https://checkout.ledyer.com/bootstrap.js
clientIdYour Ledyer client identifier.your-client-id
clientSecretYour Ledyer client secret.your-client-secret

Merchant Configuration​

FieldDescriptionExample Value
termsUrlURL to merchant terms displayed and linked in the checkout.https://example.com/terms
privacyUrlURL to merchant privacy policy (optional, can be included in terms).https://example.com/privacy
securityLevelLedyer security level (100, 110, 120, 200, 210, 220, or 300). See Ledyer Security Levels.100
storeIdLedyer store ID (only needed for multiple stores with same country and currency).store-123

Redirect URLs​

FieldDescriptionExample Value
successURL to redirect to after successful payment. Supports placeholders: {orderId}, {paymentId}.https://example.com/confirmation?order={orderId}
checkoutURL to your checkout page (for back navigation).https://example.com/checkout
failureURL to redirect to on payment failure.https://example.com/checkout?error=payment
cancelURL to redirect to if checkout is cancelled.https://example.com/cart

Feature Options​

FieldDescriptionDefault
allowShippingAddressAllow customers to enter a shipping address different from billing address.true
showNameFieldsRequire customers to enter firstname and lastname in the initial checkout view.false
showShippingAddressContactAllow customers to enter a separate contact person for the shipping address.false
useRecurringPaymentEnable recurring payment token generation for subscription orders.false
containerIdID of the HTML element where the Ledyer iframe will be placed. If not specified, the iframe is placed next to the script tag. The element must exist in the DOM before the Ledyer script is loaded. For single-page applications (SPAs) or dynamic frameworks, ensure the container element is rendered before initializing the checkout to avoid timing issues.—

Auto-Capture Configuration​

FieldDescriptionDefault
autoCapture.enabledEnable automatic capture of payments after order completion.false
autoCapture.delayMinutesDelay in minutes before auto-capture is triggered.0

Styling Options​

Customize the appearance of the Ledyer Checkout iframe:

FieldDescriptionExample Value
dataBrandColorHexadecimal color code for the background color of CTA buttons. Button text color is automatically set to black or white based on contrast. Default is black (#000000).#582f87
dataNoPaddingSet to true to remove the default 12px wrapping padding from the Ledyer checkout.false

Localization Options​

Configure localized text for discounts and vouchers:

FieldDescriptionExample Value
discountLocalizationsLocalized discount text by culture code.{"sv-SE": "Rabatt", "en-US": "Discount"}
voucherLocalizationsLocalized voucher text by culture code.{"sv-SE": "Presentkort", "en-US": "Gift Card"}

Ledyer API Environments​

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

EnvironmentLedyer API Base URL
Productionhttps://api.ledyer.com
Sandboxhttps://api.sandbox.ledyer.com

B2B Customer Data​

Ledyer is designed for B2B transactions. When creating orders, the adapter maps the following customer data:

Norce FieldLedyer FieldDescription
customer.billing.organizationIdentificationNumbercompanyIdCompany registration number (VAT number)
customer.billing.organizationNamebillingAddress.companyNameCompany name
customer.billing.referencereference1Customer reference (e.g., cost center)
customer.billing.nationalIdentificationNumberssnPersonal identification number (for authorized signatories)

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": "dc50da60-3bf4-4a70-9290-a89629cae418"
}
Recurring Token Storage

When recurring payments are enabled (useRecurringPayment: true) and a customer completes a purchase, the payment object includes a recurring.token field. Store this token securely to create future orders without customer interaction.

Validation and Callbacks​

Ledyer uses a validation callback flow before completing purchases. The adapter automatically configures the following callbacks:

Validate Callback​

Called by Ledyer before the purchase is completed to allow final validation (stock check, price verification, etc.). The adapter validates that the Ledyer order matches the Norce order.

Acknowledge Callback (Notification)​

Called by Ledyer when an order is created (com.ledyer.order.create event). This callback completes the order in Norce Checkout and updates the payment state.

Customer Update Callback​

A client-side event callback that updates customer information on the Norce order when the customer changes their details in the Ledyer checkout.

Security Levels​

Ledyer supports different security levels that control the authentication requirements for customers:

LevelDescription
100Basic - Email verification only
110Basic with phone verification
120Basic with BankID verification
200Enhanced - Company verification
210Enhanced with phone verification
220Enhanced with BankID verification
300Full verification - All checks required

For detailed information about each security level, see Ledyer Security Levels Documentation.

Troubleshooting (Ledyer Specific)​

In addition to the generic troubleshooting steps:

  • Review the order status directly in Ledyer's merchant portal.
  • If Capture fails, verify the Norce order is in the reserved state and that the Ledyer order status allows capture. Note that partial captures are not supported - capture attempts must specify the full authorized amount or the operation will fail. Similarly, partial refunds are not supported; refund the full captured amount only.
  • If validation fails, check that all products are still available and that the order totals match between Norce and Ledyer.
  • 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}