#groarq-paymentelement

1 messages · Page 1 of 1 (latest)

ebon grotto
#

hi! not really I think. A redirect is always a GET.

wind radish
#

@finite merlin What's the use case? Perhaps I can suggest an alternative approach

finite merlin
#

So we need a PaymentIntent with attached payment source to it in the backend side, because then it is forwarded to our subscription management tool - ChargeBee

wind radish
#

Have you considered using webhooks for this?

finite merlin
#

Yes, we were checking the "amount_capturable_updated" webhook or just payment_intent created, however it does not fulfill our needs, because there is much more going on - like setting discounts and responding with proper notification to users. I've seen that there is alternative flow "Finalise payments on the server" which does exactly what we need, but it is on early access

wind radish
#

Will the payment_intent.succeeded event not be sufficient? The payment_method field will be populated in that event with the related object that made payment

#

We don't really recommend relying on redirects for business critical actions like fulfilment as there's no guarantee the user is redirected back to your app/site (they might close the window before they're redirected)

finite merlin
#

Due to some reason (I think it is our stripe configuration), confirmPayment on stripe elements is not capturing the intent, but just confirming it. So at the point of redirect, users is not charged

wind radish
#

The underlying advice still remains, you should implement webhooks and listen for related events to perform business logic. NOT relying on a redirect