#kirito - post payment flow
1 messages ยท Page 1 of 1 (latest)
You would have to poll the status of the subscription/invoice which would not be reccommended
Is there a reason you want to avoid using webhooks here?
If you are confirming these payments on your own page you can also send a signal about the payment completing from that page, which can sometimes get you the notification faster, but the client connection can cut out so you would still want the webhook for reliability
How can I send a signal to my page ?
I think I could use webhook to update data in my database and signal to informe user when payment is done
There are a lot of options there. A common one that I have seen is for your page to make a POST request to your server and for your server to verify that the payment is done and send back whatever info you want about the success
is there no way to receive it directly from stripe?
Yes, our Stripe.js functions will return the status of the payment
You are likely using something like confirmPayment which can return a full payment intent object
Though again, keep in mind that you need webhooks in case the client connection goes away before your server hears about the successful payment
I understand, thank you.
my next question is :
could I get the receipt instead of the invoice
The last section of this doc shows how to retrieve the payment intent if you do a redirect (the default flow) can look for an example without it if that is what you are looking for https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment
Good question, will look to see if you can get a receipt URL
Thank you
I think you can get it from the receipt_url property on the charge object https://stripe.com/docs/api/charges/object#charge_object-receipt_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
How do I get the charge object using webhooks, wish event and data object should I use?
kirito - post payment flow
PaymentIntent objects have a latest_charge parameter that would be the ID of the relevant Charge, you can retrieve the charge from there.
Otherwise you can listen to the charge.succeeded event
I understand, thank you so much ๐