Referals when using the booking app

Hello, I’m trying to take the bookings through the standard booking app wich is working great, the problem is that I want to integrate a referal system where if they enter trough a link that ends with

?ref=XYZ

then in the wixBookings_onBookingConfirmed() function the order is saved to a DB so the referer can get their cut. he adding to DB isn’t really the issue. The issue is that the onBookingConfirmed() is in the backend, while the info that the user is reffered is in the fronted. And I can’t figure out how to get that info to onBookingConfirmed().

TL;DR, how to get info from front-end to back-end?

Hi @simen ,

You will need to use the client API (out of Velo) to do that if you don’t want to rebuild the interface: https://dev.wix.com/api/client/events/wix-bookings/bookingsevents Use http function in Velo to receive the event with the affiliate ID (?ref=xxxx)

Certified Code

I’ll be honest and say I’m having a hard time understanding this documentation. Do you happen to know any tutorials around this stuff? I looked around, but couldn’t seem to find any.