V2 API Coupon Codes

Hey everyone! Does anyone here know if it is still possible to create coupon codes via the V2 API? It used to be under v1/<locaiton_id>/discounts, but there isn’t a path for that in V2.

I’m looking to generate coupon codes for referrals and would like to automatically bring them into Square.

Thanks in Advance.

Hi @eman8519 welcome to the forums!

Discounts and coupons are not exactly the same thing, to be clear. You can definitely still create discounts in V2 using the Catalog API. With the Catalog API, you can upsert all catalog types (items, variations, modifiers, etc including discounts). For example, if you’re wanting to create one, single discount, you can use the UpsertCatalogObject endpoint, and use type = DISCOUNT.

Please let me know if you have any additional questions or concerns, I’m happy to help!

Hi @sjosey thank you for the quick reply!

I should have been more clear. I was hoping to create coupons/promo codes. Something like "Use Code: HappyBirthday1234 at checkout.

We are looking to allow our current users to create referrals, and we want to track those referrals when customers make purchases on our online store.

So really I don’t need Coupons or Discounts as much as a way to attribute a purchase to one of our users. When a user signs up we will create a code for them, and I would like to use the Square API to register these codes with our Square Online Store.

Thanks again for your help.

Thanks for clarifying! Unfortunately, there’s no way to do this through our APIs at this time (no way to create coupons or any codes).