3

I have enabled the below modules in Magento/2.4 (Enterprise) & configured klarna on the backend with a sandbox account.

Module 'Klarna_Core':
Module 'Klarna_Ordermanagement':
Module 'Klarna_Kp':
Module 'Klarna_KpGraphQl':

Place order from default Magento is working but I am not sure about the graphql mutation required to place an order with klarna using graphql.

need some advice on it.

21
  • Klarna payment method is already bundled with Magento 2. You can check it at Stores > configuration > Payment Methods.
    – Pawan
    Aug 6, 2021 at 11:00
  • You just need klarna API username and API password
    – Pawan
    Aug 6, 2021 at 11:01
  • 1
    if you are using "graphql", Klarna_KpGraphQl module will be sufficient.they already provide support for graphql
    – Pawan
    Aug 6, 2021 at 11:25
  • 1
    If you check "vendor/klarna/module-kp-graph-ql/etc/module.xml" file, Klarna_KpGraphQl is depends on Klarna_Kp so you need to enable both module.
    – Pawan
    Aug 7, 2021 at 6:02
  • 1
    Sure, I will try this.
    – Pawan
    Aug 11, 2021 at 7:54

3 Answers 3

1

Klarna payment method is already bundled with magento 2. You can check it at

Stores > configuration > Payment Methods

You just need klarna API username and API password

Note: If you are using "graphql", Klarna_KpGraphQl module will be sufficient.

Magento/klarna, already provide support for graphql

1

To install the module it's like all other magento module, either you get the code from an archive and you can just paste it to your code, either your have the access with composer and install it to the vendor.

Once installed, all the configuration process seems to be in the magento 2 official documentation : https://docs.magento.com/user-guide/payment/klarna-setup.html

1
+50

Below mutations needs to be executed for place order using klarna it also need the order to be authorized that will be done on client side.

Step 1 - createEmptyCart

Step 2 - addProductsToCart

Step 3 - setGuestEmailOnCart

Step 4 - setShippingAddressesOnCart

Step 5 - setBillingAddressOnCart

Step 6 - setShippingMethodsOnCart

Step 7 - createKlarnaPaymentsSession

Step 8 - Authorize the order to klarna api

Step 9 - setPaymentMethodOnCart

Step 10 - placeOrder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.