#mr-bitches_unexpected

1 messages ยท Page 1 of 1 (latest)

dapper laurelBOT
#

๐Ÿ‘‹ 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.

remote spruce
#

Hello can you send me the in_1234 ID of this invoice?

jaunty fable
#

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

remote spruce
#

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

jaunty fable
#

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

remote spruce
#

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?

jaunty fable
#

Definitely give me just a second

jaunty fable
#

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?

remote spruce
#

Yes please

jaunty fable
#

sub_1PSlgpKkdqtGGO7iKWwcY1Ee

dapper laurelBOT
remote spruce
#

Thanks for the ID, I am still not sure why that subscription did not create an invoice immediately but am still looking

jaunty fable
remote spruce
#

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.

jaunty fable
#

Definite I'll do that right now and update you with the results

remote spruce
#

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.

jaunty fable
#

Just to clarify am I adding the backdate_start_date alongside the billing_cycle_anchor_config ?

upbeat tide
#

๐Ÿ‘‹ Sorry for the delay!

#

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