#kekox-invoices
1 messages · Page 1 of 1 (latest)
Hi there! First, transfers won't fail in this case. But you can access the transfer by expanding the PaymentIntent associated with the invoice (https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent) and examining the charges.data associated with that PaymentIntent (https://stripe.com/docs/api/payment_intents/object#payment_intent_object-charges-data) which will then have the transfer associated with it (https://stripe.com/docs/api/charges/object#charge_object-transfer)
You would then update the metadata accordingly
So there is no point on storing the transfer or the charge? what if I want to know when the transfer got paid?
👋 I'm hopping in since bismark needs to head out
The problem is I can't easily know which invoice the transfer is from for example on transfer.created or transfer.paid events
Quick question for you - which API version are you on? Newer API versions no longer send the transfer.paid event after the split between Transfers/Payouts which we talk about here https://stripe.com/docs/transfer-payout-split
Yup, so you're on the version that would see the Transfer/Payout split and you wouldn't even get transfer.paid events at all.
But to answer your original question - from the transfer.created events you can retrieve the Charge found at source_transaction and expand payment_intent.invoice so that the full Payment Intent and Invoice will be returned in the response
Ah got it! that so helpful, so if I wanted to store the charge I can do the same like expand the payment intent to get the invoice cool.
But
yup!
Like this is because we're using Stripe connect right?
So is there any point on storing the transfer and the charge? I mean a better question should be. Does the invoice statuses reflects the whole status for the payment_intent charge and transfer? or it's just for the payment_intent/charge
Like this is because we're using Stripe connect right?
Can you be more specific with this question (what specifically are you referring to)?
Hehe sorry, forget that question. I just want to know if the invoice status reflects the whole status for the charge/payment_intent/transfer or it's just for the charge/payment_intent
For the most part, yes but there are some exceptions - like if an Invoice is marked as paid_out_of_band I don't think the transfer would happen, but the Invoice would still be paid
Also I'm seeing that because of the split between transfer/payout the transfer doesn't have a status as the payout has, so there is no point on my side to store the transfer haha. I think I'm kind of confused haha. Is there any good documentation for this whole process of creating invoices and automated transfers with Stripe connect like a life cycle chart or step by step maybe?
backing up for a second - what would you like to accomplish by tracking the transfer.created events? Are you trying to track whenever your connect accounts get funds? are you trying to track when they get payouts?
Yes I would like to show the status for each step. i.e. show the status for the charge/payment_intent show the status for transfer like they got the funds on their connect account.
also for payouts
To be safe (especially because of edge cases like the one I mentioned) I'd recommend just storing them all if you want to be sure that status of each is accurate
For payouts that's completely separate from the Invoicing flow, and you'd need to listen to payout.created
Cool thank you. can you provide me with the documentation for the stripe connect flow?
Which part of the flow specifically (there's a lot of different docs)?
Hmmmm creation of the invoice with the automatic transfer? I think i can jump to other docs starting there.
Looking for the docs on this and will get back to you in a moment
After catching up in this thread a bit more, I am still a bit unclear on the docs we are looking for. Are you looking for a doc that talks more about how you already create these Invoices?
Doc about how the transfer_data field for Stripe connect works when creating an invoice.
It doesn't look like we have a lot on specifically how this works with Invoices https://stripe.com/docs/connect/invoices#destination
But you may get value out of our doc on destination charges more broadly as that is what the affects of that property will be. https://stripe.com/docs/connect/destination-charges
Thank you so much!
Of course, just let me know if you have any more questions