最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

flutter - Preset the customer_email for stripe apple pay payments - Stack Overflow

programmeradmin1浏览0评论

I have made a flutter app with stripe integrated payments. I am using stripe hosted payment pages. My question is that when the user selects the card payments, the customer_email is sent with the webhook event that was prefilled by the checkout link returned from the server. But when the user goes through the apple pay method, the customer_email is set to the email of the apple pay account. How can I stop that from happening. I want to define the email that should be sent in the webhook event after the payment is completed.

I have made a flutter app with stripe integrated payments. I am using stripe hosted payment pages. My question is that when the user selects the card payments, the customer_email is sent with the webhook event that was prefilled by the checkout link returned from the server. But when the user goes through the apple pay method, the customer_email is set to the email of the apple pay account. How can I stop that from happening. I want to define the email that should be sent in the webhook event after the payment is completed.

Share Improve this question asked Feb 21 at 5:47 Arshpreet SinghArshpreet Singh 14111 bronze badges 3
  • On which webhook event are you looking at customer_email? Is it checkout.sessionpleted? It would be easier to provide the Checkout Session data for both Apple and non-Apple transactions. But technically you can't change the email after it is paid. – orakaro Commented Feb 21 at 8:03
  • if you are talking about the event type then I am talking about "invoice.paid". I don't want to change the email after it is paid. I want to know a way to define customer email before I redirect the user to the stripe hosted payment page where they can either go for card payment method or apple pay. – Arshpreet Singh Commented Feb 21 at 8:06
  • I will explain my situation using an example, suppose there are two email my user uses, lets say X and Y. He is trying to create an account on my app with email X but the apple pay account on his phone uses Y. My backend needs to receive the email X from the webhook event from stripe after payment is made, but when the user is selecting apple pay method. I am getting the email Y. I was currently using precreated payment link for each of my product and sharing that link with prefilled_email as X. I am looking into checkout session creation in stripe to help me here. – Arshpreet Singh Commented Feb 21 at 8:09
Add a comment  | 

1 Answer 1

Reset to default 0

I would suggest that you consider using a different attribute altogether. Rather than use customer_email, consider adding your own metadata key-value pair, with the key being called something you can use in your flutter app like "flutter_email" and the value being the email you want to pass and receive through the webhook event. Stripe will send that metadata back to you through the webhook event. That way you won't be dependent upon what Stripe may/may not do to the customer_email data.

You can then also pass any other information you want through the metadata attribute in other key-value pairs, such as a customer ID that you have within your app, which might make it easier for your app to connect the webhook event to your own data.

发布评论

评论列表(0)

  1. 暂无评论