Harsha W
Harsha W

Reputation: 3366

Get notified only when Platform Balance Updates in Stripe - WebHook

I need to get notified when the Balance Updates in my Stripe Platform Account. I currently use the below WebHook.

switch (event.type) {
    case 'balance.available':
        const paymentIntent = event.data.object;
        console.log(paymentIntent);
        transfer("acct_1Jc63wPhWrt3Vrlk");
        console.log('End');
        break;
}

Question

I am working with few Connected Express Accounts and I still get notified when the Balance Updates in Connected Accounts as well.

Exact Issue: I transfer money from my Platform Acc to Connected Express Acc. I do get 2 notifications at the moment

1st Notification: Deduction from Platform Acc Balance

2nd Notification: Addition to Connected Acc Balance

I want to skip the 2nd Notification and get only notified when an update happens to the Platform Acc balance.

Is there a way to achieve this?

Thank you

Upvotes: 0

Views: 184

Answers (1)

hmunoz
hmunoz

Reputation: 3341

There are 2 types of webhook endpoints at Stripe: Account webhooks and Connect webhooks.

Account webhooks send you any events that happen on your Stripe account.

Connect webhooks send you events for any events that happen on Connect accounts.

You should register an Account webhook endpoint and remove your Connect webhook endpoint in that case (or disable the balance.available event on your Connect webhook endpoint).

Upvotes: 1

Related Questions