Skip to main content

Solana

When your app sends a gas-sponsored Solana transaction, the API returns the final transaction signature in the hash field immediately. Your app can subscribe to webhooks to receive status updates as the transaction confirms on-chain.

EVM

When your app sends a standard gas-sponsored EVM transaction, the API returns transaction_id and user_operation_hash immediately after broadcast. Privy delivers the final transaction hash via webhook once the transaction confirms on-chain. For sponsored Tempo transactions, the API returns the broadcast transaction hash in hash.
Client SDK behavior: Web and mobile SDK clients wait for on-chain confirmation before returning. The backend API returns immediately after broadcast.
Your app receives the transaction hash and status updates via webhooks as the transaction processes.

How standard EVM transactions work

When your app sends a standard gas-sponsored EVM transaction, the API returns the following response immediately after broadcast:
{
  "transaction_id": "tx-xyz789",
  "user_operation_hash": "0x...",
  "hash": ""
}
Key fields:
  • transaction_id — Privy’s internal transaction identifier for tracking
  • user_operation_hash — Unique identifier for the broadcasted user operation
  • hash — Empty string until the transaction confirms on-chain
Privy delivers the final transaction hash via webhook as transaction_hash once the transaction confirms.

Transaction lifecycle

1

Transaction broadcast

The API validates and broadcasts the transaction to the network, then immediately returns with a user_operation_hash.
2

Pending state

The transaction is pending on-chain. Applications should display a loading or pending state to users.
3

Confirmation

Once confirmed on-chain, Privy sends a webhook with the final transaction_hash and status.

Tracking transaction status

Your app can track transaction status via webhooks for real-time notifications or the API for on-demand queries.

Querying status

Your app can query transaction status at any time using the transaction_id. The response includes the current status and transaction hash once available.
import {PrivyClient} from '@privy-io/node';

const privy = new PrivyClient({
  appId: 'your-app-id',
  appSecret: 'your-app-secret'
});
const transactionId = 'tx-xyz789';

const transaction = await privy.transactions().get(transactionId);

console.log(transaction.status); // "pending", "confirmed", "reverted", etc.
console.log(transaction.transaction_hash); // Available once confirmed
Learn more in the API reference.

Notified via webhooks

Webhooks deliver real-time notifications as transaction status changes. Configure a webhook endpoint in the Dashboard to receive automatic updates. Setting up webhooks:
  1. Navigate to the Webhooks tab in the Privy Dashboard
  2. Add a webhook endpoint URL
  3. Subscribe to transaction events
  4. Implement webhook handlers in your application
Transaction webhook events:
EventDescription
transaction.broadcastedTransaction was submitted to the network
transaction.confirmedTransaction was confirmed on-chain
transaction.execution_revertedTransaction was reverted by the network
transaction.failedTransaction failed to be included
transaction.replacedTransaction was replaced by another transaction
Webhook payloads: transaction.broadcasted — Sent immediately after broadcast:
{
  "type": "transaction.broadcasted",
  "data": {
    "wallet_id": "wallet-abc123",
    "transaction_id": "tx-xyz789",
    "caip2": "eip155:1",
    "user_operation_hash": "0x..."
  }
}
transaction.confirmed — Sent when confirmed on-chain:
{
  "type": "transaction.confirmed",
  "data": {
    "wallet_id": "wallet-abc123",
    "transaction_id": "tx-xyz789",
    "caip2": "eip155:1",
    "transaction_hash": "0x...",
    "user_operation_hash": "0x..."
  }
}
transaction.execution_reverted — Sent when the transaction reverts:
{
  "type": "transaction.execution_reverted",
  "data": {
    "wallet_id": "wallet-abc123",
    "transaction_id": "tx-xyz789",
    "caip2": "eip155:1",
    "transaction_hash": "0x...",
    "user_operation_hash": "0x..."
  }
}

Common questions

The backend API returns immediately after broadcast to prevent timeout issues during network congestion. This enables high transaction volumes and real-time status updates via webhooks. Web and mobile SDK clients wait for on-chain confirmation before returning for a simpler developer experience.
Confirmation times vary by network:
  • Ethereum mainnet: 12-60 seconds
  • Layer 2s (Base, Optimism, Arbitrum): 1-10 seconds
  • Solana: 1-5 seconds
During network congestion, confirmation may take longer. Applications should implement appropriate timeout handling.
Privy retries webhook delivery with exponential backoff. Your app should also implement a polling fallback using the transaction_id to fetch status from Privy’s API.
No. The transaction_hash becomes available only after the transaction is included in a block on-chain. Your app must use webhooks or polling to retrieve the final hash.
Learn more about transaction webhooks in the webhook events reference.