Hi,
I would like to build an app for my Wix customers and have a few questions regarding the process.
I’ve previously developed similar apps for Shopify and WordPress users, and now I’m looking to create one specifically for Wix.
App Flow Overview:
- An affiliate shares a link in the format:
{site}/discount/code?token=asaS
. - When a customer visits this link, my installed app should detect it, create a cookie containing the discount code and token, and then redirect the user to the base site URL (
{siteUrl}
). - On the cart or checkout page, the app will check for the presence of this cookie. If found, it will validate the discount code and apply it if all conditions are met.
- Once the customer places the order, the app should listen for an order webhook. Upon receiving the order details, it should send the order information along with the token to a third-party URL to indicate the order was generated through the affiliate link.
Looking forward to getting started.