Hello hardcore devs, all is well!
Is it normal for the platforms to encounter issues during monthly recurring charge due to the differences of timezone between their app server and the Stripe server? What's their usual solution?
We also encountered this one - where our app server is in JPT and as we know - Stripe accepts UTC time across all objects CRUD
Our solution is to translate JPT time to UTC for outgoing, and from UTC to JPT for incoming, it works like a charm and no issues so far during recurring charges. It's proven working also across varying months with 30/31 days, also the February 28/29 - It really works.
The disadvantage of this is it has a "maintenance period" from 12-mid JPT to 9AM JPT every 1st day of the month. The business logic strictly needs to follow 1st month 12mn JPT, but the actual charging happens on 12mn UTC (which is 9AM JPT)
When maintenance period occurs, there are also issues arising, but we managed to resolve them - they are those scenarios purchasing/canceling within 12mn - 9am 1st day of month time window.
Another issue we encountered just now is that, if old user purchases within that maintenance window, and cancels it - it supposed to charge them, but our system marks as trial until 9am because of the UTC timing. Therefore it was not able to charge. Our solution is to utilize the cancelAt so that this old user will be successfully charged according to business logic.
But somehow we also trying to consider if there's any other way to normalize everything without that maintenance period.
The only solution we think when we are going to remove the maintenance period is to set our server's timezone into UTC. But it's not likely going to happen.
Is there any way to avoid maintenance period? or our current solution is the right path?
Looking forward to your response.
Thanks,
Mike