#mochihealth

1 messages · Page 1 of 1 (latest)

strange crescentBOT
winter granite
#

That's kind of a broad question, as that event will generate whenever a Subscription is created and the status that is shown could fluctuate widely depending on your setup.

#

Pulling in your additional message for further context:

because i see for some customers that they signed up for a subscription and we put them on a trial after but at the same time they have another active subscription with a $0 invoice attached to it

#

Can you share the ID of two test Subscriptions where you saw different behavior between them?

placid lagoon
#

they are not test subscriptions they are prod

#

we have admins that do stuff manually on stripe

#

but im not sure if it was them or a bug

#

wanted to see if you can delve deeper for me

#

should i give you the two real ones

winter granite
#

Yeah, live works as well.

placid lagoon
#

ok

#

sub_1MK2XmBPM36OC3gXZdWc0Uct

#

thats the one with the $0 invoice

#

sub_1MJhBOBPM36OC3gX4y1tQ5ix

#

is the one that was paid for and put on trial

winter granite
#

Thank you, I'm pulling those up and comparing them.

bitter glacier
#

toby is stepping out soon but I am looking in to these. So the question is basically why sub_1MK2XmBPM36OC3gXZdWc0Uct was created as active when your integration was not expecting that?

placid lagoon
#

yea

#

in what scenario is the webhhook event for customer.subscription.created started with an active status of true

#

because usually it starts off as inactive

#

and why was their a $0 invoice for that subscription

bitter glacier
#

Took me a bit but it looks like cus_N2SuX9ncvcD6YP, the customer for sub_1MK2XmBPM36OC3gXZdWc0Uct , had customer credit which was applied to that invoice and immediately paid it.

placid lagoon
#

how does a customer get a credit through the stripe dashboard

bitter glacier
#

Checking in to how that customer got credit, there are a couple ways you can give it to them

placid lagoon
#

do you know if that subscription was created on the customers end or our end

bitter glacier
#

Still looking in to the credit side of things

placid lagoon
#

isnt that stripes endpoint not our own

bitter glacier
#

It is our API endpoint, so it would have been your code reaching out to our API endpoint

placid lagoon
#

but cant that code be triggered from the stripe dash

bitter glacier
#

It can, but that would show up differently in out system. On your side you can see this on the page for the request

#

Specifically here

#

For dashboard requests it will show up as this

placid lagoon
#

but i dont listen the the subscription.created webhook on our side only the updated one

#

i do make calls to create a payment intents for subscriptions when the customer creates a subscription but that is the only time the webhook is called

#

and for that they would have to pay to complete it

#

unless you are telling me that if they had a credit on their side for more than the cost of the subscription then if they created another subscription it would automatically go through withough requiring payment

#

would you be able to check the history of the customer credit

#

credits

bitter glacier
#

I'm still figuring out how exactly this credit got added to the subscription but basically it looks like the user had $78.61 in credit when this subscription was created. The first invoice was for $79 so that credit brought it down to $0.39, which is below our $0.50 minimum charge threshold so that $0.39 got pushed off to their next invoice which was then for $79.39

#

Because that credit number is a bit less than the subscription amount, I am guessing they may have had a previous subscription that was cancelled with proration soon after it started a new cycle. Trying to find confirmation on that

#

Ah I think I found it. It looks like someone started a trial on their existing subscription soon after it started and they accidentally created a proration when doing so, that have them the $78.61 in credit. https://dashboard.stripe.com/logs/req_pcBcKUwYtUZx4P
https://dashboard.stripe.com/invoices/in_1MJkc6BPM36OC3gXClGzVbOZ