#Gidgidonihah - Subscriptions

1 messages · Page 1 of 1 (latest)

frank flume
#

Hello! Can you give me the ID of the Event in question? It should start with evt_.

cold rampart
#

Of course. Just ran through the sample app again to grab an example. evt_1L0BFDASXOmDRWnWwSp6AUox

frank flume
#

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.

cold rampart
#

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.

frank flume
#

Both the docs? I'm only seeing one docs link in your messages above. What is the second one?

cold rampart
#

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.

frank flume
#

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?

cold rampart
#

I see evt_1L0BFDASXOmDRWnWwSp6AUox having "billing_reason": "subscription_update"

frank flume
#

Where are you seeing that?

cold rampart
frank flume
#

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.

cold rampart
#

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

frank flume
#

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...

cold rampart
#

Dang, I should have brought that up. For some reason we are on 2017.

frank flume
#

subscription_create didn't exist prior to 2018-10-31

cold rampart
#

Perfect, that explains it all.

#

K, thank you. You've been very helpful. Armed with that information I can move forward.