How to identify Klarna orders in REST API?

9 1 0

Dear community,

we have integrated Klarna as payment gateway in our shop. We transfer all order data via REST API to our WMS but are wondering how to identify Klarna orders in the transferred data? Looking at some real Klarna orders we can not find any hint in the JSON files (but we need them to print a big disclaimer on our invoices not to pay to our bank account).

Thank you!


Kurt from KooKoo

Replies 3 (3)
Shopify Partner
144 10 28

Hi @kookoo ,

As documented at &

you can find Klarna information in these fields from the Shopify API JSON response, e.g. 

"payment_gateway_names": [


and from the order's transaction data:

"transactions": [
"id": 317649312345,
"order_id": 258053212345,
"kind": "sale",
"gateway": "buy_now_pay_later_with_klarna",
"status": "success",
"message": "Completed",
"created_at": "2020-09-30T11:07:00-04:00",
"test": true,
"authorization": "this will be the Klarna order id",
"processed_at": "2020-09-30T11:07:00-04:00",
"receipt": {
"x_account_id": " this will be the Klarna merchant id",
"x_gateway_reference": "this will also be the Klarna order id",

15 0 3

Dear Kristi,

do you also know a possibility to check that an order is paid with Klarna, if it was paid through the shopify_payments gateway?

I tried the endpoints you suggested, buy since I can't find any of the required fields(gateway, x_gateway_reference, payment_gateway_names), I guess that those only work on the "pure" Klarna gateway.

On /admin/api/2020-01/orders/<id>/transactions.json I found the field: transaction.receipt.payment_method_details.type = "klarna", but since this is so deeply nested, I am not sure, if it is reliable information on every order.

Many Greetings,


Shopify Partner
144 10 28

Apologies for the delayed response on this; Shopify support would need to answer the question about Shopify Payments gateways, as they support that code, per: