#Gidgidonihah - Subscriptions
1 messages · Page 1 of 1 (latest)
Of course. Just ran through the sample app again to grab an example. evt_1L0BFDASXOmDRWnWwSp6AUox
Taking a look, hang on...
This looks like expected behavior to me. The Subscription was created in this request with payment_behavior set to default_incomplete: https://dashboard.stripe.com/test/logs/req_W9bU5AMHeBSZ5U
Using default_incomplete means the Subscription does not immediately try to charge the Customer (which means it's impossible to have a billing_reason set to subscription_create): https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_behavior
The confirmation of the Payment Intent belonging to the first Invoice of the Subscription updated the Subscription as a result of the successful payment, which is why you're seeing subscription_update.
I could see that being expected behavior. But if so, that's inconsistent with both the docs I linked, as well as the sample app built using the stripe CLI. Both specifically choose default_incomplete as the payment_behavior. And both look for subscription_create as the billing_reason on the event.
Both the docs? I'm only seeing one docs link in your messages above. What is the second one?
Sorry, with both I was referring to the docs I linked above (1) and the sample app generated by the stripe cli (2)
The code generated for the server by the stripe cli (stripe samples create subscription-use-cases) is consistent with the docs I linked.
Let me have a closer look, maybe I'm missing something...
It looks like evt_1L0BFDASXOmDRWnWwSp6AUox has "billing_reason": "subscription_create", which is what you're expecting, correct?
I see evt_1L0BFDASXOmDRWnWwSp6AUox having "billing_reason": "subscription_update"
Where are you seeing that?
Scroll down to the Webhook attempts section and expand those. You'll see it was set to subscription_create when we sent this Event to your endpoints. I think the Dashboard displaying that information up above is a bug that we'll investigate.
I also logged it on my server, and it's consistent with what the UI shows there.
I've also expanded all lines on that page and there isn't a single subscription_create
Ah, it's different for the different endpoints for some reason...
Oh, I think it's due to the API version you're using. Let me confirm that...
Dang, I should have brought that up. For some reason we are on 2017.
Yep, here we go: https://stripe.com/docs/upgrades#2018-10-31
subscription_create didn't exist prior to 2018-10-31