#natalieh-chats
1 messages · Page 1 of 1 (latest)
Hi there! We don't do any video calls here but I'm happy to help over chat.
Go ahead and provide the details of the issue and I'd be happy to take a look
Much obliged, guv! We have a LOT of Customers who use Stripe installment plans with to take orders from their customers. Many of our Customers have reported the full amount owed to them is not being taken through installments. Sure enough, I ran my own test orders and it's true. I put all the data in a spreadsheet.
Can you provide one specific example I can look at?
And when you say "installments", do you mean you are using a Subscription Schedule to charge installments?
Or are these Mexican merchants and you are using actual installments as per https://stripe.com/docs/payments/installments?
These are subscriptions. One such subscription is sub_1L5x3eCdgcxv635iVWUdPoIr
I am also happy to send a link to the Google Sheet with all my data, including invoice numbers.
The expected here is that upon renewal for that Subscription it would charge $4.50, correct?
Ah wait
You are setting cancel_at
Can you tell me exactly what you expect to happen with that Subscription?
Yes, I will do my best. (Bear in mind our code was written by a former employee.) We expected that once a week, for two weeks, a payment of $4.50 would be taken. The first payment was taken fine. The second was only $2.57.
Yep okay
So the Subscription is working as expected, but it was created incorrectly.
I'll explain
Do tell!
You can see the creation request here: https://dashboard.stripe.com/logs/req_d2fgRAN2OIS8TD
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
In that request "cancel_at": "1655061497" was set
That timestamp is for Sunday, June 12, 2022 7:18:17 PM UTC
However, the Subscription was created on 2022-06-01 19:18:17 UTC
So that cancel_at date is not the full 2 week period.
You can see here: https://stripe.com/docs/api/subscriptions/create#create_subscription-cancel_at that: A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using proration_behavior. If set during a future period, this will always cause a proration for that period.
The last part applies here
"If set during a future period, this will always cause a proration for that period."
So that is where the $2.57 comes from
The cancellation date is only for part of that second week
So the customer isn't charged the full amount
To correctly do this, the cancel_at would need to be exactly two weeks from the creation timestamp
However, it really is impossible to do that, so really you should change your code to using Subscription Schedules like we show here: https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#installment-plans
Okay, so would it need exactly two weeks to the second? I would imagine I would need to have it based on exact moment of creation. No clue what it is based off of now.
Yep, which is why I'm saying it is impossible really
Gotcha.
But the Subscription Schedule solves that
Okay, and to confirm, you're confident the change will solve our problem? I gotta tell my boss if we have a solution in place.
What I linked is the correct way to handle installments, yes.
Alrighty.
I skimmed the page and it looks like this doesn't even create a cancel_at date. Is that correct? Does that mean the system will cancel automatically?
You use end_behavior: 'cancel' with Subscription Schedules
You may want to start by reading https://stripe.com/docs/billing/subscriptions/subscription-schedules
Which will overview Subscription Schedules as a whole
Very nice. Thanks for confirming that.
Oh great, thank you so much! I really appreciate your help.