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
Request Parameters
The hash of the transaction
Response Body
Transaction type: `INVOKE`, `DECLARE`, `DEPLOY_ACCOUNT`, or `L1_HANDLER`
Hash of the transaction
`{amount, unit}` -- actual fee paid
SUCCEEDED` or `REVERTED
ACCEPTED_ON_L2` or `ACCEPTED_ON_L1
Hash of the block containing the transaction
Block number
L2-to-L1 messages sent during execution
Events emitted during execution
Computation resources consumed, including `l1_gas`, `l2_gas`, and `l1_data_gas`
Revert message if `execution_status` is `REVERTED`
Error Responses
Errors
| Code | Message | Description |
|---|---|---|
| 29 | Transaction hash not found | The transaction does not exist or has not been processed yet |
Examples
# Get transaction receipt
curl -X POST https://api-starknet-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "starknet_getTransactionReceipt",
"params": [
"0x1438e2dc065c46840a28564c4c0a0db0bd43a9f54554cad7992f512b3f29ec4"
],
"id": 1
}'
# Check execution status with jq
curl -s -X POST https://api-starknet-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "starknet_getTransactionReceipt",
"params": [
"0x1438e2dc065c46840a28564c4c0a0db0bd43a9f54554cad7992f512b3f29ec4"
],
"id": 1
}' | jq '{
status: .result.execution_status,
finality: .result.finality_status,
fee: .result.actual_fee,
events_count: (.result.events | length)
}'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