#prasun3663

1 messages · Page 1 of 1 (latest)

jagged canyonBOT
fallow kestrel
#

Hi 👋 it's hard to say without more specific details, but it sounds like your end date wasn't perfectly aligned with the natural end of a billing period for the specified Price. So we calculated a prorated amount for the partial period at the end. I also suspect you had the Subscription Schedule set to cancel the associated Subscription, rather than release.

It may be easier to leverage iterations rather than manually calculate appropriate end dates to avoid proration calculations:
https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-phases-iterations

reef void
#
                                    'customer' => <stripeCustomerId>,
                                    'start_date' => <subscriptionStartDate>,
                                    'end_behavior' => 'cancel',
                                    'phases' => [
                                        [
                                            'items' => [
                                                [
                                                    'price' => <stripePriceId>,
                                                    'quantity' => 1
                                                ]
                                            ],
                                            'end_date' => <subscriptionEndDate>,
                                        ]
                                    ]
                                ])```
#

This is the code snippet which we used to create subscription schedule

fallow kestrel
#

Setting end_date explicitly is very tricky. You will need that to land exactly on the end of a natural billing period, or you will see a prorated amount for the final Invoice that creates.

reef void
#

The subscription was valid for 11 months where the correct amount $40 was deducted 10 months and in the last month this amount wss not deducted. Why?

fallow kestrel
#

I'm going to need more specifics to be able to answer that definitively, but I'm pretty sure it's because the end_date provided did not perfectly align with the natural end of the billing period for the underlying Subscription.

What were the billing period start and end dates for the final billing period of the Subscription you were testing this with?

reef void
#

The start date was 15th march, 2023 and end date was 16th Jan, 2024

fallow kestrel
#

Yeah, so likely not perfectly aligned with the billing period

#

Would need full timestamps to be sure

#

If you want to bill the full amount for the final period, you can't cut it short if you're using a Subscription Schedule.

#

Sounds like the last period on your Sub would have been Jan 15 - Jan 16 (again, depends on specific timestamps) which would result in a prorated amount of the partial period.

reef void
#

I understand the prorated amount but why $40 was not charged in thr last month?

fallow kestrel
#

It sounds like that is because it was prorated

#

Do you have the ID of the specific Invoice that you can share which you're worried about?

reef void
#

Yes

#

In my case the amount $40 was charged as follows
15 March, 2023
15 April, 2023
15 May, 2023
15 June, 2023
15 July, 2023
15 August, 2023
15 September, 2023
15 October, 2023
15 November, 2023
15 December, 2023

But not charged in 15 January, 2024
And the end date was 16 January, 2024

So you are saying as there was a prorated amount in Jan, 2024 so the last month amount $40 was not charged?
Am I correct?

fallow kestrel
#

Can you share the ID of the specific Invoice you're worried about? There is not enough detail there for me to definitively say what happened.

reef void
#

Will it be better if subscription id is shared?

fallow kestrel