#carrotfertilitysupport_api

1 messages ยท Page 1 of 1 (latest)

plucky knotBOT
#

๐Ÿ‘‹ 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. Thank you for your patience!

โฑ๏ธ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.

๐Ÿ”— 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/1214649354569252925

๐Ÿ“ Have more to share? You can add more detail below, including code, screenshots, videos, etc.

late slateBOT
small linden
#

Here's an example of the two invoices created - one Draft and one open

#

And despite seeing a sent event on the open invoice:

uneven timber
#

Hello! Can you give me the two IDs for those Invoices? The IDs start with in_

small linden
#

We're not receiving the test emails. So I'm wondering if sendInvoice is the correct function to be using in this scenario

#

Sure thing

#

the Open invoice is: in_1Or3CvK1rU3BMAyYYlPebTBo

#

Draft: in_1Or3CvK1rU3BMAyYbGCsO0Ik

#

are we unintentionally creating duplicates?

uneven timber
#

With a few exceptions, we don't send emails in test mode, so that's expected.

small linden
uneven timber
small linden
#

ah ok - as i suspected! hrmmmm

uneven timber
#

We are supposed to send emails in test mode under the conditions you linked to, but candidly it's flaky and I wouldn't count on any emails working in test mode.

small linden
#

ah okay - that's helpful to know. wanted to make sure we weren't crazy lol

#

and just to confirm - using the function sendInvoice vs finalizeInvoice is what we want to be using here if we are attempting to both finalize & trigger an email to the customer?

uneven timber
#

You don't need both, I don't think. Using sendInvoice should finalize it for you.

small linden
#

great - this is super helpful, thank you

#

now to figure out how/why we're unintentionally creating dupes ๐Ÿค”

#

appreciate your assistance!

#

would calling createInvoiceItem unintentionally create a new invoice? even if we're passing it an invoice ID from a previous createInvoice call?

uneven timber
#

Yes, probably, but I would need to see the code to say for sure. One thing I noticed was that the metadata is different between the two creation requests. Looking for that metadata difference should help you find where in your code the duplicate creation request is happening.

small linden
#

Ah, okay - perfect. Thank you!

uneven timber
#

Happy to help!