#VoodooPrawn
1 messages · Page 1 of 1 (latest)
Hi
hi, sure, what's the question?
I had a great conversation yesterday with someone on here re. listening to the payout.created event
But I need to way of knowing which connected account the payout was for
so that I can map the event to the correct queue so it arrives at the correct environment
if it's an event sent to your Connect endpoint it has an account field in the Event object
with payments we use metadata for this
https://stripe.com/docs/connect/webhooks
In addition to the documented response properties in the event object reference, each event for a connected account will also contain a top-level
accountproperty. It identifies the user for whom the webhook is being sent.
ah perfect
I think I was just looking at the event data itself
{
"object": {
"id": "po_1LunHO2Q3RYvsK4KEK7Q0tA2",
"object": "payout",
"amount": 11895,
"arrival_date": 1666224000,
"automatic": true,
"balance_transaction": "txn_1LunHP2Q3RYvsK4KCZ6h5Ok0",
"created": 1666228238,
"currency": "gbp",
"description": "STRIPE PAYOUT",
"destination": "ba_1J57uk2Q3RYvsK4KwbuVhYVF",
"failure_balance_transaction": null,
"failure_code": null,
"failure_message": null,
"livemode": false,
"metadata": {
},
"method": "standard",
"original_payout": null,
"reversed_by": null,
"source_type": "card",
"statement_descriptor": null,
"status": "in_transit",
"type": "bank_account"
}
}
which doesn't include the extra data you get alongside it
yeah it's in the top level Event, not event.data (the payload which is a Payout)