是否可以使用 Square Connect API 访问有关商家客户的任何信息?最理想的信息是客户输入的收据电子邮件地址,但某种类型的唯一客户 ID 可以很好地确定回头客。
纵观整个Square Connect API 文档 https://connect.squareup.com/docs/api客户没有端点,付款对象不包含任何此类信息。还有其他 Square API 具有此功能吗?
从 V2 开始,这现在是可能的transaction.tenders.customer_id
属性。
在我的用例中,我尝试通过 Webhook 通知获取客户。据我所知,这种情况需要几个步骤:
- Issue the v1 request for the Payment using the webhook entity_id
/v1/{location_id}/payments/{payment_id}
- Issue the v2 request for the Transaction using the id returned on the Payment object. The only place the v2 transaction id is located is on the last part of the path in the
payment_url
attribute.
/v2/locations/{location_id}/transactions/{transactionId}
- Issue the v2 request for the Customer identified on the Payment tender(s). If there are multiple tenders the customerId should be the same for each.
/v2/customers/{transaction.tenders[0].customer_id}
如果您显然手头有 customer_id,则可以直接跳到步骤 3。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)