How to detect Klarna payment with transaction payment object

Shopify Partner
118 8 41

Hey,

I need to detect with the payments object wheather the payment was done via Klarna. I need this for the order printer template, otherwise people tranfer the money to my bank account if I don't give them the instruction to wait for the separate Klarna billing.

Unfortunately, {{ transaction.gateway | payment_method }} has "Credit Card" as a response even though the payment was chosen to be Klarna.

How can I detect the payment detail "Klarna"?

Thank you!!!

0 Likes
Shopify Partner
63 4 12

Hi @simonski ,

Are you using Klarna as a Shopify alternative payment method?  If so, you can find a Klarna value for your store's active Klarna gateway via the Shopify API, e.g.:

"kind": "sale",
"gateway": "slice_it_pay_over_time_with_klarna",

 

(above example data from an order's transaction data, as documented at: https://shopify.dev/docs/admin-api/rest/reference/orders/transaction)

Shopify Partner
118 8 41

@KristiAtKlarna 

Thank you for your response! No I'm using Klarna as a shopify payments option. Is there a way to recognise Klarna within shopify payments? Shopify support said they don't find any way unfortunately.

0 Likes
Shopify Partner
63 4 12

Hi @simonski ,

Unfortunately I can't help further as Shopify supports the Shopify Payments code; I concur that the specific payment method information is not available via the Shopify API for Shopify Payments orders.