---
updatedAt: 2026-10-29T15:41:23.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Referral Completed (2.0)

Sent when a customer refers a friend who meets your referral program's requirements. Use it to thank the customer for the referral.

To receive it, add `yotpo/referral/completed` to `events` when you [create a filter](ref:create-filter), then [subscribe](ref:create-subscription) the filter to your target. Yotpo sends the event to your target URL as a `POST` with this JSON body.

For Shopify stores that joined Yotpo Loyalty & Referrals after August 2024. Stores that joined earlier get [Referral Completed](ref:swell-referral-completed) (`swell/referral/completed`).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Yotpo Webhooks",
    "description": "Events Yotpo sends to your webhook URL. Each event is an HTTP POST with a JSON body. To receive them, create a webhook target, a filter and a subscription.",
    "version": "3.0"
  },
  "webhooks": {
    "yotpo/referral/completed": {
      "post": {
        "operationId": "yotpo-referral-completed",
        "summary": "Referral Completed (2.0)",
        "description": "Sent when a customer refers a friend who meets your referral program's requirements. Use it to thank the customer for the referral.\n\nTo receive it, add `yotpo/referral/completed` to `events` when you [create a filter](ref:create-filter), then [subscribe](ref:create-subscription) the filter to your target. Yotpo sends the event to your target URL as a `POST` with this JSON body.\n\nFor Shopify stores that joined Yotpo Loyalty & Referrals after August 2024. Stores that joined earlier get [Referral Completed](ref:swell-referral-completed) (`swell/referral/completed`).",
        "security": [],
        "parameters": [
          {
            "name": "X-Yotpo-Webhooks-Event-Type",
            "in": "header",
            "required": true,
            "description": "The event name. Matches `topic` in the body.",
            "schema": {
              "type": "string"
            },
            "example": "yotpo/referral/completed"
          },
          {
            "$ref": "#/components/parameters/WebhookTenantType"
          },
          {
            "$ref": "#/components/parameters/WebhookTenantId"
          },
          {
            "$ref": "#/components/parameters/WebhookMessageId"
          },
          {
            "$ref": "#/components/parameters/WebhookMessageIdPerTarget"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "topic": {
                    "description": "The event name, `yotpo/referral/completed`.",
                    "type": "string"
                  },
                  "name": {
                    "description": "The display name of the event.",
                    "type": "string"
                  },
                  "website_url": {
                    "description": "Your store's website URL.",
                    "type": "string"
                  },
                  "store_name": {
                    "description": "Your store's name.",
                    "type": "string"
                  },
                  "perk": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "The ID of the reward record.",
                        "type": "integer"
                      },
                      "campaign_id": {
                        "description": "The ID of the campaign (earning rule) that gave the reward, or `null`.",
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "merchant_id": {
                        "description": "Your Yotpo Loyalty merchant ID.",
                        "type": "integer"
                      },
                      "customer_id": {
                        "description": "The customer's Yotpo Loyalty ID.",
                        "type": "integer"
                      },
                      "reward_points": {
                        "description": "The number of points the referring customer earned for a successful referral.",
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "completed": {
                        "description": "Whether the customer completed the action that earns the reward.",
                        "type": "boolean"
                      },
                      "completed_at": {
                        "description": "When the action was completed, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "awarded": {
                        "description": "Whether the reward was given to the customer.",
                        "type": "boolean"
                      },
                      "awarded_at": {
                        "description": "When the reward was given, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "pending": {
                        "description": "Whether the reward is pending and not yet available.",
                        "type": "boolean"
                      },
                      "reversed": {
                        "description": "Whether the reward was taken back, for example after a refund.",
                        "type": "boolean"
                      },
                      "reversed_at": {
                        "description": "When the reward was reversed, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "expired": {
                        "description": "Whether the reward has expired.",
                        "type": "boolean"
                      },
                      "expired_at": {
                        "description": "When the reward expired, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "expires_at": {
                        "description": "When the reward will expire, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "redemption_option_id": {
                        "description": "The ID of the reward (redemption option) given, or `null` when the reward is points.",
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "history_title": {
                        "description": "The description shown in the customer's points history.",
                        "type": "string"
                      },
                      "created_at": {
                        "description": "When the reward record was created.",
                        "type": "string",
                        "format": "date-time"
                      },
                      "redemption_option": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "The reward (redemption option) ID.",
                            "type": "integer"
                          },
                          "cost_text": {
                            "description": "The points cost as display text, for example `500 points`.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "amount": {
                            "description": "The points the reward costs. `0` for `variable` rewards, where the customer chooses how many points to redeem.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "applies_to_product_type": {
                            "description": "Which products the reward applies to, for example `ALL`.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "duration": {
                            "description": "How long the reward lasts, for example `single_use`.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "type": {
                            "description": "The reward type, for example `Coupon`.",
                            "type": "string"
                          },
                          "discount_amount_cents": {
                            "description": "The discount in cents for fixed-amount rewards.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "discount_rate_cents": {
                            "description": "For `variable` rewards, the discount in cents for each point redeemed.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "discount_percentage": {
                            "description": "The discount percentage for percentage rewards. `null` or `0` for other types.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "discount_type": {
                            "description": "How the discount works, for example `fixed_amount`, `percentage`, `variable`, `custom_reward` or `donation`.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "discount_value_cents": {
                            "description": "The discount value in cents, or `null`.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "name": {
                            "description": "The name of the discount code the referring customer earned for a successful referral.",
                            "type": "string"
                          },
                          "description": {
                            "description": "The reward description shown to customers.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "unrendered_name": {
                            "description": "The reward name as set in the admin, before placeholders are filled in.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "unrendered_description": {
                            "description": "The reward description as set in the admin, before placeholders are filled in.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "cart_greater_than": {
                            "description": "Minimum cart subtotal for the reward to apply, in store currency units. `\"0\"` means no minimum.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "discount_with_currency": {
                            "description": "The discount formatted in your store currency, for example `$10`.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "description": "The reward given."
                      },
                      "redemption": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "The redemption ID.",
                            "type": "integer"
                          },
                          "reward_text": {
                            "description": "The discount code the referring customer earned for a successful referral.",
                            "type": "string"
                          },
                          "approved": {
                            "description": "Whether the redemption is approved.",
                            "type": "boolean"
                          },
                          "approved_at": {
                            "description": "When the redemption was approved.",
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "is_admin": {
                            "description": "`true` when the redemption was made from the Yotpo Loyalty admin.",
                            "type": "boolean"
                          },
                          "is_pos": {
                            "description": "`true` when the redemption was made at a point of sale.",
                            "type": "boolean"
                          },
                          "at_checkout": {
                            "description": "`true` when points are deducted only when the coupon is used at checkout.",
                            "type": "boolean"
                          },
                          "amount": {
                            "description": "The points spent, or `null` when the reward was given rather than bought with points.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "token": {
                            "description": "An internal reference for the redemption.",
                            "type": "string"
                          },
                          "third_party_id": {
                            "description": "The discount's ID in your e-commerce platform, or `null` for codes you uploaded.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "third_party_rule_id": {
                            "description": "The ID of the discount rule in your e-commerce platform, or `null` for codes you uploaded.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "code": {
                            "description": "The coupon code.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "description": "The coupon given with this reward."
                      }
                    },
                    "description": "The reward record."
                  },
                  "referral_code": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "description": "The referral code.",
                        "type": "string"
                      },
                      "customer_id": {
                        "description": "The referring customer's Yotpo Loyalty ID.",
                        "type": "integer"
                      },
                      "total_shares": {
                        "description": "Total shares.",
                        "type": "integer"
                      },
                      "email_shares": {
                        "description": "Shares by email.",
                        "type": "integer"
                      },
                      "sms_shares": {
                        "description": "Shares by SMS.",
                        "type": "integer"
                      },
                      "whatsapp_shares": {
                        "description": "Shares on WhatsApp.",
                        "type": "integer"
                      },
                      "copy_link_shares": {
                        "description": "Times the referral link was copied.",
                        "type": "integer"
                      },
                      "personal_email_shares": {
                        "description": "Shares from a personal email account.",
                        "type": "integer"
                      },
                      "links_clicked_from_email": {
                        "description": "Link clicks from email.",
                        "type": "integer"
                      },
                      "links_clicked_from_sms": {
                        "description": "Link clicks from SMS.",
                        "type": "integer"
                      },
                      "links_clicked_from_whatsapp": {
                        "description": "Link clicks from WhatsApp.",
                        "type": "integer"
                      },
                      "links_clicked_from_personal_email": {
                        "description": "Link clicks from a personal email account.",
                        "type": "integer"
                      },
                      "links_clicked_from_copy_link": {
                        "description": "Clicks on the copied link.",
                        "type": "integer"
                      },
                      "friends_orders": {
                        "description": "Orders placed by referred friends.",
                        "type": "integer"
                      },
                      "friends_amount_spent_cents": {
                        "description": "Total spend by referred friends, in cents.",
                        "type": "integer"
                      },
                      "friends_average_amount_cents": {
                        "description": "Average order value of referred friends, in cents.",
                        "type": "integer"
                      },
                      "expired": {
                        "description": "Whether the code has expired.",
                        "type": "boolean"
                      },
                      "customer": {
                        "type": "object",
                        "properties": {
                          "total_spend_cents": {
                            "description": "Total spend recorded for the customer, in cents.",
                            "type": "integer"
                          },
                          "total_purchases": {
                            "description": "Number of purchases recorded for the customer.",
                            "type": "integer"
                          },
                          "perks_redeemed": {
                            "description": "Number of rewards the customer has redeemed.",
                            "type": "integer"
                          },
                          "last_purchase_at": {
                            "description": "When the customer's last recorded purchase was made, or `null`.",
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "first_name": {
                            "description": "The customer's first name.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "last_name": {
                            "description": "The customer's last name.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_member": {
                            "description": "Whether the customer is a loyalty program member.",
                            "type": "boolean"
                          },
                          "accepts_marketing": {
                            "description": "Whether the customer accepts marketing, or `null` when unknown.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "email": {
                            "description": "The customer's email address.",
                            "type": "string"
                          },
                          "points_balance": {
                            "description": "The points the customer can spend now, after this event.",
                            "type": "integer"
                          },
                          "points_earned": {
                            "description": "Total points the customer has earned over their lifetime.",
                            "type": "integer"
                          },
                          "last_seen_at": {
                            "description": "When Yotpo Loyalty last recorded activity for the customer, or `null`.",
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "thirty_party_id": {
                            "description": "Legacy misspelled duplicate of `third_party_id`. Use `third_party_id`.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "third_party_id": {
                            "description": "The customer's ID in your e-commerce platform.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "referral_link": {
                            "description": "The customer's personal referral link.",
                            "type": "string"
                          },
                          "referral_discount_code": {
                            "description": "The discount code the customer received for being referred, or `null`.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_opt_in": {
                            "description": "Whether the customer is opted in to the loyalty program.",
                            "type": "boolean"
                          },
                          "loyalty_opt_in_date": {
                            "description": "The date the customer opted in to the loyalty program, or `null` when they have not.",
                            "type": "string"
                          },
                          "has_store_account": {
                            "description": "Whether the customer has an account in your store.",
                            "type": "boolean"
                          },
                          "credit_balance": {
                            "description": "Store-credit value of the points balance, formatted in your store currency, for example `$0`.",
                            "type": "string"
                          },
                          "credit_balance_in_customer_currency": {
                            "description": "Store-credit value of the points balance, formatted in the customer's currency.",
                            "type": "string"
                          },
                          "is_affiliate": {
                            "description": "Whether the customer is an affiliate.",
                            "type": "boolean"
                          },
                          "points_expire_at": {
                            "description": "When the customer's points expire, or `null` when they never expire. Follows your **Points expiration policy**: **Last Activity** (counted from the customer's last activity), **Date Earned** (the next upcoming expiration across the customer's point batches) or **Never expire** (`null`).",
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "referred_by_customer": {
                            "description": "The email address of the customer who referred this customer, or `null` when there is no referrer.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "vip_tier_name": {
                            "description": "The customer's current VIP tier, or `null` when they aren't in one.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "vip_tier_ends_at": {
                            "description": "When the customer's current VIP tier ends, or `null` when it doesn't expire.",
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "birthday_month": {
                            "description": "The customer's birthday month (1 to 12), or `null` when not set.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "birth_day": {
                            "description": "The day of the month of the customer's birthday, or `null` when not set.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "birth_year": {
                            "description": "The customer's birth year, or `null` when not set.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "anniversary_month": {
                            "description": "The customer's anniversary month (1 to 12), or `null` when not set.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "anniversary_day": {
                            "description": "The day of the month of the customer's anniversary, or `null` when not set.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "anniversary_year": {
                            "description": "The year of the customer's anniversary, or `null` when not set.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "description": "The referring customer, or `null`. Includes more account details than are listed here."
                      },
                      "completed_referral_customers": {
                        "type": "array",
                        "description": "An array of friends the referring customer has referred so far.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "description": "The friend's email address.",
                              "type": "string"
                            },
                            "first_name": {
                              "description": "The friend's first name.",
                              "type": "string"
                            },
                            "last_name": {
                              "description": "The friend's last name.",
                              "type": "string"
                            },
                            "reward_type": {
                              "description": "The kind of reward given for the referral, for example `REWARD_OPTION`.",
                              "type": "string"
                            },
                            "referral_status": {
                              "description": "The referral status, for example `COMPLETED`.",
                              "type": "string"
                            },
                            "last_seen_at": {
                              "description": "When Yotpo Loyalty last recorded activity for the friend.",
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        }
                      },
                      "email": {
                        "description": "The referring customer's email address.",
                        "type": "string"
                      },
                      "unique_clicks": {
                        "description": "Unique link clicks.",
                        "type": "integer"
                      },
                      "total_clicks": {
                        "description": "Total link clicks.",
                        "type": "integer"
                      }
                    },
                    "description": "The referring customer's referral code and its sharing stats."
                  },
                  "friend_referral_code": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "description": "The referral code.",
                        "type": "string"
                      },
                      "customer_id": {
                        "description": "The referring customer's Yotpo Loyalty ID.",
                        "type": "integer"
                      },
                      "total_shares": {
                        "description": "Total shares.",
                        "type": "integer"
                      },
                      "email_shares": {
                        "description": "Shares by email.",
                        "type": "integer"
                      },
                      "sms_shares": {
                        "description": "Shares by SMS.",
                        "type": "integer"
                      },
                      "whatsapp_shares": {
                        "description": "Shares on WhatsApp.",
                        "type": "integer"
                      },
                      "copy_link_shares": {
                        "description": "Times the referral link was copied.",
                        "type": "integer"
                      },
                      "personal_email_shares": {
                        "description": "Shares from a personal email account.",
                        "type": "integer"
                      },
                      "links_clicked_from_email": {
                        "description": "Link clicks from email.",
                        "type": "integer"
                      },
                      "links_clicked_from_sms": {
                        "description": "Link clicks from SMS.",
                        "type": "integer"
                      },
                      "links_clicked_from_whatsapp": {
                        "description": "Link clicks from WhatsApp.",
                        "type": "integer"
                      },
                      "links_clicked_from_personal_email": {
                        "description": "Link clicks from a personal email account.",
                        "type": "integer"
                      },
                      "links_clicked_from_copy_link": {
                        "description": "Clicks on the copied link.",
                        "type": "integer"
                      },
                      "friends_orders": {
                        "description": "Orders placed by referred friends.",
                        "type": "integer"
                      },
                      "friends_amount_spent_cents": {
                        "description": "Total spend by referred friends, in cents.",
                        "type": "integer"
                      },
                      "friends_average_amount_cents": {
                        "description": "Average order value of referred friends, in cents.",
                        "type": "integer"
                      },
                      "expired": {
                        "description": "Whether the code has expired.",
                        "type": "boolean"
                      },
                      "customer": {
                        "description": "The referring customer, or `null`. Includes more account details than are listed here.",
                        "type": [
                          "object",
                          "null"
                        ],
                        "nullable": true
                      },
                      "completed_referral_customers": {
                        "type": "array",
                        "description": "The friends who completed a referral with this code.",
                        "items": {
                          "type": "object"
                        }
                      },
                      "email": {
                        "description": "The referring customer's email address.",
                        "type": "string"
                      },
                      "unique_clicks": {
                        "description": "Unique link clicks.",
                        "type": "integer"
                      },
                      "total_clicks": {
                        "description": "Total link clicks.",
                        "type": "integer"
                      }
                    },
                    "description": "The referred friend's own referral code and stats."
                  },
                  "email": {
                    "description": "The email address of the customer who made the referral.",
                    "type": "string"
                  },
                  "friend": {
                    "type": "object",
                    "properties": {
                      "total_spend_cents": {
                        "description": "Total spend recorded for the customer, in cents.",
                        "type": "integer"
                      },
                      "total_purchases": {
                        "description": "Number of purchases recorded for the customer.",
                        "type": "integer"
                      },
                      "perks_redeemed": {
                        "description": "Number of rewards the customer has redeemed.",
                        "type": "integer"
                      },
                      "last_purchase_at": {
                        "description": "When the customer's last recorded purchase was made, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "first_name": {
                        "description": "The customer's first name.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "last_name": {
                        "description": "The customer's last name.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "is_member": {
                        "description": "Whether the customer is a loyalty program member.",
                        "type": "boolean"
                      },
                      "accepts_marketing": {
                        "description": "Whether the customer accepts marketing, or `null` when unknown.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "email": {
                        "description": "The customer's email address.",
                        "type": "string"
                      },
                      "points_balance": {
                        "description": "The points the customer can spend now, after this event.",
                        "type": "integer"
                      },
                      "points_earned": {
                        "description": "Total points the customer has earned over their lifetime.",
                        "type": "integer"
                      },
                      "last_seen_at": {
                        "description": "When Yotpo Loyalty last recorded activity for the customer, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "thirty_party_id": {
                        "description": "Legacy misspelled duplicate of `third_party_id`. Use `third_party_id`.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "third_party_id": {
                        "description": "The customer's ID in your e-commerce platform.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "referral_link": {
                        "description": "The customer's personal referral link.",
                        "type": "string"
                      },
                      "referral_discount_code": {
                        "description": "The discount code the customer received for being referred, or `null`.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "is_opt_in": {
                        "description": "Whether the customer is opted in to the loyalty program.",
                        "type": "boolean"
                      },
                      "loyalty_opt_in_date": {
                        "description": "The date the customer opted in to the loyalty program, or `null` when they have not.",
                        "type": "string"
                      },
                      "has_store_account": {
                        "description": "Whether the customer has an account in your store.",
                        "type": "boolean"
                      },
                      "credit_balance": {
                        "description": "Store-credit value of the points balance, formatted in your store currency, for example `$0`.",
                        "type": "string"
                      },
                      "credit_balance_in_customer_currency": {
                        "description": "Store-credit value of the points balance, formatted in the customer's currency.",
                        "type": "string"
                      },
                      "is_affiliate": {
                        "description": "Whether the customer is an affiliate.",
                        "type": "boolean"
                      },
                      "points_expire_at": {
                        "description": "When the customer's points expire, or `null` when they never expire. Follows your **Points expiration policy**: **Last Activity** (counted from the customer's last activity), **Date Earned** (the next upcoming expiration across the customer's point batches) or **Never expire** (`null`).",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "referred_by_customer": {
                        "description": "The email address of the customer who referred this customer, or `null` when there is no referrer.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "description": "The friend who was referred."
                  },
                  "published_at": {
                    "description": "When Yotpo sent the event.",
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "example": {
                "topic": "yotpo/referral/completed",
                "name": "Yotpo Referral completed",
                "website_url": "http://sara-yotpo.myshopify.com",
                "store_name": "Sara Yotpo",
                "perk": {
                  "id": 1,
                  "campaign_id": null,
                  "merchant_id": 69962,
                  "customer_id": 1,
                  "reward_points": null,
                  "completed": true,
                  "completed_at": "2024-08-08T07:38:27.000Z",
                  "awarded": true,
                  "awarded_at": "2024-08-08T07:38:27.000Z",
                  "pending": false,
                  "reversed": false,
                  "reversed_at": null,
                  "expired": false,
                  "expired_at": null,
                  "expires_at": null,
                  "redemption_option_id": 1,
                  "history_title": "Refer a friend",
                  "created_at": "2024-08-08T07:38:27.000Z",
                  "redemption_option": {
                    "id": 1,
                    "cost_text": "0 points",
                    "amount": 0,
                    "applies_to_product_type": "ALL",
                    "duration": "single_use",
                    "type": "Coupon",
                    "discount_amount_cents": 1000,
                    "discount_rate_cents": 100,
                    "discount_percentage": null,
                    "discount_type": "fixed_amount",
                    "discount_value_cents": null,
                    "name": "$10 off",
                    "description": "Get $10.00 off your next purchase for 0 points",
                    "unrendered_name": "$10 off",
                    "unrendered_description": "Get $10.00 off your next purchase for 0 points",
                    "cart_greater_than": "0",
                    "discount_with_currency": "$10"
                  },
                  "redemption": {
                    "id": 1,
                    "reward_text": "CODEXWEX",
                    "approved": true,
                    "approved_at": "2024-08-08T07:38:28.000Z",
                    "is_admin": false,
                    "is_pos": false,
                    "at_checkout": false,
                    "amount": null,
                    "token": "1",
                    "third_party_id": null,
                    "third_party_rule_id": null,
                    "code": "CODEXWEX"
                  }
                },
                "referral_code": {
                  "code": "CODE22",
                  "customer_id": 1,
                  "total_shares": 31,
                  "email_shares": 30,
                  "sms_shares": 0,
                  "whatsapp_shares": 0,
                  "copy_link_shares": 1,
                  "personal_email_shares": 0,
                  "links_clicked_from_email": 49,
                  "links_clicked_from_sms": 0,
                  "links_clicked_from_whatsapp": 0,
                  "links_clicked_from_personal_email": 0,
                  "links_clicked_from_copy_link": 1,
                  "friends_orders": 0,
                  "friends_amount_spent_cents": 0,
                  "friends_average_amount_cents": 0,
                  "expired": false,
                  "customer": {
                    "total_spend_cents": 281990,
                    "total_purchases": 4,
                    "perks_redeemed": 22,
                    "last_purchase_at": "2024-08-08T06:09:15.000Z",
                    "first_name": "John",
                    "last_name": "Smith",
                    "is_member": false,
                    "accepts_marketing": false,
                    "email": "name@example.com",
                    "points_balance": 4743,
                    "points_earned": 4843,
                    "last_seen_at": "2024-08-08T07:38:27.000Z",
                    "thirty_party_id": null,
                    "third_party_id": null,
                    "referral_link": "rwrd.io/ref_CODE22",
                    "referral_discount_code": null,
                    "is_opt_in": true,
                    "loyalty_opt_in_date": "2024-07-31",
                    "has_store_account": false,
                    "credit_balance": "$0",
                    "credit_balance_in_customer_currency": "$0",
                    "is_affiliate": false,
                    "points_expire_at": "2027-01-31T23:59:59.000Z",
                    "referred_by_customer": null,
                    "vip_tier_name": null,
                    "vip_tier_ends_at": null,
                    "payout_percentage": null,
                    "has_provided_tax_details": null,
                    "affiliate_email": null,
                    "total_amount_earned": null,
                    "birthday_month": null,
                    "birth_day": null,
                    "birth_year": null,
                    "anniversary_month": null,
                    "anniversary_day": null,
                    "anniversary_year": null
                  },
                  "completed_referral_customers": [
                    {
                      "email": "name@example.com",
                      "first_name": "John",
                      "last_name": "Smith",
                      "reward_type": "REWARD_OPTION",
                      "referral_status": "COMPLETED",
                      "last_seen_at": "2024-08-04T06:45:17.000Z"
                    },
                    {
                      "email": "name@example.com",
                      "first_name": "John",
                      "last_name": "Smith",
                      "reward_type": "REWARD_OPTION",
                      "referral_status": "COMPLETED",
                      "last_seen_at": "2024-08-01T10:12:27.000Z"
                    }
                  ],
                  "email": "name@example.com",
                  "unique_clicks": 22,
                  "total_clicks": 56
                },
                "friend_referral_code": {
                  "code": "CODE33",
                  "customer_id": 1,
                  "total_shares": 0,
                  "email_shares": 0,
                  "sms_shares": 0,
                  "whatsapp_shares": 0,
                  "copy_link_shares": 0,
                  "personal_email_shares": 0,
                  "links_clicked_from_email": 0,
                  "links_clicked_from_sms": 0,
                  "links_clicked_from_whatsapp": 0,
                  "links_clicked_from_personal_email": 0,
                  "links_clicked_from_copy_link": 0,
                  "friends_orders": 0,
                  "friends_amount_spent_cents": 0,
                  "friends_average_amount_cents": 0,
                  "expired": false,
                  "customer": null,
                  "completed_referral_customers": [],
                  "email": "name@example.com",
                  "unique_clicks": 0,
                  "total_clicks": 0
                },
                "email": "name@example.com",
                "friend": {
                  "total_spend_cents": 62000,
                  "total_purchases": 1,
                  "perks_redeemed": 3,
                  "last_purchase_at": "2024-08-08T07:38:18.000Z",
                  "first_name": "John",
                  "last_name": "Smith",
                  "is_member": false,
                  "accepts_marketing": false,
                  "email": "name@example.com",
                  "points_balance": 645,
                  "points_earned": 645,
                  "last_seen_at": "2024-08-08T07:38:23.000Z",
                  "thirty_party_id": null,
                  "third_party_id": null,
                  "referral_link": "",
                  "referral_discount_code": "",
                  "is_opt_in": true,
                  "loyalty_opt_in_date": "2024-08-08",
                  "has_store_account": false,
                  "credit_balance": "$0",
                  "credit_balance_in_customer_currency": "$0",
                  "is_affiliate": false,
                  "points_expire_at": "2027-01-31T23:59:59.000Z",
                  "referred_by_customer": "name@example.com"
                },
                "published_at": "2024-08-08T07:38:37.748+00:00"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status quickly to acknowledge the event. Without one, Yotpo retries at least 10 times with exponential backoff."
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "WebhookMessageId": {
        "name": "WebhookMessageId",
        "in": "header",
        "required": true,
        "description": "A unique ID for the event.",
        "schema": {
          "type": "string"
        },
        "example": "2f1c7a8e-5b1d-4c39-9a0e-3d7f2b6c1e44"
      },
      "WebhookMessageIdPerTarget": {
        "name": "WebhookMessageIdPerTarget",
        "in": "header",
        "required": true,
        "description": "A unique ID for this delivery to this target. Use it to ignore duplicates.",
        "schema": {
          "type": "string"
        },
        "example": "066c9f28-3e87-45d5-a67e-879d6090d989"
      },
      "WebhookTenantId": {
        "name": "X-Yotpo-Webhooks-Tenant-Id",
        "in": "header",
        "required": true,
        "description": "Your store ID.",
        "schema": {
          "type": "string"
        },
        "example": "YOUR_STORE_ID"
      },
      "WebhookTenantType": {
        "name": "X-Yotpo-Webhooks-Tenant-Type",
        "in": "header",
        "required": true,
        "description": "The kind of account the event belongs to.",
        "schema": {
          "type": "string"
        },
        "example": "store"
      }
    }
  }
}
```

# Sibling pages

* [Coupon Earned](https://docs.yotpo.com/reference/swell-redemption-created.md)
* [Custom Reward Redeemed](https://docs.yotpo.com/reference/loyalty-custom-reward-created.md)
* [Customer Birthday](https://docs.yotpo.com/reference/swell-customer-birthday.md)
* [Customer Birthday Captured](https://docs.yotpo.com/reference/swell-birthday-captured.md)
* [Customer Anniversary](https://docs.yotpo.com/reference/swell-customer-anniversary.md)
* [Customer Anniversary Captured](https://docs.yotpo.com/reference/swell-anniversary-captured.md)
* [Donation Created](https://docs.yotpo.com/reference/loyalty-donation-created.md)
* [Account Created](https://docs.yotpo.com/reference/swell-account-created.md)
* [Loyalty Opt In](https://docs.yotpo.com/reference/loyalty-opt-in.md)
* [Loyalty Opt Out](https://docs.yotpo.com/reference/loyalty-opt-out.md)
* [Points Changed](https://docs.yotpo.com/reference/swell-points-changed.md)
* [Points Earned](https://docs.yotpo.com/reference/swell-points-earned.md)
* [Points Reminder](https://docs.yotpo.com/reference/swell-points-reminder.md)
* [Points Expiration Reminder](https://docs.yotpo.com/reference/loyalty-expiration-reminder.md)
* [Redemption Below Threshold](https://docs.yotpo.com/reference/swell-redemption-code-below-threshold.md)
* [Redemption Cancellation Request](https://docs.yotpo.com/reference/swell-point-redemption-cancellation-request.md)
* [Redemption Reminder](https://docs.yotpo.com/reference/swell-redemption-reminder.md)
* [Referral Link Share](https://docs.yotpo.com/reference/swell-referral-share.md)
* [Referral Link Share (2.0)](https://docs.yotpo.com/reference/yotpo-referral-shared.md)
* [Referral Share Reminder](https://docs.yotpo.com/reference/swell-referral-share-reminder.md)
* [Referral Product Share Link](https://docs.yotpo.com/reference/loyalty-referral-product-share.md)
* [Referral Product Share Reminder](https://docs.yotpo.com/reference/loyalty-referral-product-share-reminder.md)
* [Referral Completed](https://docs.yotpo.com/reference/swell-referral-completed.md)
* [Tier Earned](https://docs.yotpo.com/reference/swell-tier-earned.md)
* [Tier Lost](https://docs.yotpo.com/reference/swell-tier-lost.md)
* [Tier Status Changed](https://docs.yotpo.com/reference/swell-tier-status-changed.md)
* [Tier Expiration Reminder](https://docs.yotpo.com/reference/yotpo-tier-expiration-reminder.md)
* [CommerceCloud Integration Disabled](https://docs.yotpo.com/reference/loyalty-integrations-integration-disabled.md)