#Julio-preview-protation
1 messages · Page 1 of 1 (latest)
Hey! You'd want to preview the upcoming invoice: https://stripe.com/docs/billing/subscriptions/prorations#preview-proration
Hello and thx for the rapid answer
i've already read that , but if i understand correctly , this only works for updating an existing subscription right ?
Does this mean that i have to change the way i create subscriptions ?
You'd need to pass either the customer or subscription parameter: https://stripe.com/docs/api/invoices/upcoming
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But how are we expected to calculate prorations if there's no pre-existing subscription?
like with subscription_items ?
thx i think i got my answer in the API docs
The identifier of the subscription for which you’d like to retrieve the upcoming invoice. If not provided, but a subscription_items is provided, you will preview creating a subscription with those items
i think that's it
lemme try this out in Postman
Sure!
ok this works
So that's what i'm expecting,
I give you a customer and a price in the items, a billing_anchor_cycle, and start_date, and you give me the right amount. Thx
Perfect!