We’ve run into a problem with Klarna payments when cancelling orders via the Cancel API.
When the payment method is Klarna, and the order is cancelled using the Cancel API, the product amount is voided/refunded correctly but the shipping cost still remains on the order. This causes mismatches in totals and problems in downstream systems.
For example, in one of our test orders (paid through Klarna), after cancellation the line item was voided, but the £4.95 shipping charge was still left on the order record.
We expected the cancel call to remove both the product and shipping charges, since Shopify normally handles refunds automatically when cancelling orders with other payment methods. But with Klarna, this isn’t happening.
Questions for the community:
Has anyone else seen shipping amounts remain after cancelling Klarna orders?
Is this a limitation with Klarna’s integration on Shopify, or is there a specific flag/parameter we need to include in the Cancel API call?
What’s the recommended workflow to ensure shipping is refunded as part of cancellation for Klarna orders?
Any guidance or confirmation from others experiencing the same would be really helpful.
What you’re seeing with Klarna is might expected behavior: orderCancel doesn’t let you specify shipping, so I think this could be what’s happening here, especially if the payment itself was only authorized and not fully captured. Are you also fully capturing the shipping lines for payment? You can specifically request shipping refunds with the refundCreate mutation though. though.
If you’re open to sharing a sample order ID and the cancel/refund payloads you’re sending, I’d be happy to take a closer look though, especially if payment was fully captured since that would be odd.
Thanks for the explanation and prompt response! You were absolutely right about the capture method being the key factor, and we’ve now identified the exact scope of this issue.
Root Cause Confirmed: This problem is specifically with Klarna orders using manual capture. We’ve tested both scenarios and can confirm the behavior difference.
The Mathematical Inconsistency with Manual Capture: Looking at our manual capture test order, there’s a fundamental accounting problem:
Automatic capture + Klarna: Works correctly, no remaining balances
Other payment methods (manual or automatic): Handle cancellations properly without leaving shipping unpaid
Happens in Shopify admin too: Not an API-specific issue, occurs through admin interface as well
Business Impact: Merchants using manual capture with Klarna receive payment reminder emails for shipping on cancelled orders, creating operational confusion and requiring manual intervention.
Questions:
How can a £1,419.90 authorization be voided while £20.00 of that same authorization remains owed?
Is this mathematical discrepancy the intended behavior for manual capture + Klarna?
Should we use refundCreate to handle the shipping portion after cancelling manual capture Klarna orders, is that even possible?
Why does Klarna handle manual capture authorizations differently from all other payment methods?
The core issue is that this violates basic accounting principles - if the full authorization amount is voided, no portion of it should remain as an outstanding balance.
Thanks again, Alan! We really appreciate you looking into this.
Hey @Shubham_Vats, no worries, happy to help with this! Thanks for sharing that example order. I’ll reach out to some folks internally to see what might be causing this/to confirm expected behaviour with you. I’ll reach out as soon as I have more info to share on my end here.
Hey @Shubham_Vats - just following up with you here again. I was able to speak with our product team and the behaviour you’re reporting here does look like it could potentially be related to an ongoing issue we are aware of.
I can’t guarantee an exact turnaround time for the fix, but did just want to let you know that we do have an investigation open into this and I’ll loop back with you here as soon as I have more information to share or when I can confirm a fix
Hey @Shubham_Vats - thanks for following up. I don’t have a concrete update to share at the moment, but I will reach out internally to see if we have any further info to share, I’ll loop back with you here either way and keep an eye on things for you
Hey @Shubham_Vats , I was able to speak with our team on this for you, and while I don’t have additional info to share, I was wondering if you’d be open to providing more info on the impact you’re seeing on your end due to this (lost clients, etc).
If you’d like, I’d be happy to set up a direct message in the forums here so that we can discuss this and I can pass along your info to our team. I can’t guarantee if that will speed things up, but having additional info can help with my advocacy. Hope to hear from you soon!