#anilkumar0289
1 messages · Page 1 of 1 (latest)
Hi there!
There is, in the event object directly: https://stripe.com/docs/api/events/object?lang=node#event_object-account
If we have multiple keys in database how to know from which key the event belongs too?
What do you mean?
Each event you receiev will have an account property with the account ID.
I'm using stripe automatic payout functionality.
I also created an webhook event to listed payout.created and payout.paid but didn't getting any account info.
Are you using Stripe Connect?
So you have a single Stripe account?
yes
So you already knwo the Stirpe account ID, no?
No
There may be multiple customer with different key combination
we have to check payout belongs to which customer
I really don't understand your use cases. Can you take a step back and explain what you are trying to do?
- We have multiple customer with their own stripe account.
- Whenever there will be payout created event we will save payout id in our database .
- When payout is paid we want to get transactions which are getting reconciled in the payout. but at that point we dont know code level that requested payout belongs to which customer and with which key pair we can retrieve payout.
We have multiple customer with their own stripe account.
You didn't mention that earlier.
Whenever there will be payout created event we will save payout id in our database .
So you revceive webhook events from multiple Stripe accounts? And you are not using Stripe Connect?
yes
thats the case
Hwo do you make that work? Do you ask your customer to give your theyr secret API key?
actually we are saving stripe account keys in our db in encrypted form during creation of customer account.
That's not somethign we recommend at all. For this type of use cases, you should use Stripe connect. It's a lot safer, and also simpler for you to manage (like for example for the webhooks).
okay thanks