Skip to content

Registering webhooks

To keep your backend in sync with the state of the blockchain, Privy emits webhooks whenever funds are sent or received from a wallet.

Configuration

Configure webhooks in the Webhooks page of the Dashboard by providing a destination endpoint for the webhook updates.

Funds received

When funds are received by a wallet, Privy will emit a webhook with a payload of the following shape to the endpoint you configure:

FieldTypeDescription
wallet_idstringUnique ID of the updated wallet.
assetstringType of asset such as ETH or SOL.
amount_receivednumberAmount received in asset type.
balancenumberTotal balance of the wallet in native currency.
addressstringEthereum or solana address of receiver.
transaction_hashstringHash of ethereum or solana transaction.
chain_idstringCAIP-2 chain ID of transaction.

Example

Below is an example payload that will hit your webhooks endpoint when funds are received in a wallet.

json
{
  "wallet_id": "cm4db8x9t000ccn87pctvcg9j",
  "asset": "ETH",
  "amount_received": 1000000000000000000,
  "balance": 5000000000000000000,
  "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  "transaction_hash": "0x2446f1fd773fbb9f080e674b60c6a033c7ed7427b8b9413cf28a2a4a6da9b56c",
  "chain_id": "eip155:1"
}

Funds sent

When funds are sent from a wallet, Privy will emit a webhook with a payload of the following shape to the endpoint you configure:

FieldTypeDescription
wallet_idstringUnique ID of the updated wallet.
assetstringType of asset such as ETH or SOL.
amount_sentnumberAmount sent in native currency.
balancenumberTotal balance in native currency after sending.
addressstringEthereum or solana address of sender.
transaction_hashstringHash of ethereum or solana transaction.
chain_idstringCAIP-2 chain ID of transaction.

Example

Below is an example payload that will hit your webhooks endpoint when funds are sent from a wallet.

json
{
  "wallet_id": "cm4db8x9t000ccn87pctvcg9j",
  "asset": "ETH",
  "amount_sent": 2000000000000000000,
  "balance": 3000000000000000000,
  "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  "transaction_hash": "0x3557f1fd773fbb9f080e674b60c6a033c7ed7427b8b9413cf28a2a4a6da9c67d",
  "chain_id": "eip155:1"
}