This webhook is triggered when a customer follows a referral link and completes an order.

To subscribe to this webhook, your access token needs to contain the read_customers and read_orders scopes.

Payload

referring_customer
object
required

The referring customer. An object with the same shape as the Customers API response

referred_customer
object
required

The new customer who has been referred. An object with the same shape as the Customers API response

activity
object
required

The referral activity triggered by the referring customer. An object with the same shape as the Activities API response

order
object
required

The new referred customer’s order that triggered the referral. An object with the same shape as the Orders API response

Example

Example
{
  "id": "bff1bddb-6cd8-4c2c-9619-18744657053c",
  "topic": "program_events/customer.referral_complete",
  "created_at": "2018-01-01T03:00:05.000Z",
  "payload": {
    "properties": {
      "referring_customer": {
        "id": 6932,
        "merchant_id": "2134606599",
        "email": "jessica@example.com",
        "points_approved": 200,
        "points_pending": 300,
        "points_spent": 500,
        "rewards_claimed": 5,
        "properties": {
          "name": "Jessica White"
        },
        "metadata": {},
        "birthday": "1990-01-29",
        "blocked": false,
        "guest": false,
        "enrolled": true,
        "enrolled_at": "2015-12-10T03:00:00.000Z",
        "referral_id": null,
        "referred_by": null,
        "loyalty_tier_membership": null,
        "insights_segment": "Loyal",
        "referral_url": null,
        "created_at": "2016-12-10T03:00:00.000Z",
        "updated_at": "2018-01-01T03:00:00.000Z"
      },
      "referred_customer": {
        "id": 45254,
        "merchant_id": "2104789172",
        "email": "bill@example.com",
        "points_approved": 0,
        "points_pending": 0,
        "points_spent": 0,
        "rewards_claimed": 0,
        "properties": {
          "name": "Bill Smith"
        },
        "metadata": {},
        "birthday": "1990-07-18",
        "blocked": false,
        "guest": true,
        "enrolled": false,
        "enrolled_at": "2019-12-10T03:00:00.000Z",
        "referral_id": null,
        "referred_by": {
          "id": 6932,
          "merchant_id": "2134606599"
        },
        "loyalty_tier_membership": null,
        "insights_segment": "Loyal",
        "referral_url": null,
        "created_at": "2016-12-10T03:00:00.000Z",
        "updated_at": "2018-01-01T03:00:00.000Z"
      },
      "order": {
        "id": 194572858,
        "total": "45.96",
        "metadata": {},
        "total_tax": "0",
        "created_at": "2021-08-19T05:50:42.797Z",
        "total_paid": "45.96",
        "updated_at": "2021-08-19T05:50:42.797Z",
        "merchant_id": "4158567448655",
        "refund_status": "not_refunded",
        "payment_status": "paid",
        "total_refunded": "0",
        "total_shipping": "5.99",
        "merchant_number": "263961",
        "total_discounts": "10.00",
        "fulfillment_status": "not_fulfilled",
        "cancellation_status": "not_cancelled"
      },
      "activity": {
        "id": 239638566,
        "rule": {
          "id": 149623,
          "name": "$referral",
          "title": "Refer friends"
        },
        "state": "pending",
        "value": 1000,
        "merchant_id": null,
        "created_at": "2018-01-01T03:00:05.000Z"
      }
    }
  }
}