Webhooks in Bank Transfers

Learn how to use webhooks in Bank Transfers to receive notifications when new events are available

Enabling Bank Transfers webhooks

An overview of webhooks at Plaid is available in the API Reference. There you can find general information on Plaid webhooks, including IP addresses, webhook verification, and retry logic.

To enable webhooks on the Bank Transfers product, contact your account manager. You will need to provide them with the endpoint at which you’d like to receive all Bank Transfers webhooks.

Webhook body

To confirm that your endpoint has been correctly configured, you can trigger a test webhook via /sandbox/bank_transfer/fire_webhook. You should receive the payload body specified below.

1
2
3
4
{
"webhook_type": "BANK_TRANSFERS",
"webhook_code": "BANK_TRANSFERS_EVENTS_UPDATE"
}

Example integration

Upon receiving a BANK_TRANSFERS_EVENTS_UPDATE webhook, poll the events sync endpoint to process the available events. Note that there may only be one new event, or there may be many new events. Plaid will send a maximum of approximately 1 webhook per minute as new events continue to become available.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Webhook received
wait_for_and_ack_webhook();
// Fetch the maximum event ID from your systems
after_id = fetch_last_event_id();
var events = [];
// Poll event sync endpoint for all new events
do {
// Fetch the next set of events and update after_id
events = plaidClient.BankTransferEventSync(after_id);
after_id += len(events);
// Handle new events
for (event of events) {
yourEventHandler(event);
}
} while (events.length > 0);