#waldeedle_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1356994557061107862
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
/v1/invoices/upcoming/lines?subscription=sub_1R9KXWKjI0M1O6BOYdBN80kI\u0026subscription_proration_date=1745906400\u0026subscription_proration_behavior=always_invoice\u0026subscription_items%5B0%5D%5Bquantity%5D=15\u0026subscription_items%5B0%5D%5Bprice%5D=price_1QkVFYKjI0M1O6BOrmUWp619\u0026subscription_items%5B1%5D%5Bid%5D=si_S3RUojRRMfdUWw\u0026subscription_items%5B1%5D%5Bdeleted%5D=true
"subscription": "sub_1R9KXWKjI0M1O6BOYdBN80kI",
"subscription_proration_date": "1745906400",
"subscription_proration_behavior": "always_invoice",
"subscription_items[0][quantity]": "15",
"subscription_items[0][price]": "price_1QkVFYKjI0M1O6BOrmUWp619",
"subscription_items[1][id]": "si_S3RUojRRMfdUWw",
"subscription_items[1][deleted]": "true"
}```
the proration date provided as a param is Tue Apr 29 2025 06:00:00 which is midnight for my account timezone
You can pass https://docs.stripe.com/api/subscriptions/update#update_subscription-proration_date when updating the subscription to calculate prorations off the passed timestamp
Is that what you tried?
You referenced subscription_proration_date but param is called proration_date
this is for a preview on checkout
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
https://docs.stripe.com/api/invoices/create_preview#create_create_preview-subscription_details-proration_date I guess this specifically
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Gotcha
The time given must be within the current subscription period
Yeah that is the right, and only param, to use for previewing a proration at a specific time
As long as it's in the current period, you should be able to I think
Recommend trying it in test mode
I'm not 100% certain off the top of my head
I did test, let me provide the invoice it returned
now let me move it forward an hour and grab another, I'll summarize the key params so you dont have to go read it
oh nvm
I guess I was moving between midnight and thus was seeing different rates
it looks fine testing now
haha sorry for the hassle!