#mr-bitches_unexpected
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1252338804556300435
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello can you send me the in_1234 ID of this invoice?
Yes sir
in_1PS4v7KkdqtGGO7iLI73gBVy
There are inconsistencties with the amount that is charged on an invoice. Heres an invoice where the amount dued was also different than the one displayed on the product.
in_1PSAkfKkdqtGGO7iqW9IYN1k
Amount Dued: $54.92
Ah those are prorations. I think because you are specifying a billing_cycle_anchor_config we are discounting for the time that has already passed in the day since midnight basically. If you specify proration_behavior: none or backdate the subscription start date to UTC midnight that day, this proration should go away
Thank you so much
If we specify proration_behavior:none, doesn't this make it so we don't send an invoice immediately? Would we need to wait until the next upcoming billing cycle to send an invoice??
When proration was set to none we were not able to charge immediately and we were not able to generate a client_secret
Proration behavior only affects the amount that you are charging. You would still be trying to charge your customer immediately
A client secret should still be generated. Can you try that again and send me the ID of the invoice if you don't see a client secret still?
Definitely give me just a second
I've tried adding proration_behavior='none' alongside the billing_cycle_anchor_config that doesn't seem to create an invoice and I'm unable to grab the clientSecret from by expanding latest_invoice.payment_intent. I have the subscription ID would you like me to send you that?
Yes please
sub_1PSlgpKkdqtGGO7iKWwcY1Ee
Thanks for the ID, I am still not sure why that subscription did not create an invoice immediately but am still looking
No worries, thank you for looking into it.
If it helps these were the docs we followed https://docs.stripe.com/billing/subscriptions/billing-cycle#:~:text=Disable the proration by setting,until the first billing cycle. We originally had proration_behavior set to none but according to the docs it says that this action doesn't generate an invoice at all until the first billing cycle.
It looks like we think the subscription won't start until July 17th for some reason.
Ah that would be it. Apologies, in many other cases no proration simply means that we charge the full amount.
Can you also try specifying backdate_start_date as midnight today? https://docs.stripe.com/api/subscriptions/create#create_subscription-backdate_start_date
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Definite I'll do that right now and update you with the results
That worked in my tests. You should actually only need to specify backdate_start_date to UTC midnight of the day you are creating the subscription on. That will create an initial invoice immediately and it will charge for the full month.
Just to clarify am I adding the backdate_start_date alongside the billing_cycle_anchor_config ?
๐ Sorry for the delay!
billing_cycle_anchor is only needed if you also want to specify a date in the future when the billing cycle should start: https://docs.stripe.com/billing/subscriptions/backdating#backdating-billing-cycle
if you set both backdate_start_date and billing_cycle_anchor, we'll prorate the amount for the time period between backdate_start_date and billing_cycle_anchor