starknet_getTransactionReceipt - Get Transaction Receipt
Get the execution receipt for a Starknet transaction by hash. Returns status, fees, events, and execution details for transaction verification and monitoring.
Returns the receipt of a transaction identified by its hash. The receipt includes execution status, actual fee paid, emitted events, and block inclusion details. This is the primary method for confirming whether a transaction succeeded or reverted.
Overview
After a transaction is submitted to Starknet, it goes through several stages: RECEIVED, ACCEPTED_ON_L2, and finally ACCEPTED_ON_L1 (once the proof is verified on Ethereum). The transaction receipt reflects the current status and provides detailed execution results.
Starknet transaction receipts differ from EVM receipts in several ways:
- Fees are denominated in STRK or ETH (depending on the fee token used)
- Events use felt252 keys and data values (Cairo's native field element type)
- Execution status distinguishes between
SUCCEEDEDandREVERTED - L2-to-L1 messages emitted during execution are tracked in
messages_sent execution_resourcesreports fee-relevant buckets such asl1_gas,l2_gas, andl1_data_gas
Errors
| Code | Message | Description |
|---|---|---|
| 29 | Transaction hash not found | The transaction does not exist or has not been processed yet |
Examples
Use Cases
- Transaction Confirmation - Verify that a submitted transaction was executed successfully
- Fee Tracking - Record actual fees paid for cost analysis and accounting
- Event Monitoring - Extract emitted events for token transfers, contract state changes, and DeFi activity
- Error Debugging - Inspect revert reasons for failed transactions
- L1 Finality Tracking - Monitor when transactions achieve
ACCEPTED_ON_L1finality via Ethereum proof verification - Payment Verification - Confirm token transfer completion for payment processing systems
Related Methods
- starknet_getTransactionByHash - Get transaction details (without execution results)
- starknet_getTransactionStatus - Get lightweight finality status
- starknet_getEvents - Query events by filter across blocks
- starknet_getBlockWithReceipts - Get all receipts in a block