The following functionality exists for wallets reconstituted
server-side. More on Privy architecture
here
In August 2025 we migrated transactions to a new data store. As part of this migration, we changed
the format of transaction IDs from CUID2 to UUIDv4. You may continue using the CUID2 for your
existing transactions, but we encourage migration to the new UUID, as it will avoid a very slight
latency increase due to an extra lookup for mapping from the legacy ID to the new ID.
- NodeJS
- NodeJS (server-auth)
- Java
- REST API
- Rust
To get a transaction’s details using the NodeJS SDK, use the
get method on the transactions() interface of the Privy client:Usage
Report incorrect code
Copy
Ask AI
import {PrivyClient} from '@privy-io/node';
const privy = new PrivyClient({
appId: 'insert-your-app-id',
appSecret: 'insert-your-app-secret'
});
const transaction = await privy.transactions().get('insert-transaction-id');
console.log(transaction);
Parameters and Returns
Check out the API reference for more details.The
@privy-io/server-auth library is deprecated. We recommend integrating @privy-io/node for
the latest features and support.getTransaction method from the Privy client:Report incorrect code
Copy
Ask AI
getTransaction: (input: {id: string}) => Promise<WalletApiTransactionResponseType>;
Usage
Report incorrect code
Copy
Ask AI
import {PrivyClient} from '@privy-io/server-auth';
const privy = new PrivyClient('insert-your-app-id', 'insert-your-app-secret');
const transaction = await privy.walletApi.getTransaction({
id: 'insert-transaction-id'
});
console.log(transaction);
Parameters
ID of the transaction to fetch details for.
Returns
Hide WalletApiTransactionResponseType
Hide WalletApiTransactionResponseType
ID for the transaction.
ID for the wallet that sent the transaction.
CAIP-2 chain ID for the network the transaction was broadcasted on.
Hash for the transaction.
status
'broadcasted' | 'confirmed' | 'execution_reverted' | 'failed' | 'replaced' | 'pending' | 'provider_error'
Current status of the transaction. -
'broadcasted' refers to when a transaction has been
submitted to the network but has not yet been included in a block - 'confirmed' refers to when a
transaction has been included in a block that has been confirmed on the network. -
'execution_reverted' refers to when a transaction has reverted in execution. - 'failed' refers
to when a transaction has been pending for too long, signaling that it will not be included
on-chain. This can happen when the gas fee is too low given the current activity on the blockchain
and is only triggered for chains that have a defined pending time limit (e.g. Base, Solana,
Flow.). - 'replaced' refers to when a transaction has been replaced by another transaction with
the same nonce. This is only applicable to EVM chains. - 'pending' irefers to when a custodial
wallet transaction has been initiated with the custodian and is undergoing processing. -
'provider_error' refers to when a custodial wallet transaction request has been rejected by the
custodian or encountered an error. This can happen when you attempt to spend funds that haven’t
been fully screened by the custodian yet, or when a transaction does not meet the custodian’s
compliance requirements.To get a transaction by ID, use the
getTransaction method.Report incorrect code
Copy
Ask AI
try {
TransactionRetrieveResponse response = privyClient
.transactions()
.retrieve('insert-transaction-id');
if (response.transaction().isPresent()) {
Transaction transaction = response.transaction().get();
}
} catch (APIException e) {
String errorBody = e.bodyAsString();
System.err.println(errorBody);
} catch (Exception e) {
System.err.println(e.getMessage());
}
Parameters
The ID of the transaction to retrieve
Returns
TheTransactionRetrieveResponse object contains an optional transaction() field, present if the
transaction was retrieved successfully.The retrieved
Transaction object.Hide child attributes
Hide child attributes
Unique ID of the transaction.
ID for the wallet that sent the transaction.
CAIP-2 chain ID for the network the transaction was broadcasted on.
Hash for the transaction.
Current status of the transaction.
The creation date of the wallet, in milliseconds since midnight, January 1, 1970 UTC.
Privy supports fetching transaction status by the transaction ID.To do so, make a replacing The response might look like
GET request toReport incorrect code
Copy
Ask AI
https://api.privy.io/v1/transactions/<transaction_id>
<transaction_id> with the ID of your desired transaction.Response
ID for the transaction.
ID for the wallet that sent the transaction.
status
'broadcasted' | 'confirmed' | 'execution_reverted' | 'failed' | 'replaced' | 'pending' | 'provider_error'
Current status of the transaction. -
'broadcasted' refers to when a transaction has been
submitted to the network but has not yet been included in a block - 'confirmed' refers to when a
transaction has been included in a block that has been confirmed on the network. -
'execution_reverted' refers to when a transaction has reverted in execution. - 'failed' refers
to when a transaction has been pending for too long, signaling that it will not be included
on-chain. This can happen when the gas fee is too low given the current activity on the blockchain
and is only triggered for chains that have a defined pending time limit (e.g. Base, Solana,
Flow.). - 'replaced' refers to when a transaction has been replaced by another transaction with
the same nonce. This is only applicable to EVM chains. - 'pending' irefers to when a custodial
wallet transaction has been initiated with the custodian and is undergoing processing. -
'provider_error' refers to when a custodial wallet transaction request has been rejected by the
custodian or encountered an error. This can happen when you attempt to spend funds that haven’t
been fully screened by the custodian yet, or when a transaction does not meet the custodian’s
compliance requirements.Hash for the transaction.
CAIP-2 chain ID for the network the transaction was broadcasted on.
Example
For example, you might fetch a transactions status using transaction ID using thecURL request below.Report incorrect code
Copy
Ask AI
$ curl --request GET https://api.privy.io/v1/transactions/<transaction_id> \
-u "<your-privy-app-id>:<your-privy-app-secret>" \
-H "privy-app-id: <your-privy-app-id>" \
-H 'Content-Type: application/json' \
Report incorrect code
Copy
Ask AI
{
"id": "<transaction_id>",
"wallet_id": "fmfdj6yqly31huorjqzq38zc",
"status": "confirmed",
"transaction_hash": "0x2446f1fd773fbb9f080e674b60c6a033c7ed7427b8b9413cf28a2a4a6da9b56c",
"caip2": "eip155:8453"
}
To get a transaction’s details using the Rust SDK, use the
get method on the transactions() interface of the Privy client:Usage
Report incorrect code
Copy
Ask AI
use privy_rs::PrivyClient;
let client = PrivyClient::new(app_id, app_secret)?;
let transaction = client.transactions().get("insert-transaction-id").await?;
println!("Transaction: {:?}", transaction);

