Transactions

Get Started

Send, monitor, and manage transactions. Send transactions from user or server wallets, sponsor gas, monitor transaction status, and more.

Send raw transactions

Send a raw transaction from a user wallet from the frontend, or server wallet from the backend using the thirdweb API.

  • For server wallets, you can execute transactions with just your project secret key.
  • For user wallets in React applications that use the SDK, you can obtain the user wallet auth token (JWT) with the useAuthToken() hook.
  • For user wallets in TypeScript applications, you can get it by calling wallet.getAuthToken() on a connected inAppWallet() or ecosystemWallet().

Request

fetch("https://api.thirdweb.com/v1/transactions", {
method: "POST",
headers: {
"x-secret-key": "<your-project-secret-key>",
},
body: {
chainId: 137,
from: "0x1234567890123456789012345678901234567890",
transactions: [
{
data: "0xa9059cbb000000000000000000000000742d35cc6634c0532925a3b8d43c67b8c8b3e9c6000000000000000000000000000000000000000000000000016345785d8a0000",
to: "0xA0b86a33E6411E3036C1C4c7E815D0a82e3F5fD6",
value: "0",
},
],
},
});

Response

{
"result": {
"transactionIds": [
"string"
]
}
}

Going further

Explore Full API References

For comprehensive guides on implementing the full thirdweb SDK, explore our language-specific documentation: