All Collections
Tips & Tricks
How to Setup Rewardful for Custom Rewards / Customer Referral Programs
How to Setup Rewardful for Custom Rewards / Customer Referral Programs
Charles Rosel avatar
Written by Charles Rosel
Updated over a week ago

Rewardful also supports custom rewards (non-monetary commissions) which can be provided when offering referral programs like refer-a-friend campaigns.

The initial setup of your Rewardful dashboard has to be implemented first:

Once the above is done, additional full-stack development has to be implemented on your platform since you're going to offer custom rewards (non-monetary commissions), given that our affiliate portal only displays monetary commissions.

You would have to host the program's interface in your platform's dashboard so that your referrers/affiliates would be able to see their referral link, and stats, and display the correct rewards that they have earned. Then for functionality, you would connect it to our different API endpoints.

You would still need to create a regular campaign in your Rewardful dashboard to group these referrers which would also serve as your internal records.

Using the API

Create an affiliate user for your customers

When your application creates a customer in Stripe, the next step you’ll want to do is to create an affiliate user using Rewardful’s “create affiliate” endpoint.

When creating the affiliate our endpoint only requires their first_name, last_name and email, however you’ll also need to add the stripe_customer_id of the customer you just created in Stripe in order to give them a credit later on in this process. If you have multiple campaigns within your Rewardful account you will also need to provide the “campaign_id” of the campaign you’re using for your customer referral program.

Sharing the referral link with your customers

You will need to share the referral link with your customers somehow so they know how to earn their credits. We recommend creating a section within the dashboard of your application where you share their referral link. This can be done using our “retrieve affiliate” endpoint. In order to call the retrieve affiliate endpoint you will need to provide the affiliate_id.

This endpoint will return an “affiliate object”.

From the “affiliate object” you can retrieve the “url” of the “affiliate link”. This link is what your customers will need to share in order to earn rewards.

Fulfilling rewards via Stripe credits

If you are fulfilling rewards immediately you will want to set the “Days before commissions become due” in the advanced settings of your campaign to 0.

Next you will need to set up webhooks to notify your application that an “affiliate” has earned a commission. In order to set up a webhook you will want to go to the Webhooks page on your Rewardful dashboard:

The event that you will want to listen for is the “payout.due” event. The object key for these events will describe a payout object:

As you receive this event the payout object will provide you with important information to enable you to fulfill a reward for the customer who has earned the credit. This information is:

  • Amount of the payout

  • The “stripe_customer_id” for the Affiliate that earned the payout

With the amount of the payout and the “stripe_customer_id” you can now apply a credit to the Stripe customer record associated with the “stripe_customer_id”. In order to apply a credit you will need to use the following Stripe endpoint:

Here is an example of what the request would look like in Ruby:

After you have successfully added a credit to the Stripe customer object, you will need to mark the Rewardful payout as paid using the “Mark a payout as paid” endpoint on the Rewardful API:

From here you may want to send some sort of notification to the customer who referred the new customer to let them know they’ve earned a credit.

Did this answer your question?