Skip to main content

Klarna Invoice (Pay Later)

Klarna Invoice lets your customers receive their order first and pay later — within 14 or 30 days of delivery. Rather than requiring payment at checkout, the customer simply confirms their purchase and receives an invoice. This can increase conversion rates, especially for first-time buyers who are hesitant to enter card details or pay before seeing the goods.

This plugin is dedicated to the Klarna Pay Later / Invoice payment type only. It does not offer on-site card widgets, saved payment methods, or subscriptions. Checkout works via a Klarna-hosted payment page (HPP redirect), keeping payment entry completely off your site.

Requirements

  • J2Commerce 6.0 or later installed and active
  • Joomla 6.0 or later
  • A Klarna merchant account with Pay Later / Invoice activated for your region
  • Your site must be accessible over HTTPS for Klarna callbacks to reach it

Installation

This plugin is a separate add-on available from the J2Commerce Extensions Store. It is not included with the core J2Commerce 6 component.

Step 1: Go to the J2Commerce website -> Extensions and purchase the Klarna Invoice plugin.

Step 2: Download the payment_klarnainvoice.zip file from your My Downloads page.

Step 3: In your Joomla admin, go to System -> Install -> Extensions, upload the ZIP file, and click Upload & Install.

The plugin installs and enables automatically.

Set Up a Klarna Merchant Account

If you already have Klarna API credentials with Pay Later enabled, skip to Enable the Plugin.

  1. Sign up for a Klarna merchant account at klarna.com if you do not already have one.
  2. Log into the Klarna Merchant Portal.
  3. Go to Settings -> API credentials.
  4. Note your API Username (UID) and generate an API Password.
  5. Confirm that the Pay Later / Invoice payment method is activated for your merchant account and region. If it is not visible, contact Klarna merchant support.
  6. For testing, create a separate set of sandbox/playground credentials — keep both sets handy.
tip

Klarna's Pay Later / Invoice availability varies by country and merchant agreement. If invoice is not available in your Klarna Merchant Portal, contact Klarna to have it activated before configuring this plugin.

Enable the Plugin

After installation, go to J2Commerce -> Payments -> Payment Methods in your Joomla admin.

Find Klarna Invoice in the list. Click the toggle in the Enabled column to turn it on (it turns green), then click the plugin name to open its settings.

Configure the Plugin

Display Settings

FieldDescriptionDefault
Display NameThe payment method name shown to shoppers at checkout — e.g., "Pay Later with Klarna"Klarna
Display ImageOptional logo or badge shown alongside the payment option at checkout(none)

Invoice Due Days

FieldDescriptionDefaultOptions
Invoice Due DaysNumber of days the customer has to pay the invoice after delivery1414, 30

This setting controls the payment term shown to the customer at checkout — for example, "Pay within 14 days of delivery." The value you select must match the invoice payment terms configured in your Klarna merchant account.

Transaction Type

ValueDescription
Authorize and CapturePlaces and immediately captures the Klarna invoice when the order is confirmed. Recommended for most stores.
Authorize OnlyHolds the invoice authorization without confirming it. You capture manually from the order view when you are ready to dispatch the order.

Region

Select the Klarna API region that matches your merchant account. Using the wrong region causes authentication errors.

RegionUse when
Europe (EU)Your Klarna account is registered in a European country
North America (NA)Your Klarna account is registered in the US or Canada
Oceania (OC)Your Klarna account is registered in Australia or New Zealand

Sandbox Mode

Toggle Sandbox Mode on while you are testing. In sandbox mode no real payments are processed and Klarna uses its playground environment. Turn this off before going live.

warning

The Sandbox API credentials are separate from your live credentials. Fill in both sets so you can switch environments without losing your production keys.

API Credentials

Two credential sets are available — fill in both. The plugin automatically uses whichever set matches the current Sandbox Mode setting.

Live credentials (shown when Sandbox Mode is Off):

FieldDescription
API Username (UID)Your live Klarna API username — typically a UUID starting with a region prefix such as PK99999_...
API PasswordYour live Klarna API password

Sandbox credentials (shown when Sandbox Mode is On):

FieldDescription
Sandbox API UsernameYour playground/sandbox Klarna API username
Sandbox API PasswordYour playground/sandbox Klarna API password
info

Unlike the full Klarna Payments plugin, this invoice-only plugin does not require a Client Identifier because it uses Klarna's Hosted Payment Page redirect rather than an on-site widget.

B2B Invoice (Optional)

FieldDescriptionDefault
Enable B2BAllow business customers to use their company registration number for invoice paymentNo
Company NumberYour business registration or company number for B2B invoicing (shown when Enable B2B is Yes)(blank)

