#VoodooPrawn
1 messages · Page 1 of 1 (latest)
👋 Thanks for reaching out
What is your question?
Hey, kind of a complicated one
I am listening for payout.created on our backend
for connected Express accounts
and I'm trying to match up payments we have stored with the payout
all we currently store our side is the PaymentIntent ID (pi_) for the original payment
I'm currently taking the payout ID to get a list of all balance transactions within that payout
and I'm trying to marry this up with the pi_ we have in our system
to add further complexity, we have some connect accounts that use destination payments
and some that use direct payments
so I need to handle both scenarios when trying to match these payments up
I know a way of doing it if I go back to Stripe to retrieve each payment, but there could be hundreds, so I don't want to have to request hundreds of payments each time
The way I have it working at the moment:
get the payments one by one:
match the payment to the balance tx
(FYI "stripe_transfer_status === active" means it's a destination payment and not direct)
my only current idea is to start storing the ch_ against each payment when they are made (we obviously listen to this webhook already) unless there is a way of extending my balance TX call further to get the pi_ and match it without having to do this
Thanks for sharing all of these details let me check
Actually with webhooks you can't extand some properties in the response payload, so you need to do it by calling Stripe APIs in order to enrich your data like you are doing
then I think storing the ch_ when a payment is paid might be the best option
because I think I can link that to a balance tx
Yes, you enrich continually that mapping in your own database