Skip to content

Payment method rules

Applies toShopify

Steps for

How it works

A rule belongs to one payment method in one customer group. It has 2 parts:

  • When: the conditions the order must meet, such as an order sub-total of at least £500. A rule with no conditions applies to every order.
  • Then: the outcome. Apply a discount, Apply a surcharge or Hide this payment method.

An order must meet every condition on a rule for it to apply. Every rule that applies is used, so a method can have a discount and a surcharge at the same time. There's no priority to set: SparkLayer always works them out in the same order.

How payment method rules are applied to an order

Hide rules

A method with a matching hide rule isn't shown, and its other rules don't apply
(this flows forward)

Discounts

Your normal discounts, then payment rule discounts, off the net sub-total
(this flows forward)

Surcharges

Added to the net sub-total after every discount
(this flows forward)

Shipping and tax

Worked out with the surcharge included

Check surcharge laws where you sell

Laws on surcharges, and on charging different amounts for different payment methods, vary by country and region. Some places limit or ban surcharges on certain payment methods. Check the rules in every country you sell to before you add a surcharge. You're responsible for making sure your rules comply: SparkLayer doesn't check them against any law.

A worked example

A customer pays by card for £1,000 (net) of products, with a 10% off coupon. Card at checkout has 2 rules:

  • Rule 1: a 5% discount, with no conditions.
  • Rule 2: a 2% surcharge, when the order sub-total is at least £500.
StepAmountOrder sub-total
Products£1,000.00£1,000.00
10% off coupon-£100.00£900.00
Rule 1: 5% of £900.00-£45.00£855.00
Rule 2: 2% of £855.00+£17.10£872.10
Shipping and taxWorked out on £872.10

Rule 2's minimum is checked against £900.00: the sub-total after the coupon, before the payment rule discount. See Which sub-total conditions use.

Add a rule

  1. Go to SparkLayer Wholesale,Customers,Customer groups (in your Shopify admin) and click the group's name. To add rules for every group, click Edit on the base customer group.
  2. If Payment methods is under Inherited rules, click + Override next to it (on the base group, + Customize).
  3. Under a ticked payment method, click Add rule.
  4. Under When, tick the conditions the order must meet and fill them in. To apply the rule to every order, leave them all unticked.
  5. Under Then, choose Apply a discount, Apply a surcharge or Hide this payment method.
  6. For a discount or surcharge, choose Percentage or Fixed amount, and enter the amount.
  7. Click Update customer group.
More detail
  • Groups that inherit the Payment methods rule inherit its payment method rules too.
  • Unticking a payment method deletes its rules when you save.
  • Reset on the Payment methods rule deletes the group's rules, and the group goes back to the inherited methods and rules.

Conditions

ConditionThe rule applies whenNotes
Order sub-totalThe order's net sub-total is between the Minimum and MaximumExcludes shipping and tax. See Which sub-total conditions use
Order itemsThe number of items is between the Minimum and MaximumCount the Quantity across all line items or the Number of line items. Free products from discounts and custom line items count
Available creditThe customer's remaining credit is between the Minimum and MaximumHow much credit they have left on their account when they reach checkout. A customer with no credit limit meets any minimum and never meets a maximum
ProductsThe order contains a product that matches any of your filtersFilter on SKU, Shopify Vendor or Shopify Tags. Values must be spelled as in your store, but capitals don't matter
Pre-order itemsThe cart contains a pre-order item, or contains noneA pre-order item is one the customer can order without stock. This doesn't check that the other items are in stock
Shipping destinationThe shipping address is in one of the Countries you chooseNarrow a country to some regions, or leave its regions empty for the whole country. The billing address isn't checked

The minimum is included and the maximum isn't: with a Maximum of £100, the rule applies to orders up to £99.99. Amounts exclude tax.

Which sub-total conditions use

Order sub-total is checked against the net sub-total after your normal discounts and before any payment rule discount. This is the same for every rule, whatever its outcome.

