#dulatello08
1 messages · Page 1 of 1 (latest)
[2023-07-14 10:24:35.063] http: GET /subscriptions/createCheckoutSession?plan=Starter (888 ms) 200
Unhandled event type charge.succeeded.
[2023-07-14 10:25:40.275] http: POST /subscriptions/webhook (101 ms) 204
Unhandled event type checkout.session.completed.
[2023-07-14 10:25:40.321] http: POST /subscriptions/webhook (7 ms) 204
Unhandled event type payment_method.attached.
[2023-07-14 10:25:40.377] http: POST /subscriptions/webhook (18 ms) 204
Unhandled event type customer.updated.
[2023-07-14 10:25:40.415] http: POST /subscriptions/webhook (8 ms) 204
Unhandled event type customer.created.
[2023-07-14 10:25:40.463] http: POST /subscriptions/webhook (16 ms) 204
Unhandled event type invoice.created.
[2023-07-14 10:25:40.525] http: POST /subscriptions/webhook (10 ms) 204
Unhandled event type invoice.finalized.
[2023-07-14 10:25:40.628] http: POST /subscriptions/webhook (6 ms) 204
Subscription for cus_OGMTew2b7hCQdt was created!
[2023-07-14 10:25:40.687] http: POST /subscriptions/webhook (7 ms) 204
Unhandled event type invoice.updated.
[2023-07-14 10:25:40.828] http: POST /subscriptions/webhook (7 ms) 204
Unhandled event type invoice.paid.
[2023-07-14 10:25:40.902] http: POST /subscriptions/webhook (13 ms) 204
Unhandled event type invoice.payment_succeeded.
[2023-07-14 10:25:40.988] http: POST /subscriptions/webhook (11 ms) 204
Subscription for cus_OGMTew2b7hCQdt was updated!
[2023-07-14 10:25:41.069] http: POST /subscriptions/webhook (6 ms) 204
PaymentIntent for cus_OGMTew2b7hCQdt was successful!
[2023-07-14 10:25:41.142] http: POST /subscriptions/webhook (5 ms) 204
Unhandled event type payment_intent.created.
[2023-07-14 10:25:41.223] http: POST /subscriptions/webhook (16 ms) 204
```. Soo my question is why payment intent is created after it was successful and which event do I use to add subscription to database and like activate it. And also where can I learn that?
Let's start with your first question - we don't guarantee order of webhook events (https://stripe.com/docs/webhooks/best-practices#event-ordering)
So it's always possible to get a payment_intent.created BEFORE payment_intent.succeeded
Hmm, makes sense, i guess
Ok, got it
If you want to know about subscription webhook events I'd suggest reading through https://stripe.com/docs/billing/subscriptions/webhooks
It walks through a bunch of the event types
Oh I see, somehow i never found that page, thanks, that answers all my questions