Klarna Checkout – Recurring payments
Klarna Checkout is compatible with the WooCommerce Subscriptions extension for handling of recurring payments (in Sweden, Norway, Finland, Germany & Austria).
- Your Klarna Checkout MID needs to be configured to enable recurring payments. Get in touch with Klarna to activate this feature, your Klarna account/MID does not support recurring payments by default.
- The extension WooCommerce Subscriptions installed and configured.
Get started with subscriptions
- Create a simple subscription product. Set it to a daily renewal so that we can test the renewal process as well.
- Make a test purchase (either with a real account or a test account).
- Make sure that:
1. The subscription order is created in both Klarna and WooCommerce.
2. A Klarna reservation number is added to the order notes in WooCommerce.
3. A Klarna recurring token is added to the Subscription.
4. The subscription status is set to Active in WooCommerce.
- Wait 24 hours and check that the renewal order is created, a new reservation number from Klarna is added to the order notes in the renewal order and the subscription is set to Active again.
Don’t have time to wait for the renewal to be triggered?
- Navigate to the subscription (→ WooCommerce → Subscriptions) you want to test.
- In the right column you should see a box named Billing Schedule.
- Click the date field of the Next Payment section. A calendar is now displayed where you can select todays date. The nearest time you can set the renewal to be triggered is 1 hour in the future.
- Wait 1 hour for the renewal to be triggered and then make sure the renewal and subscription behaves as explained in the Get started with subscriptions section.
Failed renewal orders
Failed payment flow
By clicking the Pay now link, the customer is redirected to the checkout page to pay for the order and re-activate their subscription.
After the customer have finalized the purchase, the subscription is set to Active again and the Subscription notes will look similar to this:
In general failed renewal payments with a 4xx error code should be treated as a failed payment where the customer need to take action and click the Pay now link in the email to re-activate their subscription.
Change the recurring token
In some cases you might need to change or add the Klarna recurring token. This can be done by navigating to the specific subscription and clicking on the pen icon next to the Billing address data.
Now the Klarna recurring token input field is possible to edit.
When you have changed the data in the input field, remember to click on the Update button in the top right meta box.
Update payment method from My account page
If the customer wants to change the payment method selected in KCO for the subscription, they can login to My account and then navigate to the subscription. From this view they can click the Change payment button.
- This will send the customer to the checkout page where Klarna Checkout is selected again as the payment method.
- By clicking on the Change payment method button the customer is redirected to a Pay for order page. However, the amount of this order is set to 0.
- Finally the customer is redirected back to the subscription page and can se a notice about the subscription payment method being updated.
Move subscriptions from v2 platform to v3 platform
Subscriptions in WooCommerce Klarna Gateway (the old Klarna plugin) are created with a Klarna recurring token. This recurring token is saved in the subscription post meta field:
_klarna_recurring_token. In Klarna Checkout for WooCommerce (the new Klarna plugin) this recurring token is saved in the post meta field:
These are the steps to move a subscription order from WooCommerce Klarna Gateway to Klarna Checkout for WooCommerce:
- Make sure you are running version 2.7.6 or higher of the WooCommerce Klarna Gateway plugin.
- Sign up for a new Klarna Checkout v3 account that has recurring payments activated.
- Get in touch with Klarna and ask them to export your current subscriptions from the v2 platform to v3 platform.
- Install and configure Klarna Checkout for WooCommerce plugin (minimum version 2.3.0) in your WooCommerce store. Make sure that everything works with creating a new subscription and a renewal order.
- Keep the WooCommerce Klarna Gateway plugin active but disable the payment method in the payment gateway settings.
- Navigate to one active subscription where WooCommerce Klarna Gateway is the selected payment method.
- Change the payment method to Klarna Checkout for WooCommerce and save the subscription.
- Trigger a renewal payment for the subscription.
- Make sure that the renewal payment is ok and the subscription has the status Active.
- When you have confirmed that a renewal payment works as expected, you can now go ahead and change the payment method for the remaining subscriptions from WooCommerce Klarna Gateway to Klarna Checkout for WooCommerce. This has to be done manually or via custom code.
_kco_recurring_tokenis missing in a subscription, the Klarna Checkout for WooCommerce plugin will look for
_klarna_recurring_tokeninstead. If a
_klarna_recurring_tokenis found it will then be stored as
_kco_recurring_tokenin the subscription and a renewal payment request will be triggered.
No subscription is being created. When a customer signs up there is only a regular order created.
This is usually happening because a new customer account wasn’t created.
The most common reason for this is that the account settings described in the Requirement section isn’t configured correctly.
No renewals are triggered at all
When is a pending subscription created?
A pending subscription is created at the same time as when a pending order is created.