#MacHacker-checkout-proration-behavior
1 messages ยท Page 1 of 1 (latest)
Hi. Looking into this now
I might have just found it, not sure why it was giving me an error last time but let me know what you find because I'm still trying to make sure it is actually working lol
What are you setting?
I don't believe it's possible to set proration_behavior through Checkout actually. Double checking now though
That's what I was afraid of ๐ฌ
I was trying to set it in the base level
of the payload
You could always take the route of using Elements
That with the Subscriptions API would allow you to use the proration_behavior parameter
lol, had to do that for my last client too ๐
Would there be any way to catch it with a webhook and update it before the charge goes through?
We'll probably go with elements later down the road but for now we have other things to get to so we are trying to save some time
The reason we don't want it prorated is because they are donations we are accepting
Yeah so I would recommend Elements for this
You won't be able to set it in Checkout unfortunately
Yeah I was able to test a little more thoroughly and can confirm there is nowhere it's accepted...
Thanks for the confirmation
No problem
@icy shadow , are you seeing prorations on the first payment for subscriptions you create with a Checkout Session? IIRC the billing cycle anchor defaults to today for Checkout so if someone signed up today they would be charged the full amount on the 23rd of every month
That's what I assumed, but yes one of our donations got prorated by the looks of it which is why I started looking into it
@vapid iron
Interesting. Do you have the ID for that donation?
Sure let me look into it again, one second
here is the event id evt_1K2isYCwu0QaPl6AvQf6a2pU where I noticed -> "proration": true,
actually, you know what... I think I've been looking at this backwards
I think originally they had meant to make a one time donation, so they asked for the subscription to be canceled
and it's when we canceled the subscription that the prorated charge occurred?
here is the customer id cus_Kh5lEUgHeZGm6h (not sure if you have access to any of this on your side)
but I also see
I was originally looking at the events page
which is why I guess I didn't notice there were actually two invoices
ok by the looks of it, the first charge was not prorated and they weren't charged a second time
it looks as if it gave them "credit" for canceling early?
Yes, that is exactly what it looks like. The cancellation is what created the proration/gave them credit here.
Hoora! I was not looking forward to hacking elements together again ๐
Ok that's perfect, I was originally poking around because I'm setting up webhooks to send more customized emails since these are donations and not purchases and when I came across what looked like a charge for not the total amount I started looking into prorated charge logic before even checking the customer page lol
Thanks for your help @vapid iron and @slender karma
Yes, glad we could clear that up. It looks like that subscription was cancelled through the dashboard so in future I think they just have to specify "No Refund" when cancelling.
Also as a other note, that credit can be zeroed out if need be https://stripe.com/docs/billing/customer/balance
Perfect I was just going to ask about that
Would there be a way to do that automatically on the subscription.canceled event?
Just in case someone forgets?
Ah, just scrolled down in the link