This is a configuration example that hides the deferred payment method "Paidy(あと払い(ペイディ))" when the cart contains pre-order items. Because pre-order items carry a payment collection risk for deferred payment, use this when you want to prevent deferred payment from being selected for orders that include pre-order items.
Prerequisite: Payment setup must be complete. If it isn't, see "Initial Setup (Payment Limits)".
Prerequisite: Using "Pre-order items" as a product condition requires the RuffRuff Pre-Orders app.
You can check the behavior after setup in [Demo] Hide Paidy Only When Cart Includes Pre-Order Items.
When you enable the payment rule, checkout determines whether the cart contains pre-order items and switches the payment method's visibility accordingly.
Cart does not contain pre-order items: Paidy is shown.
Cart contains pre-order items: Paidy is hidden.
Note: "Pre-order items" are determined by whether the item in the cart has the _PreOrderRuleId attribute added by RuffRuff Pre-Orders. Items without this attribute are not treated as pre-order items, and the payment rule is not applied. This includes items that were added to the cart before being switched to pre-order, for example.
(1) Create a payment rule
Open the app admin → "Payment rules" → "Create rule".
(2) Enter the settings
Configure the following.
Field | Value |
|---|---|
Title | Any internal title |
Display mode | Hide the specified payment methods |
Payment methods | Enter "Paidy" or "あと払い(ペイディ)" directly, and set Match type to Exact match |
Languages | All languages |
Customers | All customers |
Products | Pre-order items |
Orders | All orders |
(3) Save and enable the payment rule
After saving the settings, select "Enable".
(4) Check the behavior
Proceed to checkout with a cart that contains pre-order items and one that doesn't, and check whether Paidy is displayed.
Make sure the payment method name matches the name shown at checkout, including uppercase and lowercase letters. If the name differs between Japanese and English, add both.
All conditions in the payment rule must be met (AND logic). If even one condition is not met, Shopify's payment settings are shown as is.