Enable this if your store sells to businesses and you want to offer Klarna's business invoice option alongside the standard consumer invoice.

Callback URLs

The plugin displays read-only callback URLs that you register in your Klarna Merchant Portal so Klarna can notify your store of payment events.

CallbackPurpose
Authorization CallbackCalled when a shopper authorizes invoice payment
Fraud NotificationCalled when Klarna flags a transaction for review
HPP Status UpdateCalled when the Hosted Payment Page session status changes

Copy each URL using the Copy button and paste it into the corresponding field in your Klarna Merchant Portal.

info

Callback URLs only work when your site is publicly reachable over HTTPS. They do not function on local development environments. Use a tunneling tool such as ngrok to test callbacks locally.

Order Status Automation

These settings control which order status J2Commerce applies at each point in the payment lifecycle.

FieldDescriptionDefault
Payment Order StatusStatus applied when invoice payment is successfully confirmed and captured(your configured "Confirmed" status)
Authorized Order StatusStatus applied when payment is authorized but not yet captured (used with Authorize Only mode)(your configured "Pending" status)
Update Status on CancelAutomatically change the order status when an authorization is voidedNo
Cancelled Order StatusStatus to apply when an authorization is cancelled (shown when Update Status on Cancel is Yes)
Update Status on RefundAutomatically change the order status when a refund is processedNo
Refunded Order StatusStatus to apply when a full refund is issued (shown when Update Status on Refund is Yes)
Partial Refund Order StatusStatus to apply when a partial refund is issued (shown when Update Status on Refund is Yes)

Layout (Subtemplate)

FieldDescriptionDefault
LayoutChoose the checkout template — Bootstrap 5 (default) or UIkit — to match your site's frontend framework(auto)

Surcharge (Optional)

If you want to pass a payment handling fee on to customers who choose Klarna Invoice, complete these fields. Leave them blank if you do not charge a surcharge.

FieldDescription
Surcharge NameLabel shown to the customer at checkout — e.g., "Invoice fee"
Surcharge PercentPercentage of the order total added as a fee — e.g., 1.5 for 1.5%
Surcharge FixedFixed amount added to every Klarna Invoice order — e.g., 0.50
Surcharge Tax ClassTax profile to apply to the surcharge amount

Availability Restrictions (Optional)

FieldDescription
Geozone RestrictionLimit Klarna Invoice to customers in a specific geozone. Leave blank to offer it to all locations.
Minimum SubtotalKlarna Invoice is only shown when the cart subtotal is at or above this amount. Enter 0 for no minimum.
Maximum SubtotalKlarna Invoice is hidden when the cart subtotal exceeds this amount. Enter -1 for no maximum.

Custom Messages (Optional)

These text areas let you insert custom HTML or text at specific points in the checkout flow.

FieldWhen it appears
On SelectionWhen the customer selects Klarna Invoice as their payment method
Before PaymentDirectly before the Klarna redirect button appears
After PaymentAfter a successful payment is confirmed
On ErrorWhen a payment error occurs
On CancelWhen the customer cancels and returns from the Klarna payment page

Thank-You Article (Optional)

Use the Thank You Message field to link a Joomla article that will be displayed to the customer after a successful Klarna Invoice payment, in addition to the standard J2Commerce order confirmation.

Dashboard Icon (Optional)

FieldDescriptionDefault
Show Dashboard IconAdd a Klarna Invoice shortcut to the J2Commerce dashboardNo
Dashboard Icon LabelLabel text for the dashboard shortcut (shown when Show Dashboard Icon is Yes)

Debug Logging

FieldDescriptionDefault
Debug LoggingLog Klarna API requests and responses to the Joomla system log. Useful for troubleshooting — turn off in production.No

Click Save in the toolbar when you have finished configuring the plugin.

How Checkout Works

When a shopper selects Klarna Invoice at checkout:

  1. The plugin creates a Klarna Hosted Payment Page (HPP) session using your API credentials.
  2. The checkout page shows the invoice due period — for example, "Pay within 14 days of delivery."
  3. The shopper clicks Place Order, and the plugin immediately redirects them to Klarna's hosted payment page.
  4. The shopper reviews the invoice terms and confirms their identity on the Klarna page.
  5. Klarna redirects the shopper back to your store and sends a callback to confirm the payment result.
  6. The plugin updates the order status and shows the customer their order confirmation.
info

Because this plugin uses Klarna's Hosted Payment Page, the entire invoice authorization happens on Klarna's servers — your site never handles any sensitive payment data.

Managing Orders

