Cookie Consent by Free Privacy Policy Generator Update cookies preferences

Hide Payment Methods at Checkout

Shopify Plus merchants can stop Clearpay being offered at the checkout for selected products.

📘

Note

This feature is for merchants with a Shopify Plus integration only.

Use this feature to hide the Clearpay and/or Cash App Pay payment methods at checkout for specific products that you, the merchant, choose.

📘

Note

You cannot use Shopify Scripts unless you already have the Script Editor installed. Shopify will not support Shopify Scripts after August 28th 2025. In future you can use Shopify Functions apps to customise your checkout.

To prevent your customers using Clearpay to pay for a specific product, tag that product as no-clearpay.

To implement this feature, do the following:

  1. Download the Script Editor Shopify App.
hide-checkout-1.png
  1. Add no-clearpay Shopify tags to each product that is not available to buy with Clearpay.

Create and Edit Script

Create the Script in the Editor

Once you have added the tags in step 2 above, you need to create the script. Do the following::

  1. Open the Script Editor Shopify App if it is not already open.

  2. Click Create Script.

  3. Select the Payment gateways tab, then click the Hide payment gateway radio button. See picture below:

hide-checkout-2.png

Edit the Script in the Editor

Use the Script Editor Shopify App to edit the following:

  1. Update the Title field.

  2. Set Channels radio button to Online Store only.

  3. Copy and paste the following code snippet into the Ruby source code section:

no_clearpay = Input.cart.line_items.any? { |line_item| line_item.variant.product.tags.include?('no-clearpay') }

Output.payment_gateways = Input.payment_gateways

if no_clearpay  
	Output.payment_gateways = Output.payment_gateways.delete_if { |payment_gateway|    payment_gateway.name.include?("Clearpay") }
end

📘

Note

You may need to edit this code snippet depending on your specific site setup and/or the product tags you decide to use for this purpose. This is a Shopify feature, so we (Clearpay) cannot give specific instructions for all cases and setups.

  1. Click the Save and publish button.

  2. Test the conditional Clearpay gateway visibility on selected products on your site's checkout page.

🚧

Warning

The script and tags described on this page do not apply to draft orders. These draft orders are created when you send the customer an invoice by email. Clearpay appears as a payment method on these invoices.