Stacking rules (CatalogPricingRule) for discounts

I am looking for confirmation that the API supports the option to create a CatalogPricingRule with multiple criteria. For example a discount that applies for only certain customer groups and on only certain items.

Within the Square Dashboard interface (not API) the discount creation allows for the selection of one rule type per discount (Item/Category OR Quantity OR Customer Group). I would like to create a discount that has multiple/stacking rules so that it is based on both Items and Customer Group.

I tried creating this via the API explorer and it did appear to work, but I am unable to test it on the Square POS (using Sandbox) so I cannot confirm that it works. Furthermore, the discount does not appear to have multiple rules showing up on the Square Dashboard when I view it that way, though I realize that there might be a limitation with how it is displayed.

Here is a picture of the API response to the Upsert Catalog Object request:

  1. Does this achieve the desired outcome of creating a rule for use with a discount that will automatically apply on a sale when the eligible products and eligible customers are added?
  2. I assume that the associated discount should not be edited via the Square Dashboard, is that correct?

Thank you!

:wave: Yes, this is the correct assumption with the pricing rule you created. Since your using sandbox you can test this bay creating an order with the Orders API and paying for it using the Payments API with our test values. :slightly_smiling_face:

1 Like

Hi, I am a beginner with my Square POS and would really like to implement this code for my business, but do not know really where to start. Any help would be greatly appreciated!

Have you worked with APIs before? Square lets developers build an ecosystem for businesses to seamlessly accept payments online, in store, or on the go through Payments and eCommerce APIs. Our API’s are best utilized by someone with API coding experience or working directly with a developer.

If you don’t have experience in building API tools and would like to accept payments online, we recommend connecting your Square account with one of our eCommerce partners. :slightly_smiling_face: