PlaidEx.Webhooks.Dispatcher (plaid_ex v1.0.0)

Copy Markdown View Source

Routes typed webhook events to handler callbacks.

Dispatches based on webhook_type + webhook_code pairs, casting raw JSON maps to typed event structs before calling your handler.

Supported events

Transactions

  • SYNC_UPDATES_AVAILABLEon_transactions_sync/1
  • INITIAL_UPDATEon_transactions_initial_update/1
  • HISTORICAL_UPDATEon_transactions_historical_update/1
  • DEFAULT_UPDATEon_transactions_default_update/1 (legacy)

Items

  • ERRORon_item_error/1
  • PENDING_EXPIRATIONon_item_pending_expiration/1
  • USER_PERMISSION_REVOKEDon_item_permission_revoked/1
  • NEW_ACCOUNTS_AVAILABLEon_item_new_accounts/1

Auth

  • AUTOMATICALLY_VERIFIEDon_auth_automatically_verified/1
  • VERIFICATION_EXPIREDon_auth_verification_expired/1

Transfers

  • TRANSFER_EVENTS_UPDATEon_transfer_events_update/1

Payment Initiation

  • PAYMENT_STATUS_UPDATEon_payment_status_update/1

Identity Verification

  • STATUS_UPDATEDon_identity_verification_status_updated/1
  • RETRIEDon_identity_verification_retried/1

Income

  • INCOME_VERIFICATIONon_income_verification/1

Investments

  • DEFAULT_UPDATEon_investments_default_update/1

Liabilities

  • DEFAULT_UPDATEon_liabilities_default_update/1

Assets

  • PRODUCT_READYon_assets_product_ready/1
  • ERRORon_assets_error/1

Beacon

  • USER_REVIEW_STATUS_UPDATEDon_beacon_user_review_status_updated/1

Signal

  • DEFAULT_UPDATEon_signal_default_update/1

Statements

  • READYon_statements_ready/1

Summary

Functions

Dispatches a raw webhook event map to the appropriate handler callback.

Functions

dispatch(raw_event, handler, config)

@spec dispatch(map(), module() | function(), PlaidEx.Config.t()) ::
  :ok | {:error, term()}

Dispatches a raw webhook event map to the appropriate handler callback.

The handler module must implement PlaidEx.Webhooks.Handler.