Once a Klarna Invoice payment is placed, the J2Commerce order view shows additional payment actions based on your Transaction Type setting.

Capture an Authorized Payment

When Transaction Type is Authorize Only, a Capture button appears in the order view. Click Capture to confirm the invoice with Klarna and trigger the payment period for the customer. This is the step that starts the clock on the invoice due date.

Void an Authorization

Before capturing, click Void to cancel the invoice authorization. This releases the hold without generating an invoice for the customer. Voiding cannot be undone.

Release Remaining Amount

If you have partially captured an order, a Release Remaining button allows you to release the uncaptured portion back to the customer. This is useful when an item in the order is out of stock and cannot be fulfilled.

Issue a Refund

After an invoice is captured, click Refund in the order view to return funds to the customer. You can issue:

  • A full refund for the entire captured amount
  • A partial refund for a specific amount (enter the amount in the refund field)

Payment Balance

The order view also shows a Payment Balance card summarizing:

  • Order Total — the original order amount
  • Refunded — the total amount refunded so far
  • Net Paid — the amount the customer has effectively paid after refunds
  • Balance Due — any outstanding amount remaining

Tips

  • Start with Sandbox Mode on — Complete a full end-to-end test (checkout, capture, and refund) before switching to live credentials.
  • Register all three callback URLs — Missing even one URL in your Klarna Merchant Portal can prevent order statuses from updating automatically.
  • Use Authorize Only for pre-orders or made-to-order goods — Capture the invoice only when you are ready to dispatch, so the invoice due period starts from actual delivery.
  • Match Invoice Due Days to your account — If your Klarna merchant agreement specifies 30-day invoices, set Invoice Due Days to 30. A mismatch can cause Klarna to reject the session.
  • Enable B2B only if needed — Turning on B2B does not affect consumer invoice orders; it only adds the company number option for business buyers.
  • Turn off Debug Logging in production — Debug logs can contain sensitive API response data.

Troubleshooting

Klarna Invoice Does Not Appear at Checkout

Cause: Missing or incorrect API credentials, wrong region selected, or the shopper's cart total is outside your Minimum Subtotal / Maximum Subtotal limits.

Solution:

  1. Go to J2Commerce -> Payments -> Payment Methods -> Klarna Invoice.
  2. Confirm Sandbox Mode matches the credentials you have entered — sandbox credentials only work in sandbox mode.
  3. Verify the API Username and API Password are filled in correctly for the active mode.
  4. Confirm the Region matches the country your Klarna merchant account is registered in.
  5. Check Minimum Subtotal and Maximum Subtotal against the current cart total.
  6. Enable Debug Logging, attempt checkout, then review the Joomla system log for API error details.

Order Stays in Pending After Klarna Redirect

Cause: Klarna callbacks are not reaching your server. The callback URLs may not be registered in the Klarna Merchant Portal, or your server is blocking inbound requests from Klarna.

Solution:

  1. Open the plugin settings and copy the Authorization Callback URL.
  2. Log into your Klarna Merchant Portal and confirm that URL is registered as a callback endpoint.
  3. Confirm your site is publicly reachable over HTTPS (callbacks do not work without a public HTTPS address).
  4. Enable Debug Logging and check your server logs to see whether Klarna is sending requests and whether they are succeeding.

"Klarna API credentials are not configured" Error

Cause: The API Username or Password fields are empty for the active mode (sandbox or live).

Solution:

  1. Go to J2Commerce -> Payments -> Payment Methods -> Klarna Invoice.
  2. Check whether Sandbox Mode is on or off.
  3. Fill in the matching credential fields — Sandbox API Username and Sandbox API Password for sandbox mode, or API Username and API Password for live mode.
  4. Click Save.

Sandbox Warning Appears on Live Store

Cause: Sandbox Mode is still enabled after going live.

Solution:

  1. Go to J2Commerce -> Payments -> Payment Methods -> Klarna Invoice.
  2. Set Sandbox Mode to No.
  3. Confirm the API Username and API Password fields under the live credentials section are filled in with your live Klarna credentials.
  4. Click Save.

Klarna Invoice Not Available for Certain Customers

Cause: A Geozone Restriction, Minimum Subtotal, or Maximum Subtotal rule is filtering the method out, or Klarna's own eligibility rules are excluding those customers based on region or credit assessment.

Solution:

  1. Review the Geozone Restriction field — if set, confirm the customer's shipping address falls within that geozone.
  2. Check the Minimum Subtotal and Maximum Subtotal values against the customer's cart total.
  3. Confirm that Klarna Invoice is activated and available for the customer's country in your Klarna Merchant Portal.