#aaparth-subscriptions

1 messages ยท Page 1 of 1 (latest)

gloomy osprey
#

@lean oxide a prorated amount from the time you create the subscription to when the billing anchor is

#

like if the price is $100 and you create it on the 15th of the month and the anchor is the 1st of the month, the prorated amount they're charged today is roughly $50, for example.

lean oxide
#

yeah that I have got it but is there anyway or any api in which I can pass on the price id and billing anchor to check how much will they be charged

gloomy osprey
#

yes, you want the upcoming invoice endpoint.

lean oxide
#

I have not yet created the subscription

gloomy osprey
gloomy osprey
lean oxide
#

okay let me check

lean oxide
#

@gloomy osprey

I tried it but it didn't worked

gloomy osprey
#

can you elaborate? what did you see versus what you expected to see?

lean oxide
#

I wants to create a subscription with the price_id= price_1K01PICmxQwltEUMcvD9VJSd, and I am passing the billing anchor = 1638316800000

so now stripe will not charge the full amount of 67.32 from the customer it will only charge till the billing anchor.

Now I want to know how stripe calculate the amount to be charged so that I will be able to show the same amount to my customer

gloomy osprey
#

sounds good! What code did you try to call that upcoming invoice endpoint then?

lean oxide
#

I tried it on the postman

#

actually I am unsure on what param to pass to get the upcoming invoice

gloomy osprey
#

what did you try?

#

the response will have a line item for the amount. ($14.54 in my particular case, would be different for you).

#

I'd suggest giving it a try! if you're stuck with something please share exactly what you're tried so far.

lean oxide
#

Thank you so much @gloomy osprey ๐Ÿ™๐Ÿป