How to identify which coupon code was used on a particular Square online order

We are having difficulty identifying the usage of coupon codes for specific orders. Our org uses multiple different codes and it is important for users to be able to see which coupon code was applied to a particular order or transaction. Previously, we were able to see this information on the front end by selecting ‘Manage on Square Online’ from the further options (three dots) menu on the order record. But this option just recently stopped being available. We have looked everywhere we can think of both on the API and the front end to find this information and would love any help that is available. Many thanks!

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Customer API: Securely Manage Customer Data
Square Developer Documentation
Merchant APIs

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

The coupon code applied to a particular transaction can be found in the Order object. Specifically, you can look at the discounts field of the Order object. This field contains an array of OrderLineItemDiscount objects, each representing a discount applied to the order. The name field of the OrderLineItemDiscount object should contain the name of the coupon code applied. Please note that this information is available only if the discount was applied at the line item level. If the discount was applied at the order level, it would be in the discounts field of the Order object itself.

This answer was reviewed by @Bryan-Square.

Hello @jenehs3,
Hey there! It sounds frustrating that the “Manage on Square Online” option is no longer visible. Here are a few suggestions to help you track coupon codes:

  1. Square API: You might need to explore custom implementations using the Square API. The API documentation can guide you on how to retrieve order details, including applied discounts and coupons.
  2. Custom Tracking Codes: Consider adding custom tracking codes to your Square Online site to capture coupon usage. You can use tools like Google Analytics for detailed information.
  3. Update Tracking Tools: Ensure your tracking tools are correctly configured under Settings > Tracking Tools in Square Online.

Best Regards,
Joan Martin