Add referral action

This action lets you add a referral via the AffiliateWP integration. Use it to automate you daily work and save time and resources.

How to add a referral

This section aims to help you getting started on how to add a referral via AffiliateWP. Simply select one of your prefered automation manuals down below and start automating your WordPress website in no time.

"Add referral" arguments

Our so-called arguments are values that you can use to customize your request. They allow you to send specific data to the Add referral action which is then handled accordingly to the described purpose. You can use the arguments that you would like to send values for.
To learn more about it, please see the Setup Guide above.
user_id *

The id or email of the related user. (Optional in case affiliate_id is set).

affiliate_id *

The id of the related affiliate. (Optional in case user_id is set).

amount

The amount that is paid to the affiliate.

description

A description for this referral.

reference

A reference for this referral. Usually this would be the transaction ID of the associated purchase.

parent_id

An id of a different referral you want to associate as a parent.

currency

An custom currency code such as EUR. Please note that the currency will only have effect it is is selected within the settings of AffiliateWP.

campaign

Set a referral campaign. This can be a referral you created for a specific project. E.g. Summer Promotion

context

The context usually is the slug of the payment provider. E.g. fastspring or paypal. You can also use the third-party integration.

custom

Add any kind of data to your referral.

date

The date and time of creation of the referral. In case nothing is set, the current time is used.

type

The referral type. E.g.: sale

products

In case you use a third-party integration, you can also relate specific products to your referral.

status

The status of your current referral. E.g.: unpaid

do_action

Advanced: Register a custom action after this webhook was fired.

wpwh_call_action

(String) Register a custom WordPress hook callback. The value will be called as followed: do_action( $yourdefinedaction, $action_return_data, $request_data )

Connection examples

Get inspired on how to use the "Add referral" action within our AffiliateWP integrations. Down below you will find various examples with our other integrations.
When a custom button was clicked via The WP Webhooks Logo for our WP Webhooks integration WP Webhooks, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a form was submitted via The WPForms Logo for our integration WPForms, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When an item was approved via The ProjectHuddle Logo for our WP Webhooks integration ProjectHuddle, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a transaction was deleted via The Jetpack CRM Logo for our WP Webhooks integration Jetpack CRM, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a profile photo was changed via The Ultimate Member Logo for our WP Webhooks integration Ultimate Member, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a user password was reset via The WordPress Logo for our integration WordPress, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a quote was created via The Jetpack CRM Logo for our WP Webhooks integration Jetpack CRM, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a quiz was completed via The LearnDash Logo for our WP Webhooks integration LearnDash, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a new customer was created via The Easy Digital Downloads Logo for our integration Easy Digital Downloads, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a form was submitted via The JetEngine Logo for our WP Webhooks integration JetEngine, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a donation was preapproved via The GiveWP Logo for our WP Webhooks integration GiveWP, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When the full cache was cleared via The W3 Total Cache Logo for our WP Webhooks integration W3 Total Cache, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a specific do_action hook was fired via The WordPress Logo for our integration WordPress, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a paid membership was activated via The Restrict Content Pro Logo for our WP Webhooks integration Restrict Content Pro, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a ticket was added via The Awesome Support Logo for our WP Webhooks integration Awesome Support, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a form was submitted via The WS Form Logo for our WP Webhooks integration WS Form, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When the full cache was cleared via The LiteSpeed Cache Logo for our WP Webhooks integration LiteSpeed Cache, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When an email was sent via The WordPress Logo for our integration WordPress, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a new site was created via The WordPress Logo for our integration WordPress, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When an appointment was canceled via The Amelia Logo for our WP Webhooks integration Amelia, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a new referral was received via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.

More available AffiliateWP endpoints

Discover more of the available endpoints used for the AffiliateWP integration.
To learn more about a specific endpoint, simply click on it.
Full disclosure: When clicking on some of the links on our website and purchasing the related product and/or service, we may earn a commission free of any additional cost for you.