How to block a payment method for specific products

Topic summary

Core Issue:
Merchants need to disable Klarna (or other payment methods) for products with specific tags—particularly pre-order items that exceed Klarna’s 28-day authorization window.

Solutions by Store Type:

For Shopify Plus merchants:

  • Use Shopify’s Script Editor app to write custom scripts
  • Klarna provides specific code examples in their merchant guide documentation
  • Contact Klarna support (skosm@klarna.com) for implementation assistance

For non-Plus merchants:

  • Originally no native solution available (Shopify doesn’t support checkout customizations on basic plans)
  • As of 2024, third-party apps now enable this functionality:
    • BeSure Checkout Rules
    • PayRules: Hide Payment Methods
    • Bony: Checkout Rules & COD

Implementation Process (via apps):

  1. Create a “hide payment methods” rule
  2. Set condition based on product tags
  3. Select which payment method to hide (e.g., Klarna)
  4. Payment method automatically hides only when tagged products are in cart

Limitation Noted:
One user reported that blocking a gateway via script doesn’t prevent it from appearing as an “Express Checkout” option on the first checkout screen.

Summarized with AI on October 26. AI used: claude-sonnet-4-5-20250929.

We would like to disable a specific payment method when specially tagged products are in the cart. The problem is that one of our external payment methods (Klarna) can only auth a credit card for 28 days, but in the case of items available for pre-order, the items might not become available for two months or more. So we would like to disable Klarna when the cart includes products that have specific tags. Is this possible? (note: we are a Plus store)

I’m trying to get help with this exact issue. @KristiAtKlarna maybe you can help us? Thank you!

Hi @eitan_sperling -

Hiding a payment provider based on products in the cart can be done with custom Shopify scripts, see https://help.shopify.com/en/manual/apps/apps-by-shopify/script-editor, but custom scripts are only available for Shopify Plus merchants. If you are Shopify Plus and need further examples or support, please let us know; you can open a support case with us by emailing: skosm@klarna.com

Hi did you manage to do this? Please help?

did you manage to get any help with this? Any advice would be appreciated…:slight_smile:

Hi @LastNut ,

Is your store Shopify Plus? If so, you can write custom scripts via the “Script Editor” app in your Shopify store. Shopify provides starting code examples, but Klarna specific examples also documented at: "Shopify Plus: custom scripts " section at https://x.klarnacdn.net/plugins/Klarna%20Payments%20on%20Shopify%20-%20Merchant%20Guide.pdf

not Shopify Plus

Hi again @LastNut ,

Unfortunately as your store is not Shopify Plus, Shopify doesn’t support customizations to your checkout.

so are you able to add the code yourself?

@LastNut - No, we are not able to add code, as it is Shopify code that serves the Shopify checkout page displaying the payment methods, so we aren’t able to run code to change that page if not supported by Shopify.

I have blocked amazon pay as a gateway using a script on our Shopify Plus store. But amazon pay is still showing up as an “Express Checkout” payment method from the first screen of the checkout.

Is there anyway to also block it there for specific products?

I am in the same boat I sell Gift cards, but cant block them because I dont have shopify plus, but I can sell my other products. klarna are aware of this limation, but I still get told by Klarna I cant sell gift cards using Klarna

1 Like

You can easily do this now, even if you are on Shopify basic plan. You will need to use the BeSure Checkout Rules app. After installing the app, please follow these steps,

  1. Create a rule for “Hide payment methods”.
  2. Inside the rule, select the condition of when “Product tags” has these values and enter the names of the product tags for which you want to hide Klarna or any other payment method.
  3. In the “hide these payment methods” section, select Klarna to hide it. Click on create rule and done.

With this rule setup, you can continue to use Klarna to receive payments, but when your tagged product is in the cart, then it will automatically hide Klarna for that checkout only. Cheers!

It’s now possible in 2024. You can disable a specific payment method for specially tagged products using the PayRules: Hide Payment Methods app. Here’s how you can do it:

  1. Add the specific payment method like “Klarna” in the “Additional payment methods” field.
  2. In the “Tags” field, select “Hide if found” and add the specific product tag like the screenshot below.

This will ensure that Klarna is disabled when the cart includes products with specific tags.

Hello there,

Now you can try with Bony: Checkout Rules & COD . After you installed, pls follow these steps:

  1. On the home page, please click “Create a payment rule” to navigate to payment rule page

  1. On the payment rule page, please setup like these images below:

Hope this helpful