#unmatchedplaya_api

1 messages ยท Page 1 of 1 (latest)

halcyon pythonBOT
#

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

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

slender swallow
#

Hi there

verbal shard
#

G'day!

slender swallow
#

How did you retrieve the ID that begins with il_tmp_?

verbal shard
#

from /v1/invoices/upcoming

slender swallow
#

Got it, okay. That endpoint doesn't actually create an Invoice, it's just a preview of what an upcoming invoice will look like

#

So you can't delete the "temporary" invoice items since they don't actually exist, if that makes sense

verbal shard
#

that's correct, but i think those temporary items are due to prices added to a subscription before the next invoice. I am looking for a way to get rid of those items

#

So there may be a better way than using upcoming and delete. I have also tried removing the prices with proration_behavior set to none but this still invoices those items

slender swallow
#

Can you share the customer ID you're using when calling the upcoming invoice endpoint?

verbal shard
#

yes, req_ESkj2CNDPOGU1o

#

oops no

#

cus_RGc0XbQ4e2LQlQ

#

copy paste issue ๐Ÿ˜…

slender swallow
#

So, to be clear, you want to remove the $39.43 invoice item from this customer so it's not added to a future invoice?

verbal shard
#

yes

#

I prefer not to use balance transactions

#

like literally just delete it if possiblee

slender swallow
verbal shard
#

ok I think that's done it.. So is the upcoming invoice item a reference to an actual invoice item? then deleting the latter cascades?

slender swallow
#

The upcoming invoice item is just a temporary snapshot of what the customer's next invoice will look like if created with the details passed in the request to retrieve the upcoming invoice.

#

If you want to delete an actual invoice item that has already been created for the customer, you'll need to look at the actual invoice items for that customer instead, not the "temporary" upcoming invoice

verbal shard
#

mm ok I will have a look. thank you for that information