Rewardful (Affiliate program) integration
Hi there,
That is a good question. I've not seen any PHP packages that might make this an easier task, at the moment, your best bet would be to build a custom dashboard in Wave and consume the Rawardful REST API:
https://developers.rewardful.com/rest-api/overview
Here is a quick guide on how to consume an external API using Guzzle:
The only closest thing that they offer is a Laravel Spark integration but Wave is not compatible with Spark:
https://github.com/rewardful/rewardful-spark
I reached out to rewardful, here is what was recommended
Client-side conversion: You will be required to add this code to the page where referred customers are redirected after they submit the information you send to Stripe:
<script> rewardful('convert', { email: '[email protected]' }) </script>
ou would need to replace the [email protected] with the email variable that you use that resolves to the customer's email address. What this code does is it looks for a matching email address that was recently added in your Stripe Customer record section (search scope is last 24 hours). If it finds one, our webhooks will add the affiliate information to the metadata section of the customer record and this will generate a commission record in your Rewardful dashboard (if they paid an amount of at least $1).
Please note that I also installed rewardful appp in marketplace to stripe directly. https://marketplace.stripe.com/apps/rewardful-affiliate-software
What page will new users be redirected to so that I can capture their emails?
Oh that seems great!
You can get the email of the currently authenticated user with {{ auth()->user()->email }}
.
Yep, the welcome.blade.php should be the one that the user is redirected to after a successful payment I believe.
Thanks for the info @everyone, I've used rewardful in the past and this will be helpful implementing it with Wave soon.















