Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Stripe - Calculate Subscription Proration
proration cost = (period end - API request time) / (period end - period start) * quantity * plan price
@bocharsky-bw

This comment has been minimized.

Copy link

@bocharsky-bw bocharsky-bw commented Oct 31, 2017

What is API request time and how to get it? Is it a time in seconds?

@wannymiarelli

This comment has been minimized.

Copy link

@wannymiarelli wannymiarelli commented Aug 13, 2018

@bocharsky-bw it is the actual time, like date() now() or wathever. As of Stirpe uses unix time you should be able to use it to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.