#KRS-subscription
1 messages · Page 1 of 1 (latest)
I want to create annual billed monthly plan with backdated subscription.
the price is monthly recurring, schedule is created with iterations for a year.
can you share the subscription that doesn't work without using test clocks?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
ignore above one, this has the same date as the test clocks one - https://connect.stripe.com/test/customers/cus_MN3nMexRPirfL9
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Based on the request of subscription schedule creation https://dashboard.stripe.com/test/logs/req_Jgmm4YoyATxKZG, I don't see where you backdated the subscription and the first invoice was 100% off due to the coupon. There will be an upcoming invoice on 5 Sep with US$26.06
Based on the request, the behaviour is expected. Could you share what you expect from this subscription sub_1LeJfxK5Jxl3vjtiE8OyxYzy?
check the start_date of the subscription schedule it is started on 5th Nov 2021
the problem is with this - https://connect.stripe.com/test/subscriptions/sub_1LeCglK5Jxl3vjtiFWBIC3qH
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
this invoice will be 100% coupon because we dont want to charge for the current cycle - https://connect.stripe.com/test/invoices/in_1LeCglK5Jxl3vjtiy2uepWI6
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
this is the problematic invoice - https://connect.stripe.com/test/invoices/in_1LeCgqK5Jxl3vjtiNjY2wSc8
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
this invoice and the 0 amount invoice is created for the same dates and it is created only with test clocks.
ok @still bolt lets close this test clocks issue first and the move on the next one.
sure!
Copied over the question:
I am trying to understand why this subscription is cancelled automatically with reason as delinquency - sub_1LGnt2I5vSu94Gk88K0XN0xO
Based on your subscription setting: https://dashboard.stripe.com/settings/billing/automatic, subscription will be cancelled if all retries for a payment fail
Thanks, understood.
for the previous test clocks issue, are you looking into it?
I'll be stepping away. My colleague Alex will be taking over this thread and following up
i'm a bit confused. You mentioned that cus_MN3nMexRPirfL9 has two invoices - but i'm only seeing one invoice. Are you sure this is the correct customer?
@spark ginkgo cus_MN3nMexRPirfL9 is the working customer WITHOUT test clocks. cus_MMwZ0DlkQxCuVQ is the problematic customer WITH test clocks
Hi @wraith harness I'm taking over this thread.
Which customer shall I take a look at in? cus_MN3nMexRPirfL9 or cus_MMwZ0DlkQxCuVQ
cus_MN3nMexRPirfL9 is the working customer WITHOUT test clocks. cus_MMwZ0DlkQxCuVQ is the problematic customer WITH test clocks
Are you using the test clock the advance the time during your test? I can see that a few invoices were created in this customer's subscription and they were all paid.
yes. i am using test clocks to advance and check it.
if you see the test clocks subscription, the first 2 invoices - both are created for the same duration
1st is with coupone 100% but as per the working scenario, i dont expect the 2nd invoice in the same time period
Hi @wraith harness thanks for the waiting, discord is busy today.
It seems like you have two subscriptions schedules for the same subscription, and the start_date of the first phase is both 5 Nov, this explains the two invoices.
I need to step away so I’m going to archive this thread. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
if you check the logs, the first schedule is ended and then the 2nd schedule is added to the subscription
lets look at another example - https://connect.stripe.com/test/subscriptions/sub_1LeCgvK5Jxl3vjtiDWkmJanj - this subscription is just created and the clock is not advanced here there is a draft invoice which is for the same period as the paid invoice
can you check and confirm if you could see the issue?
yep
what I see is you create a schedule starting around 6:52am. The first phase uses a monthly plan, with a 100% off coupon, and you set the phase to start at the creation time of the schedule(this morning around 6:52am) and end this morning at 9am
At 9am, the phase ends and the next one begins. That phase uses the same plan, with no coupon, so it charges an invoice for the upcoming month.
What did you want instead exactly?
check this - https://connect.stripe.com/test/subscriptions/sub_1LeJfxK5Jxl3vjtiE8OyxYzy - this subscription is created WITH OUT test clocks. here the draft invoice is correct
no let's stop there
can you explain what you want to happen or see instead so I'm clear?
I'm confused by what passing start_date:1636102800 back in 2021 is intended to do, so I need to understand your use case
I wan to create a backdated subscription with monthly billing.
for which till the end of the current billing cycle, the invoice should be 0
and the next cycle bills should be created as like normal
ok so going back to
: lets look at another example - https://connect.stripe.com/test/subscriptions/sub_1LeCgvK5Jxl3vjtiDWkmJanj -
what is wrong with that one, how does it differ from what you wanted to see?
sub_1LeCgvK5Jxl3vjtiDWkmJanj - does not have the 2nd invoice with the same time period.
which time period exactly?
(like, day and month for the start and end of the period)
are they? the $0 one is for SEP 4 - OCT 4, 2022 and the $26.06 one is for SEP 4 - OCT 4, 2022
both are for SEP 4 - OCT 4
great
so ok, what do you want them to be instead exactly?
this behavior happens only when i use test clocks feature
what do you want each one to be , day and month
i am not worried about the day and month now, my worry is is the creation of 2nd invoice, and it happens only with test clocks feature
bear in mind Stripe really doesn't support the concept of backdated subscriptions(you can pass a backdate and we can calculate initial proration from that, but you can't make start dates of subscriptions or invoices be in the past as far as I know)
hmm but it feels like it should be created, since you're starting a new phase at 9am, and removing the coupon. Are you saying you made an identical API call and got a different result?
yes. now i will give the working subscription which does not have the test clocks feature
I am expecting this behavior with test clocks so that i can test the renewal scenarios succesfully
yep. So to be clear, the other example is correct, since it should generate an invoice when the phase changes since you use
"default_settings": {
"billing_cycle_anchor": "phase_start"
}
as for why it's not happening on the other one, isn't it because the phase change is not until 1662368400 which is 31 minutes from now?
I can wait for 30mins and confirm it.. but if you see the problematic invoice, it is created immediately after the backdated subscription is created, there was no advancement of clock. clearly there is some issue when i use clocks and without clocks.
yes, that I don't know. I assume it's just the schedule creation request is handled differently when a clock exists. Like some kind of edge case or bug internally.
so i should not use schedule with test clocks with backdated?
I don't believe I said that
you should use them if you need to use them to accomplish what you're looking for
so you mean ignore the fact the an invoice is created for same period, but continue to test the scenarios by advancing the clock?
it does seem like there's a bug, I'll file something internally for it and you should write to https://support.stripe.com/?contact=true to report/get updates on it; but in the grand scheme of things it might be something you can work around
I mean what else can you do exactly?
you can't change how our API works and if there's some bug, there's some bug
ok understood.
if you can do me a favour and not touch anything about sub_1LeJfxK5Jxl3vjtiE8OyxYzy and just let it play out naturally, it will help me file a report later since I can show the difference between that and the one with the clock
Ok I will just change the name so that i can remember not to update it.