Add referral action

This action lets you add a referral via the AffiliateWP integration. Use it to automate you daily work ans 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 tag was removed from a contact via The Groundhogg Logo for our WP Webhooks integration Groundhogg, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When an appointment was rescheduled via The Amelia Logo for our WP Webhooks integration Amelia, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When an ACF term field was updated via The Advanced Custom Fields Logo for our WP Webhooks integration Advanced Custom Fields, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a referral status changed via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a customer was updated 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 user voted on a poll via The WP-Polls Logo for our WP Webhooks integration WP-Polls, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a paid membership was cancelled 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 new subscription payment 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 comment was deleted via The WordPress Logo for our integration WordPress, 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 broken links have been detected via The Broken Link Checker Logo for our WP Webhooks integration Broken Link Checker, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a new affiliate signed up via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a coupon was deleted via The Woocommerce Logo for our integration WooCommerce, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a membership was set to pending cancellation via The WooCommerce Memberships Logo for our WP Webhooks integration WooCommerce Memberships, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a free membership was cancelled 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 course was completed via The Tutor LMS Logo for our WP Webhooks integration Tutor LMS, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a user password was changed via The WP User Manager Logo for our WP Webhooks integration WP User Manager, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a customer was created via The Woocommerce Logo for our integration WooCommerce, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When a KlickTipp outbound request was received via The KlickTipp Logo for our WP Webhooks integration KlickTipp, add a referral via The AffiliateWP Logo for our WP Webhooks integration AffiliateWP.
When an order was updated via The Paid Membership Pro Logo for our WP Webhooks integration Paid Memberships Pro, 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.