Skip to main content
The following functionality exists for wallets reconstituted server-side. More on Privy architecture here
A reference_id is an optional, developer-provided identifier that can be attached to a transaction for reconciliation with your own internal records. It must be unique per transaction and can be up to 64 characters. The reference_id is included in all transaction payloads, including webhook events, and can be used to fetch a transaction by its reference ID.

Supported methods

The reference_id parameter is supported on the following RPC methods: Pass the reference_id field in the request body when calling either method.
curl --request POST \
  --url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '{
  "method": "eth_sendTransaction",
  "caip2": "eip155:8453",
  "chain_type": "ethereum",
  "reference_id": "order-abc-123",
  "params": {
    "transaction": {
      "to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "value": "0x2386F26FC10000"
    }
  }
}'

Looking up transactions by reference ID

Once a reference_id has been set, your app can look up the associated transaction using the get transaction by reference ID endpoint:
curl --request GET \
  --url 'https://api.privy.io/v1/transactions?reference_id=order-abc-123' \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'privy-app-id: <privy-app-id>'
Your app can also retrieve the transaction directly by its Privy-assigned ID using the get transaction endpoint. The reference_id is included in the response.

Webhooks

All transaction webhook events include the reference_id field in their payload when one was provided. See the individual webhook event references for the full payload schema: This allows your app to match incoming webhook notifications to your internal records without an additional API call.