PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Unsolved

Rewardful (Affiliate program) integration

solutions

Mar 14th, 2023 10:08 AM

Has anyone implemented an affiliate program with stripe such as rewardful?

bobbyiliev

Mar 14th, 2023 10:25 AM

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:

How to consume an external API with Laravel and 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

solutions

Mar 14th, 2023 11:22 AM

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?

bobbyiliev

Mar 14th, 2023 11:27 AM

Oh that seems great!

You can get the email of the currently authenticated user with {{ auth()->user()->email }}.

solutions

Mar 14th, 2023 12:00 PM

Do I add to the dashboard theme file?

solutions

Mar 14th, 2023 12:23 PM

I think I found the file for the redirected page for new users

welcome.blade.php

bobbyiliev

Mar 14th, 2023 02:53 PM

Yep, the welcome.blade.php should be the one that the user is redirected to after a successful payment I believe.

alexmorning

Mar 31st, 2023 12:39 AM

Thanks for the info @everyone, I've used rewardful in the past and this will be helpful implementing it with Wave soon.

Report
1