Docs

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 SUCCEEDED and REVERTED
  • L2-to-L1 messages emitted during execution are tracked in messages_sent
  • execution_resources reports fee-relevant buckets such as l1_gas, l2_gas, and l1_data_gas

Request Parameters

Request
transaction_hashFELT

The hash of the transaction

Response Body

Response
typestring

Transaction type: `INVOKE`, `DECLARE`, `DEPLOY_ACCOUNT`, or `L1_HANDLER`

transaction_hashFELT

Hash of the transaction

actual_feeobject

`{amount, unit}` -- actual fee paid

execution_statusstring

SUCCEEDED` or `REVERTED

finality_statusstring

ACCEPTED_ON_L2` or `ACCEPTED_ON_L1

block_hashFELT

Hash of the block containing the transaction

block_numberinteger

Block number

messages_sentarray

L2-to-L1 messages sent during execution

eventsarray

Events emitted during execution

execution_resourcesobject

Computation resources consumed, including `l1_gas`, `l2_gas`, and `l1_data_gas`

revert_reasonstring

Revert message if `execution_status` is `REVERTED`

Error Responses

Errors
Error 1
Error 2
Error 3
Error 4

Errors

CodeMessageDescription
29Transaction hash not foundThe transaction does not exist or has not been processed yet

Examples

Bash
# 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_L1 finality via Ethereum proof verification
  • Payment Verification - Confirm token transfer completion for payment processing systems