#sandeep-kumar_best-practices

1 messages ยท Page 1 of 1 (latest)

wheat templeBOT
#

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

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

naive tree
#

hi there!

wintry sky
#

For charges with invoice=null which don't have any linked invoice, we use to skip them in our existing logic, but with basil/clover update we can't distinguish b/w charge with invoice and without invoice mapping.

#

If the charge has invoice=null, we can't fetch invoice_payments as we don't have invoice ID

naive tree
#

if you use the endpoint I shared with a specific PaymentIntent ID (that you can find on the Charge object), then it will return the related Invoice (if there is one).

wintry sky
#

but we will endup making N+1 queries, and it could leads to slow sync for merchants with large dataset (with millions of invoices and charges)

naive tree
#

agreed. another option would be for you to add metadata to PaymentIntent/Charges when you create the Invoice. This way you can more easily tell them appart.

wintry sky
#

Also are you sure we can fetch the invoice_payments with payment_intent_id. I can't see it in the parameter list. Also checked with CLI

wintry sky
naive tree
#

As we are syncing historical data for our merchants, we can't add meta for existing data. ๐Ÿ™
the last option is to not use Basil/Clover when retrieving Charges, to get access to the invoice property.