> This page is for version v2 (default).
> For other versions, use one of these documentation indexes:
> - v2 (default): https://developers.clearpay.co.uk/v-2/llms.txt
> - v1: https://developers.clearpay.co.uk/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.clearpay.co.uk/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.clearpay.co.uk/_mcp/server.

# Hide Payment Methods at Checkout

> **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](https://apps.shopify.com/script-editor).

![hide-checkout-1.png](/_fern-img/958ab0f980866ffeabbb92bae65990d6ff0a45513c19e560ac5734e32a39e143.webp)

2. Add **no-clearpay** [Shopify tags](https://help.shopify.com/en/manual/shopify-admin/productivity-tools/using-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](https://apps.shopify.com/script-editor) 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](/_fern-img/ee2455aa893e6573882f600dc0026cf130b393837f0da43b5bfea30bbee02d48.webp)

### Edit the Script in the Editor

Use the [Script Editor Shopify App](https://apps.shopify.com/script-editor) 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:

```unset
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.

4. Click the **Save and publish** button.

5. 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](https://help.shopify.com/en/manual/orders/create-orders#email-invoice). Clearpay appears as a payment method on these invoices.