#AdirH

1 messages · Page 1 of 1 (latest)

gray sigilBOT
eternal oak
#

Hi 👋 can you elaborate? What part of your process are you wanting to handle without webhooks?

safe sentinel
#

I'm trying to implement the following flow:

  1. Create a customer - successfully done.
  2. Create a product - successfully done.
  3. Create a payment method - successfully done.
  4. Create a price - successfully done.
  5. Actually charge the customer - the current flow I've tried to implement is to create a PaymentIntent on the server side and confirmCardPayment on the client side, it worked good but the down side is that I have to wait to the "charge.succeeded" webhook in order to be sure that the charge actually succeeded.
    We currently don't support on web sockets on our app so I can't know if the payment succeeded or not.
    The perfect solution (if exists) for me will be to preform the confirmCardPayment method or something similar and get back in the response some property that indicates to me if the charge succeeded or not.
    Is it possible?
    Does such option exists?
    Thank you in advanced
    @eternal oak
eternal oak
safe sentinel
#

Yes, I saw it,
It returns the successful Payment Intent if the confirmation succeeds,
but this is not the actual charge confirmation right?
I mean is there an option where I'll get the successful Payment Intent but the "charge" webhook that i'll receive will be different from "charge.succeeded"?

eternal oak
#

If the underlying Charge fails then the Payment Intent will not move to a succeeded state. Since you're working with cards, you will immediately know whether the payment was successful, and the result of the confirmation request will indicate whether it was successful.

safe sentinel
#

Ok, so in other words, in my case the return of the successful Payment intent, indicates that the charge has been successfully done right?

eternal oak
#

Correct

safe sentinel
#

Ok ,perfect, thank you very much!

eternal oak
#

Any time!