#rob-dev_api

1 messages ¡ Page 1 of 1 (latest)

jagged gateBOT
#

👋 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/1402281766751965365

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

noble garnet
#

Imports Stripe payouts and invoices* to the matching transactions - sorry

timber kite
#

hey there, taking a look at this

noble garnet
#

Thank you, let me know if you need additional info on the current flow we have in place

timber kite
#

I don't actually expect anything to have changed here in acacia -- there was a related breaking change in basil though.

#

Are you sure about the version you're using?

#

Can you share an example API request with unexpected results?

#

Oh wait, you said since 2025-02-24.acacia

#

So maybe you are referring to the basil changes

noble garnet
#

Yeah exactly, if we use the acacia version, everything works as expected.

However, we wanted to 'upgrade' to the latest version, in case the older versions get deprecated at some point.

timber kite
#

in case the older versions get deprecated at some point
If/when we decide to do this, you'd be given lots of notice

#

Basically invoice<>payments are no longer a 1-1 relationship, so the direct field references are removed

#

So what you need to do instead is look at the payment_intents for those payout details, then list invoices associated with those payments. I can already see this is going to be painful though because the List endpoint that lets you get invoice by PI is going to be one PI id at a time:
https://docs.stripe.com/api/invoice-payment/list#list_invoice_payments-payment-payment_intent

#

If your payouts are typically related to many invoices, this will be cumbersome with the current tooling

#

Can you share a bit more context about your use case so i can raise this friction internally?

#

Assuming I've understood correctly, upgrading to basil may not be a good choice for you right now, and instead you might wait until we make it easier to achieve what you're trying to do

#

At least for these payout/invoice mapping requests

noble garnet
#

Thank you so much for the details! I really appreciate it.
Can I shoot you a dm with all the details of our integration?

timber kite
#

Sure -- I just a sent a friend request to let you DM

jagged gateBOT
noble garnet
timber kite
#

Referring to this example, you should be able to get the payment_intent ID from the expanded charge (as source) on payments

#

1/ List BT using payout filter, with data.source expanded
2/ For each BT, inspect the expanded Charge object (source) and get the payment_intent ID
3/ For each payment intent ID, list InvoicePayments filtered by payment

noble garnet
#

And I guess I'll have to expand the Invoice object to get the invoice_pdf

timber kite
#

Yes, if you need that. The invoice payments would get you a list of invoice IDs, which is where we started

noble garnet
#

Clear! Once again, thank you so much
Please don't hesitate to reach out in case you need more details on our use case