#Jonas Reif
1 messages · Page 1 of 1 (latest)
The best event(s) to listen to would depend entirely on what data/objects you need
What do you need to action specifically in the webhook?
so for our affiliate system we need:
- total amount
- amount of the payed tax (we are using stripe tax)
- the amount of the payed stripe fee
- the charge id (ch_ or py_)
When there is a complete refund or dispute resulting in a loss, we simply disapprove the conversion.
In the case of a partial refund, we need the following information:
The total amount paid (e.g., if the initial payment was €100 and we refund €80, the total amount paid would be €20).
The total tax paid (e.g., 19% VAT applied to €20).
The total Stripe fee paid.
We dont get all infos from the webhook itself. So we have to call the API anyway...
Hi! I'm taking over this thread.
I think the simplest option would be to listen to checkout.session.completed event. And from there do extra API calls to retrieve all the information you need
Hi Soma,
Ok.
We have a second use case, where the users make a 7 days trial.
Then we simply listen to invoice.paid and invoice.payment_failed webhook in your opinion?
Yes that makes sense! To learn more about webhook subscriptions I recommend reading this page: https://stripe.com/docs/billing/subscriptions/webhooks