#sai_rez-subscriptions

1 messages · Page 1 of 1 (latest)

finite rampart
#

sure, I can try. Do you have examples of the API responses (request ID req_xxx) or events (event ID evt_xxx) where you see different statuses for the same case?

analog vault
#

I can send you the customer ID for both test accounts to view the logs, is that okay?

finite rampart
#

sure that works too! Just trying to get the most specific thing possible

analog vault
#

The main issue is, the same flow on our dev account the subscription status returned from calling the api is incomplete with an open invoice, which we then confirm the payyment intent. However on the staging account, the status is returned active right away.

#

Stripe account Perlego Test Account
customer id : cus_KxKT4nwcTGpkNW

#

Stripe account Perlego
customer id : cus_KxK6Uosgnaz1vI

#

Both accounts with test mode on

finite rampart
#

let me look for a bit but I'm pretty certain it's to do with just the Customer on one of the accounts having a pre-existing credit balance

analog vault
#

That's strange because I created both as new accounts with our signup flow

#

I can't seem to open the second link

finite rampart
#

yeah since they're on different accounts so you'd have to switch to the other account first

#

but yeah this is quite strange, I don't have an immediate root cause. Could I ask you
a) is this reproducible consistently
b) if it is, can you try repeating it but instead of passing trial_period_days:0, omit that parameter entirely(just a hunch I have)

analog vault
#

As in pass in the trial days 0 when creating a new subscription?

finite rampart
#

as in pass nothing

#

trial_period_days:0 is the same as not passing it, it just says you don't want a trial

#

in theory it shouldn't matter if you omit it versus pass it as 0 , but it's just a hunch I have if you are able to quickly test it

#

but yeah beyond that if that doesn't help I don't know, I'd have to dig into this with some colleagues when the US is online later

analog vault
#

To give a better of the flow I took to get here. We're testing cancelled users to get back on the platform by creating a new sub with us.

Steps I take
1 - On our platform, create a new account and stripe subscription, we have a trial period set on the plan.
2 - Run a curl script to end the trial period so the subscription becomes active and payment is taken.
3 - On our platform cancel the account which cancels the subscription on stripe
4- If users want to reactivate, they need to create a new sub and enter payment details (where problem is)
5 - We then confirm the payment intent from the latest invoice to make the subscription active

#

During this flow where would I pass in trial_period_days:0 as I am going through our platform if that makes sense?

finite rampart
#

not sure, it's your code, and it's hard for me to have the context on which subscription we're looking at, the first or the second one. Sorry, I'm in about 15 other threads right now :p

The request ID I linked above shows you that you are passing trial_period_days:0 , so you could figure out what part of your code is making that API request and change it

#

from what you say I guess it's your step 4 where you create the new subscription and pass trial_period_days:0, so try changing your code to just omit that parameter entirely and see if it changes anything in the tests

#

sorry, something is definitely weird here but it's too busy for me to dig into deeply so if that doesn't help you might have to write to support instead and we can investigate

analog vault
#

Ah okay, I wasn't sure which step would be the best to omit that. I'll dive deeper in the code to see if we're passing that in