#mathiasm8
1 messages ยท Page 1 of 1 (latest)
Could you elaborate with some concrete example Ids?
Yes. Looking at this customer with this subscription: sub_1OLYSZHVEPNMaKoQ16S5p1De
I see some upcoming invoices
+10
But when I call the API to recieve the upcoming invoice for that user, I only get one item in the array. I would have expected the same list?
Okie it has a bunch of prorations. What result do you get when calling Upcoming Invoice for the user?
Is that lump sum of all those items? No, right?
If I somehow can share the entire json response privately I could do so?
This is the call I make:
const upcomingInvoice = await stripe.invoices.retrieveUpcoming({
customer: 'cus_Oy3PWMZxcX7xsT',
});
This is Test mode right? Feel free to share the response in a file here
Yes this is test
Btw
If you specify the Subscription Id here https://stripe.com/docs/api/invoices/upcoming#upcoming_invoice-subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What do you get?
This is the intire json response I get when making the call above
entire*
Another way to solve this, could be to set the proration_behavior = always invoice, which I'm considering.
As it seems more simpler ๐
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
That's the response from here
Which is for "WODHERO PREMIUM โข WODHERO PREMIUM" on Dec 19
sub_1OLYSZHVEPNMaKoQ16S5p1De is on Jan 9, so the one on Dec 19 is more "near future", hence it's displayed for the whole customer instead
You can specify the Subscription Id on your Upcoming Invoice to get the exact Upcoming on the Subscription you want
Here
So if I specify the subscription id on the upcoming invoice, I would then get the more detailed lines insted of the summarized invoice?
This call:
Also includes just includes "il_tmp_11ee22HVEPNMaKoQ3e082f25"
You will get the correct Upcoming Invoice of that Subscription
without subscription it will take the nearest Subscription's Invoice, which could be a different Subscription
Okay. Looking at: https://dashboard.stripe.com/test/customers/cus_Oy3PWMZxcX7xsT I see a lot more pending invoice items. Can I somehow retrieve the same for that customer through the API?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
That page has a lot of different Subscriptions
Again you would want to limit down to one Subscription by passing the subscription parameter as mentioned above
Okay.
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
I think I understood enough of it to get me going. However I think it will be more simpler if I just use the proration behavior to always invoice. I can't see situations where this would not work or be a bad thing? It would be more simpler to implement and also help prevent fraudulent if not paying upcoming invoices?
always invoice might mean that your customer could pay for the same period twice
Good to know, I was not aware of that!
I think I'm good for know, thank you for the great support ๐
now*
let me know if you need any more help
Will do.