Access customer information using Square Connect API

冷暖自知 提交于 2019-12-05 15:05:35

Not at this time. Regarding customer email addresses obtained for receipts, from the Square help center:

Based on our privacy policies and governing regulations, we cannot share cardholders' personal information with our customers when contact information is only collected for receipt purposes.

However, I'll pass this feedback along to the Connect API engineering team (I write the docs).

This is now possible as of V2 and the transaction.tenders.customer_id attribute.

In my use case I am attempting to get the customer from a webhook notification. As I see it, there are few steps required for this scenario:

  1. Issue the v1 request for the Payment using the webhook entity_id
    • /v1/{location_id}/payments/{payment_id}
  2. 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}
  3. 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}

If you have the customer_id in hand oviously you can skip straight to step 3.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!