#binh
1 messages · Page 1 of 1 (latest)
Hello, what is your question?
yes, i would like to know if it's possible to change the day value or disable it
Yes you can set the day value on this page https://dashboard.stripe.com/settings/billing/automatic
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
another question regarding refunds.
when we apply refund to an invoice, why is it prorated? it's not possible to provide a full refund?
What are you doing that creates a refund here? If you are refunding a previous payment it should refund the whole thing unless you specify a partial amount
so, if in the API we have prorate = false, it should be a full refund?
not a 100% certain what the other dev did on the refund. but i did see prorate=true, probably by mistake. but what happens if the invoice was created with prorate = false?
Yes you can set the day value on this page https://dashboard.stripe.com/settings/billing/automatic
I'm looking at the page, but I don't see the feature. Is it the subject: Prevent failed payments? upcoming renewal events?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
and it has the option of 3 days. what happens if i want to disable it or set it to 1 day?
Correct, prorate=false in the cancel call should mean that Stripe does not credit/refund a prorated amount based on when in the month you cancel
And unfortunately it looks like that setting only goes as low as 3 days at the moment. I don't think you can disable the event being generated but in that case you can avoid subscribing/listening for that event in the first place
but in that case you can avoid subscribing/listening for that event in the first place
can you provide more context
When you create a webhook endpoint, you choose what event types to listen to
So if you don't want that event, don't include that event type in the list of event types that you are listening to
our problem is, with the 7 day auto schedule. it creates the invoice for that upcoming date... and when we update the subscription schedule within 3 days of the expiring... the 7 day invoice already exists... so, now we're dealing with 2 upcoming invoices
That shouldn't be possible. How are you updating the subscription such that there are two upcoming invoice? Can you show me your code here?
When you create a webhook endpoint,
this will prevent us from listening for it, but it doesnt prevent the auto schedule generating the invoice?
The invoice isn't actually generated until the subscription cycles
Upcoming invoice is just a temporary object used to help preview what you will see if the current state persists
i cant recall sample atm.
but let me write out the sequence flow
we create a subscription with 3 phases:
p0: down payment invoice date 2023-05-01
p1: free trial 7 days 2023-05-08
p2: recurring invoice 2023-05-08
on 2023-06-01 an upcoming invoice scheduled for automatic payment in 7 days for 2023-06-08
update subscription on 2023-06-06
p3: free trial 7 days 2023-06-06 - 2023-06-13
p4: recurring invoice 2023-06-13
invoice charge will be on 2023-06-08 and 2023-06-13... we don't want the 2023-06-08 to occur
Ah gotcha, so that 2023-06-08 won't happen but you will get two upcoming invoice events
So I think the solution may be to check your subscription's schedule to see if the next phase will start before the invoice will be created
These events are created at the subscription level and the subscription is not aware of its schedule like that
could you provide an example
If you reach our to our support team about your use case they may be able to put in a feature request to help you here but in the mean time you will either want to ignore the event or do that check on the schedule to see if the invoice from the event will actually happen
and it actually happens? we will have to cancel it?
If you reach our to our support team about your use case they may be able to put in a feature request to help you here
thanks for the insight
So going with your example, you get an event on 2023-06-01 that an invoice will be happening in 7 days. You can then retrieve the subscription whose ID is in the subscription property of the invoice and the schedule that is in the schedule property on the subscription (you can use expansion to get both of these in one call)
Then you look at the schedule object's phases property, the first phase will be the current one, so you check its end_date. The end_date in this scenario is 2023-06-06 which is less than seven days from now so you know this invoice won't actually be created
and it actually happens? we will have to cancel it?
Nothing happens and you can ignore the event. An upcoming invoice is just a temporary preview of what the next invoice might look like. No actual object is created and no attempt to charge the customer will be made
you will either want to ignore the event or do that check on the schedule to see if the invoice from the event will actually happen
i've seen the invoice from the event actually happen from my analysis before.
if we ignore it, the customer gets double charged
ok, i've found the subscription case
if you look at the events for the subscription: sub_1MtnfJLBDgrs2MW81kKO6pbV
upcoming invoice scheduled for auto payment in 7 days 4/29/23
schedule has changed 5/5/23
charged 5/6/23 for the auto payment in 7 days
Hello 👋
Stepping in as Pompey had to step away
Can you give me a quick summary on what you're blocked on?
we want to disable the upcoming invoice scheduled for automatic payment in 7 days
So quickly looking at the event from the change on 5/5, the change to the subscription did not create a new free trial as you mentioned in your example scenario https://dashboard.stripe.com/events/evt_1N4GhBLBDgrs2MW8F9SYQRpT
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
And the user was only charged once
no, in this case it did not.
right, it was charged once. but from the wrong invoice
So there was no double charge, the preview just showed an upcoming invoice that actually happened
my point is, the auto schedule charged... when we updated the subscription after the auto schedule, it did not cancel it.
The preview invoice is not why the charge happened. It is the other way around, we preview the invoice if it looks like one will happen as long as no other changes happen
Can you explain what you wanted to happen with this subscription? It sounds like the schedule should have been configured differently
Can you explain what you wanted to happen with this subscription? It sounds like the schedule should have been configured differently
yes, we might have configured it wrong.
when we update the subscription schedule, after the upcoming invoice scheduled for auto payment in 7 days, we want the auto 7days to be removed (replaced by the updated subscription schedule)
What do you mean by having the auto 7days be removed?
What do you mean by having the auto 7days be removed?
auto 7days = upcoming invoice scheduled for auto payment in 7 days event
our goal is to not have the upcoming invoice scheduled for auto payment in 7 days event charge to trigger
Then remove it from the list of events that your endpoint listens to. No invoice was created because of the event, you got the event because your subscription was already set to renew on 05/06.
You can find your webhook endpoint on this page and can edit its settings from there https://dashboard.stripe.com/webhooks
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
The settings will include the event type that you are listening to
ok, ty for confirming
ty Pompey, appreciate your support as always.
after we remove it. will stripe check again? or it's a one time with the setting of 7days?
Of course glad I could help.
Also taking a quick look at the subscription it looks like it was created on 04/06 and just had a monthly price which is why we charged on 05/05, the first $0 invoice is because the user had a 100% off coupon on the first month, so it looks like there was not a trial
Stripe will not send any more of this event once you remove it from your endpoint.