#william_code

1 messages ยท Page 1 of 1 (latest)

balmy oarBOT
#

๐Ÿ‘‹ 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/1222544001660485664

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

polar prawnBOT
rustic adder
#

Can you share more context about what you were expecting to see and what are you at the moment?

frozen vault
# rustic adder Can you share more context about what you were expecting to see and what are you...

Yes, I don't understand the logic of retrieveUpcoming.
Let me explain:
I have a subscription and its price is 106.8 incl. French VAT.
The user can modify the quantity of the subscription, so if the quantity is 2, the result will be 213.6 (variable depending on the prorata), but retrieveUpcoming doesn't give me this total.

Yes, subscription quantity isn't in the doc, but it doesn't return any error and it does modify the retrieveUpcoming total.

rustic adder
#

What amount are you getting back in the invoice instead? What are you setting subscription_proration_date to?

frozen vault
rustic adder
#

Can you share the response object you're seeing?

frozen vault
polar prawnBOT
mystic wave
#

I do see information on the total and the tax involved in that response:

  subtotal_excluding_tax: 44499,
  tax: 8899,
  test_clock: null,
  total: 53398,```
Can you tell me more about what you are expecting to see? Is it that the tax seems to be calculated incorrectly, or is something missing?
frozen vault
mystic wave
#

Can you try this again and print out the objects that are in the upcoming invoice's lines property? It looks like we just have [Object object] at the moment. The price doesn't seem to quite line up with a quantity of 5 either so I am not immediately sure what may be happening here

mystic wave
#

Thank you!

#

So the last proration item does show an amount of 35600 which is 4*8900. It looks like we got to a subtotal of 44499 because the proration related items had amounts of 35595 and 26696 . But I'm not immediately sure why there is the full amount of the 4 are there as well as the proration amounts. That may be showing what the next invoice would be if the proration items were on it.

      object: 'line_item',
      amount: 35600,```
#

If you specify always_invoice that will show just the proration amounts.

frozen vault
mystic wave
#

Of course, thank you for your patience. I am glad we could figure that out