#codyellow
1 messages · Page 1 of 1 (latest)
I do have a connect endpoint, however I don't see any events for charge.suceeded at all.. I'm guessing maybe the destination charge lifecycle doesn't hit this?
Backing up for a minute - do you just want to know when the charge is being created after payment is successful so that you can update the metadata on it?
So you have a couple of different options
- You could listen for
charge.succeededon the platform (not your connected accounts). Each time the charge succeeds on your own account (the platform) you can retrieve the charge and expandtransfer.destination_paymentto see the corresponting Payment object on the connect account - You could listen for
payment.createdon the connected account, which will give you the payment (py_123) objects that get created when the destination charge transfers funds from the platform -> connected account
ah ok -- I see transfer.created on my platform from https://stripe.com/docs/api/events/types
I'm guessing that's the same or a newer naming of transfer.destination_payment?
I don't see anything on the connected webhook for payment.created if I wanted to go that route though.. is payment_intent.created the same?
I don't see it being fired at all though..
yeah transfer.created is another option that would work
I'm guessing that's the same or a newer naming of transfer.destination_payment?
Not exactly - that event just means that a transfer was created on the platform account. Within the trasnfer event you'd check destination_payment on the Transfer object to see what charge/payment object was created on the platform account
Let's back up for a minute though - can you give me an example payment intent yoiu're working with?
Yeah -- I have this invoice in_1NkDetDcTzxmQ4ZaksVWf1yf
with source transaction pi_3NkDevDcTzxmQ4Za3FGYFeMa
and a transfer tr_3NkDevDcTzxmQ4Za3nBM9N28
leading to the payment into the connected account py_1NkDewRfYCk8Ir9WcUQEWUzN
(Did I answer the q correctly)
Okay so for that payment - all you'd have to do is listen for transfer.created or charge.succeeded on your Account webhook (not your connect webhook)
👍 (just to be super clear, you listen for those events and you can then tie them back to what the original py_123 is on the destination connect account)
One more question in a similar vein...
If I am creating a charge for a connected account (ie. moving money from connected account -> my platform)
ie. Stripe::Charge.create(..source: some_connected_account_id)
Is there a hook I can listen to to find the transfer that gets created? I similarly want to attach metadata there
oh I guess it's just the charge.source_transfer?