Unable to change payment method name (except first payment provider) using script editor

Topic summary

Issue: Renaming payment gateway labels via Shopify Script Editor works for the first gateway but fails for others (e.g., “Merchant Warrior Card Payments”). The provided Ruby script executes the change_name line and prints expected output, yet only “POLi Internet Banking” (first in list) updates.

Technical context: Shopify Script Editor lets merchants modify checkout via Ruby scripts. The “Payment API” refers to a newer integration method for payment apps that may impose additional restrictions.

Support feedback: Shopify Plus support states some gateways contractually prevent renaming, making this behavior expected and outside Shopify’s control. Merchants are advised to contact the payment gateway provider for confirmation.

Documentation gap: Shopify’s help page examples indicate renaming is possible, but the thread notes prior success that no longer works, suggesting changes or exceptions not documented. An attached screenshot of the help page is central to this point.

Recent update: Another developer reports the same issue with a payment application using the new Payment API, reinforcing that limitations may apply broadly to newer integrations.

Outcome: No official fix. A workaround is client-side JavaScript to alter the displayed name after page load, acknowledged as not ideal but functional. The discussion remains open with unresolved questions about API and documentation limitations.

Summarized with AI on February 5. AI used: gpt-5.

There is bug in Shopify script editor for Payments script.

I wanted to change name of payment gateway. My script is working correctly for 1st payment gateway name, BUT.. I want to change name of 3rd gateway. It is not working.

Below is actual order of payment gateway :

POLi Internet Banking

Zip - Buy now, pay later

Merchant Warrior Card Payments

Below is the code of script. It does not gives expected outside. (It do not change name of payment gateway - Merchant Warrior Card Payments )
I have printed names using “puts” & change name code line is executing, still it does not works.

But.. when I tried “POLi Internet Banking” & it successfully changed its name. As it is FIRST payment gateway.

CHANGE_GATEWAYS_NAME = [
  {
    gateway_match_type: :exact,
    gateway_names: ["Merchant Warrior Card Payments"],
    newname: "Secure Card Payments"
  },
]

# ================================ Script Code (do not edit) ================================
# ================================================================
# GatewayNameSelector
#
# Finds whether the supplied gateway name matches any of the
# entered names.
# ================================================================
class GatewayNameSelector
  def initialize(match_type, gateway_names)
    @comparator = match_type == :exact ? '==' : 'include?'
    _names = gateway_names.map { |name| name.downcase.strip }
  end

  def match?(payment_gateway)
    _names.any? { |name| payment_gateway.name.downcase.strip.send(@comparator, name) }
  end
end

# ================================================================
# ChangeNameGatewaysCampaign
# ================================================================
class ChangeNameGatewaysCampaign
  def initialize(campaigns)
    @campaigns = campaigns
  end

  def run(cart, payment_gateways)
    @campaigns.each do |campaign|
      
      gateway_name_selector = GatewayNameSelector.new(
        campaign[:gateway_match_type],
        campaign[:gateway_names],
      )

      payment_gateways.each do |payment_gateway|
        if gateway_name_selector.match?(payment_gateway)
          payment_gateway.change_name(campaign[:newname])
        end
      end
    end
  end
end

CAMPAIGNS = [
  ChangeNameGatewaysCampaign.new(CHANGE_GATEWAYS_NAME),
]

CAMPAIGNS.each do |campaign|
  campaign.run(Input.cart, Input.payment_gateways)
end

Output.payment_gateways = Input.payment_gateways

Can anyone please help ? Shopify support specialist, please.

hi

I have the same problem, Plus Support told me the following:

If you have tried renaming the payment gateway and it revert back to its original name, then it is likely something potentially contractual with the payment gateway which is preventing the gateway from being renamed. And this is an expected behaviour which Shopify does not have control over. If you’d like to clarify this, you may reach out to the payment gateway provider to see if they can confirm that for you.

1 Like

Thank you @m8th . Yes I got similar answer from support.

I posted this question before receiving their reply.

Problem was that, SAME code was working for SAME gateway before that day. Never mind.

I believe, Shopify should have mention this kind of behavior/conditional things on their help page.

On this page https://help.shopify.com/en/manual/checkout-settings/script-editor/examples/payment-gateway-scripts they say it’s possible.

1 Like

Hi,

As per the same exploration on our side, this might be connected to some restrictions for the new integration type - via the new Payment API. Same sample script isn’t working with our payment application as well.

Hope this helps a bit to clarify.

Thanks and regards,

Nikita

Hello Sanket, have you found a solution to this problem? If so, can you share?

@MarianaZ No. there is no solution.

I used JavaScript and did that after page load. Not a good or suggestion but..my client wanted anyhow and it does not have any side effects. So I did.