The Stripe API is quite overwhelming. I found out, that there are some webhooks which are present because of backward compability (i.e.: Plan, Charge..)
My intention is quite "simple":
My app should allow users do something, when they successfully paid their subscriptions or products. Some of the things I sell are Subscriptions and some are "One Time"-payments.
I don't know which webhooks I should use to and not miss any payments.
There is:
- invoice.paid
- invoice.finalized
- payment_intent.succeeded
- order.payment_succeeded
- checkout.session.completed
- checkout.session.async_payment_succeeded
and of course some callbacks if payments are failed:
- invoice.payment_failed
- invoice.finalization_failed
- payment_intent.payment_failed
- checkout.session.async_payment_failed
- order.payment_failed
- ...
- ..
My current assumption is that
- invoice.paid
- invoice.payment_failed
could be "the right" hooks
My second assumption is
- payment_intent.payment_failed
- payment_intent.succeeded
Am I going into right direction?
EDIT:
I add the content of Webhooks:
| Webhook | status | contains recurring products | product | contains one-time products | plan | customer | address |
|---|---|---|---|---|---|---|---|
| customer.subscription.created | incomplete | yes | id | yes | customer | — | |
| customer.subscription.updated | active | yes | id | yes | customer | — | |
| payment_intent.created | requires_payment_method | — | id | — | — | customer | — |
| payment_intent.succeeded | succeeded | — | id | — | — | customer | billing_details.address |
| invoice.finalized | open | yes (lines) | yes | yes | yes | customer | customer_address |
| invoice.updated (contains "previous_attributes") | paid | yes (lines) | yes | yes | yes | customer | customer_address |
| invoice.paid | paid | yes (lines) | yes | yes | yes | customer | customer_address |
| invoice.payment_succeeded | paid | yes (lines) | yes | yes | yes | customer | customer_address |
| checkout.session.completed | complete | — | — | — | — | customer | billing_details.address |