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:
| Field | Description | Example Value |
|---|---|---|
apiUrl | Ledyer API URL (test or production). | https://api.ledyer.com |
authenticationUrl | Ledyer OAuth authentication URL. | https://auth.ledyer.com |
scriptUrl | URL for the Ledyer checkout iframe script. | https://checkout.ledyer.com/bootstrap.js |
clientId | Your Ledyer client identifier. | your-client-id |
clientSecret | Your Ledyer client secret. | your-client-secret |
Merchant Configuration
| Field | Description | Example Value |
|---|---|---|
termsUrl | URL to merchant terms displayed and linked in the checkout. | https://example.com/terms |
privacyUrl | URL to merchant privacy policy (optional, can be included in terms). | https://example.com/privacy |
securityLevel | Ledyer security level (100, 110, 120, 200, 210, 220, or 300). See Ledyer Security Levels. | 100 |
storeId | Ledyer store ID (only needed for multiple stores with same country and currency). | store-123 |
Redirect URLs
| Field | Description | Example Value |
|---|---|---|
success | URL to redirect to after successful payment. Supports placeholders: {orderId}, {paymentId}. | https://example.com/confirmation?order={orderId} |
checkout | URL to your checkout page (for back navigation). | https://example.com/checkout |
failure | URL to redirect to on payment failure. | https://example.com/checkout?error=payment |
cancel | URL to redirect to if checkout is cancelled. | https://example.com/cart |
Feature Options
| Field | Description | Default |
|---|---|---|
allowShippingAddress | Allow customers to enter a shipping address different from billing address. | true |
showNameFields | Require customers to enter firstname and lastname in the initial checkout view. | false |
showShippingAddressContact | Allow customers to enter a separate contact person for the shipping address. | false |
useRecurringPayment | Enable recurring payment token generation for subscription orders. | false |
containerId | ID 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
| Field | Description | Default |
|---|---|---|
autoCapture.enabled | Enable automatic capture of payments after order completion. | false |
autoCapture.delayMinutes | Delay in minutes before auto-capture is triggered. | 0 |
Styling Options
Customize the appearance of the Ledyer Checkout iframe:
| Field | Description | Example Value |
|---|---|---|
dataBrandColor | Hexadecimal 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 |
dataNoPadding | Set to true to remove the default 12px wrapping padding from the Ledyer checkout. | false |
Localization Options
Configure localized text for discounts and vouchers:
| Field | Description | Example Value |
|---|---|---|
discountLocalizations | Localized discount text by culture code. | {"sv-SE": "Rabatt", "en-US": "Discount"} |
voucherLocalizations | Localized 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:
| Environment | Ledyer API Base URL |
|---|---|
| Production | https://api.ledyer.com |
| Sandbox | https://api.sandbox.ledyer.com |
B2B Customer Data
Ledyer is designed for B2B transactions. When creating orders, the adapter maps the following customer data:
| Norce Field | Ledyer Field | Description |
|---|---|---|
customer.billing.organizationIdentificationNumber | companyId | Company registration number (VAT number) |
customer.billing.organizationName | billingAddress.companyName | Company name |
customer.billing.reference | reference1 | Customer reference (e.g., cost center) |
customer.billing.nationalIdentificationNumber | ssn | Personal 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"
}
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:
| Level | Description |
|---|---|
| 100 | Basic - Email verification only |
| 110 | Basic with phone verification |
| 120 | Basic with BankID verification |
| 200 | Enhanced - Company verification |
| 210 | Enhanced with phone verification |
| 220 | Enhanced with BankID verification |
| 300 | Full 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}