For example, a group has a 10% payment rule discount and a surcharge for orders of at least £950. On a £1,000 order, the surcharge still applies, because £1,000 meets the minimum. It's then worked out on £900, the sub-total after the discount.

Outcomes

OutcomeWhat happens
Apply a discountTaken off the net sub-total, after all your other discounts. A Percentage or a Fixed amount
Apply a surchargeAdded to the net sub-total after every discount, before shipping and tax. A Percentage or a Fixed amount. It's taxed at your store's default tax rate, so it adds to the order's tax as well as its total
Hide this payment methodThe method isn't shown while the conditions match. Keep at least one method that no hide rule matches. To hide a method from every order, untick it instead

Fixed amounts and money conditions are in the group's currency, and aren't converted: 5 means £5 in a GBP cart and €5 in a EUR cart.

When several rules apply

  • Hide wins. If a hide rule matches, the method is hidden and its discount and surcharge rules don't apply.
  • Discounts all come off the same amount. A 10% and a 20% payment rule discount on a £900 sub-total take £90 and £180 off, £270 in all, in any order.
  • Surcharges add up, and each percentage is worked out on the same amount. A 2% and a 3% surcharge on £855 add £42.75. A fixed surcharge is added as it is.
  • Surcharges count towards shipping. Shipping is worked out after the surcharge, so a surcharge can move an order into a different shipping rate based on order total, such as free shipping over £1,000.
  • Payment rule discounts aren't limited by compatibility. They apply alongside any other discount, whatever its Can be used with setting.

What customers see at checkout

On Review & Pay in My Cart:

  • Each payment method shows its discounts and surcharges, such as -5% or +£5.00, so customers can compare before they choose.
  • The totals list each payment rule discount, such as "Card payment discount (5%)", and a Surcharge line, excluding tax.
  • A hidden method isn't shown. If it was selected, the first method still shown in Payment methods, in order is selected instead.

Rules apply from Review & Pay, not earlier in the cart. To explain a surcharge or discount to your customers, add a message for the payment method.

What the order looks like in Shopify

In Shopify, the order shows:

  • A surcharge as a line item named Surcharge, with a quantity of 1. Its tax is in the order's tax, as at checkout.
  • A payment rule discount as lower line item prices, the same as other SparkLayer discounts. It's listed in the order's B2B Discount Data with its other discounts. See See discount details on an order.

Change the text customers see

Change these in Translation overrides: see Change checkout text. {amount} is the rule's amount, such as 5% or £10.00.

Default textKey
Card payment discount ({amount})cart.checkout.discount.payment-rule.upfrontPayment
Pay on account discount ({amount})cart.checkout.discount.payment-rule.paymentOnAccount
Invoice payment discount ({amount})cart.checkout.discount.payment-rule.paymentByInvoice
Surchargeglobal.totals.surcharge
View discountscart.checkout.discount.cta-view-only
Sorry, your order wasn't placed as your total changed. Please check it and try again.cart.validation-messages.payment-method-not-calculated

View discounts opens the list of discounts when a payment rule discount applies and your store has no coupon codes. The amounts shown next to each payment method, and the Surcharge line item name in Shopify, can't be changed.

Core Script code for your developer
Core Script
translations: {
  en: {
    "cart.checkout.discount.payment-rule.upfrontPayment": "Card payment discount ({amount})",
    "global.totals.surcharge": "Card fee",
  }
},

Limits

LimitValue
Rules per payment method5
Filters in a Products condition25
Payment methodsPay by invoice, Payment on account and Card at checkout
PlanGrowth or above
Core Script4.13.0 or later. Check Version for this store at SparkLayer Wholesale,Storefront,Widgets,Core script version (in your Shopify admin)
Price listThe customer group, or a group it inherits from, needs a price list, which sets the currency of its rules
QuotesRules don't apply to quotes, from the Quoting Engine or the retired Request for Quote

FAQs

Was this page helpful?

Last updated