Skip to main content

Klarna & Scalapay Integration

Klarna and Scalapay provide buy-now-pay-later (BNPL) payment options, allowing customers to pay in installments. Both integrations follow a similar flow: order approval, installment plan creation, and periodic settlement.

Components

ComponentFileRole
KlarnaApisrc/CoreBundle/Api/KlarnaApi.phpKlarna API client
ScalapayApisrc/CoreBundle/Api/ScalapayApi.phpScalapay API client

Configuration

Required parameters in parameters.yml:

klarna:
api_url: "https://..."
username: "..."
password: "..."

scalapay:
api_url: "https://..."
api_key: "..."

BNPL Flow

How It Works

  1. Checkout: the customer selects Klarna or Scalapay as their payment method
  2. Approval: the BNPL provider evaluates the customer and approves the installment plan
  3. Confirmation: the customer confirms the payment schedule
  4. Order creation: Logidav records the approved transaction and proceeds with fulfillment
  5. Settlement: the BNPL provider collects installments from the customer and settles with the merchant on a schedule

:::info Merchant risk With BNPL, the merchant receives the full payment from the provider (minus fees) regardless of whether the customer completes all installments. The credit risk sits with Klarna or Scalapay. :::

Error Handling

ScenarioBehavior
Customer not approvedOrder cancelled or alternative payment offered
Session expiredCustomer must restart checkout
Settlement delayMonitored; no action needed from Logidav
API timeoutRetry with backoff