#goliath1879_webhooks
1 messages · Page 1 of 1 (latest)
đź‘‹ Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1474262312771649536
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there, let me take a look at in_1SvlshJs8yURePOrbwhT7j4L
Sure
https://docs.stripe.com/invoicing/integration?locale=en-GB#handle-payment-events Stripe sent invoice.paid only if the invoice was paid out-of-band. But this invoice was paid within Stripe so you should receive invoice.payment_suceeded. Let me dig further.
Thanks this information was helpful. Awaiting for your update
@grave grail This is going to require a bit more investigation. I'm going to send you a DM, can you reply with the information and example webhook event ID that you provided. We'll respond via email/ticket after looking into it further.
Hello @grave grail, we have sent you a direct message, please check it at https://discord.com/channels/@me/1474265823982915666
- đź”—The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
I will raise a ticket and share the id
Thanks!
I didn't receive any ticket id however I have sent an email
Can you check and confirm ?
Let me check
Yes we got your email
While we investigate why invoice.payment_suceeded wasn't sent, to make your integration robust, I'd also recommend you listening to invoice.paid event to get notified about successful invoice payments.
I can do that but only issue is invoice.paid doesn't has type attribute which invoice.payment_succeeded had
Without knowing the type it's hard to process the webhook on our end
What type attribute?
Event type
So what you can do is listeninig invoice.paid in addition to invoice.payment_suceeded so that your webhook handler will process invoice.paid events
But in that case how to handle such scenarios when we only receive one of the webhook events and not both
Which happened in this case
Both webhook response are almost similar ..as a matter of fact invoice.payment_succeeded has more attributes compared to invoice.paid
IIf your primary goal is to be notified of successful payments, you should listen for invoice.paid or invoice.payment_succeeded. Since invoice.payment_succeeded wasn’t delievered in your case, listening to invoice.paid will ensure you’re still notified when a payment succeeds even if invoice.payment_succeeded doesn’t arrive as expected.
as a matter of fact invoice.payment_succeeded has more attributes compared to invoice.paid
I don't think so, do you have a counter example?
I think you didn't get my problem here. How to know which webhook I am receiving without the event type mentioned in the webhook payload
There are only few attributes... The main object is the same i agree
The webhook event payload contains the event type, Can you show me your webhook handler code so that I can have a better understanding about how you process webhook events?
I'm AFK at the moment but you can check the invoice event I shared above.
You can check the code here https://github.com/frappe/press/blob/develop/press%2Fpress%2Fdoctype%2Finvoice%2Fstripe_webhook_handler.py#L56
https://github.com/frappe/press/blob/develop/press%2Fpress%2Fdoctype%2Finvoice%2Fstripe_webhook_handler.py#L65 you can add inovice.paid type on this line