# 是否有办法将交易ID与邀请链接关联起来？

**URL:** https://meta.discourse.org/t/is-there-a-way-to-associate-a-transaction-id-with-an-invitation-link/386113
**Category:** Support
**Created:** [2025 年10 月 19 日 12:49 UTC](https://meta.discourse.org/t/is-there-a-way-to-associate-a-transaction-id-with-an-invitation-link/386113 "2025-10-19T12:49:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### 作者： ![Willy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/willy/32/499930_2.png) [@Willy](https://meta.discourse.org/u/Willy)
#### 发布日期： [2025 年10 月 19 日 12:49 UTC](https://meta.discourse.org/t/is-there-a-way-to-associate-a-transaction-id-with-an-invitation-link/386113/1 "2025-10-19T12:49:01Z")

</div>

当用户付费获取邀请链接时，他们将获得一个链接，该链接允许他们使用任何他们想要的电子邮件地址进行注册。问题是，如果他们决定取消购买，那么我就需要知道是哪个用户在取消。如果注册时有一个隐藏的自定义固定字段包含交易 ID，我就可以做到这一点。

---

<div class="post-metadata">

### 作者： ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### 发布日期： [2025 年11 月 4 日 19:01 UTC](https://meta.discourse.org/t/is-there-a-way-to-associate-a-transaction-id-with-an-invitation-link/386113/2 "2025-11-04T19:01:49Z")

</div>

嗨 Willy！看起来没有人知道你问题的答案。据我所知，没有内置的方法可以将交易 ID 与邀请链接关联起来。但是，你可以限制邀请链接，使其只能使用特定的电子邮件地址进行兑换。你试过这个方法吗？

---

<div class="post-metadata">

### 作者： ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### 发布日期： [2025 年11 月 20 日 20:24 UTC](https://meta.discourse.org/t/is-there-a-way-to-associate-a-transaction-id-with-an-invitation-link/386113/3 "2025-11-20T20:24:21Z")

</div>

哦，等等，我仔细看了看你的问题。如果你给每个人发送他们自己的邀请链接，那么这个链接对他们来说就是唯一的。如果他们取消购买，你可以在“待处理邀请”页面上找到邀请链接并将其删除。

---

<div class="post-metadata">

### 作者： ![Willy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/willy/32/499930_2.png) [@Willy](https://meta.discourse.org/u/Willy)
#### 发布日期： [2025 年11 月 20 日 22:13 UTC](https://meta.discourse.org/t/is-there-a-way-to-associate-a-transaction-id-with-an-invitation-link/386113/4 "2025-11-20T22:13:20Z")

</div>

是的，但那是在注册之前。我指的是注册之后。

---

<div class="post-metadata">

### 作者： ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### 发布日期： [2025 年11 月 20 日 22:31 UTC](https://meta.discourse.org/t/is-there-a-way-to-associate-a-transaction-id-with-an-invitation-link/386113/5 "2025-11-20T22:31:57Z")

</div>

请尝试使用此数据探索器查询。

> [@Use data explorer to get a list of users who signed up via invitations](https://meta.discourse.org/t/use-data-explorer-to-get-a-list-of-users-who-signed-up-via-invitations/224871/8?u=tobiaseigen):
>
> I was able to update this [data explorer](https://meta.discourse.org/t/32566?silent=true) query to include the invite\_key used by the user to join the site. SELECT u1.username AS invitee, u2.username AS inviter, i.invite\_key, iu.redeemed\_at FROM invited\_users iu JOIN invites i ON iu.invite\_id = i.id JOIN users u1 ON iu.user\_id = u1.id JOIN users u2 ON i.invited\_by\_id = u2.id WHERE iu.redeemed\_at IS NOT NULL ORDER BY iu.redeemed\_at DESC
