# Hide payment methods, like cash on delivery (COD)

> Hide specific payment methods at checkout, like Cash on Delivery, when the cart, customer or address matches your conditions.

Source: https://backtrackhq.com/docs/rules/hide-payment-methods/

"Hide specific payment methods at checkout based on conditions." For
example, hide Cash on Delivery when the order total is high, or when
the shopper ships abroad.

## Before you start

- Note the exact names of your payment methods as shoppers see them
  at checkout, for example "Cash on Delivery (COD)".
- Payment rules aren't compatible with Shop Pay. They also don't show
  while you build a draft order in the Shopify admin. See
  [Limits](#limits).

## Set it up

1. **Open Rules and click Create rule.**

   (Screenshot: The Rules page with the Create rule button)

2. **Under Payment, find Hide payment methods and click Select.**

   (Screenshot: The Hide payment methods card on the Choose rule type page)

   On the rule page, name the rule, or click **Start from a use case**
   to fill in the whole form. The name is for your reference only.
   Shoppers don't see it. See
   [Start from a use case](https://backtrackhq.com/docs/building-rules/use-cases/).

3. **Pick a rule set and add your conditions.**

   In **Rule sets**, pick the set with the conditions you need. Each
   set offers a different group of conditions, because Shopify limits
   how much data one function can read. Hover a set to preview it, or
   use **Search for a condition...**.

   Then, under **When at checkout**, pick a condition, an operator and
   a value. For example **Order total amount**, **is greater than or
   equals**, and your amount. Use **Add another rule** for more
   conditions. See
   [Conditions, groups and blocks](https://backtrackhq.com/docs/building-rules/conditions-and-groups/).

   (Screenshot: A rule block with an Order total amount condition)

4. **Pick an action and add the payment methods.**

   Under **If all the above rules are matched then**, choose **Hide
   the payment methods added below**. Click **Add a payment method**,
   pick **Contains** or **Is** and type the method name.

   (Screenshot: The hide action with Cash on Delivery added)

5. **Save it as a draft, test it, then activate it.**

   In the **Status** card, choose **Draft** and save. Then go to
   checkout on your store and enter the [test email](https://backtrackhq.com/docs/get-started/test-before-going-live/) from the rule's **Status** card.
   Only this email sees a draft rule. Add products that match your conditions and check the payment methods.

   (Screenshot: The Status card set to Draft with the test email hint)

   When it works, choose **Activate** in the **Status** card and save.

## Actions

Pick one action per rule block. To hide different methods for
different conditions, add another rule block.

### Hide the payment methods added below

Hides only the payment methods you add to the list.

### Hide all payment methods

Hides every payment method. Shoppers can't pay, so use it with care.
For example, pair it with a validation message.

### Only show the payment methods added below

Shows the methods you add and hides all others. Use it when you want
an allow-list, for example "only Credit card for this country".

## Settings

(Screenshot: The Hide payment methods rule page with its settings cards)

### Rule name

Up to 70 characters. "For your reference only. Not shown to
customer."

### Rule sets

Choose which group of conditions the rule can check. You pick the
conditions inside the rule block.

### Payment method name

Each row has a match type and a name.

Options: Contains, Is. Default: Contains.

**Contains** matches part of the name, for example "Cash" matches
"Cash on Delivery (COD)". **Is** needs the full name.

### Status

Options: Draft, Activate, Deactivate.

## Examples

Open **Start from a use case** on the rule page and pick one of these:

- **Hide COD for high-value orders:** hides Cash on Delivery when the
  order total is at or above an amount you set. See
  [Example: hide cash on delivery](https://backtrackhq.com/docs/rules/example-hide-cash-on-delivery/).
- **Hide COD for international orders:** hides Cash on Delivery when
  the shipping country is not your home country.
- **Hide payment for guest customers:** hides Cash on Delivery when
  the shopper is not logged in.

## Limits

The **Limitations** card on the rule page lists:

- "Payment rules don't support draft orders."
- "Payment rules aren't compatible with Shop Pay."

Inside Shop Pay, only gift cards can be changed. Rules don't run in
Shopify POS. See [Limits](https://backtrackhq.com/docs/rules/limits/).
