Transactions
Get a receipt
GET /v1/transactions/receipt returns the confirmation status of an EVM transaction.
Endpoint
Pass chainId and hash (the transaction hash) as query parameters. Receipts work on EVM chains (mainnet and testnet) and on these mainnets: Bitcoin and the other UTXO coins, Solana, Tron, Aptos, Movement, Sui, NEAR, Stellar, Hedera, Gram, Cosmos, Algorand, Kaspa, Filecoin, VeChain, Stacks, Cardano, XRP Ledger and Monero. status is success, failed, pending (seen, not yet confirmed) or unknown (not found yet — keep polling for a short while after broadcast). Hedera also accepts the transaction ID ([email protected]). Chains without receipts return unsupported_capability.
curl -sS "https://blockchain.gray3.io/v1/transactions/receipt?chainId=ethereum-sepolia&hash=0xYourTxHash" \
-H "X-Gray-Project-Id: proj_your_project_id" \
-H "Authorization: Bearer gray_sk_your_secret"Response
HTTP 200 — success envelope wraps the payload in data.
{
"data": {
"chainId": "ethereum-sepolia",
"hash": "0x…",
"status": "success",
"blockNumber": "12345678",
"from": "0xYourAddress",
"to": "0xRecipient",
"source": "indexer"
}
}status may be pending while the transaction is still being indexed. Poll with backoff until it is success or failed.
Errors
Errors use HTTP { "error": { "code", "message", "retryable" } }. Branch on code, not the message text.
Every authenticated route may also return unauthorized (401), revoked_secret (401), forbidden (403), credits_exhausted (402), plan_feature_denied (403), rate_limit_exceeded (429, retryable), and invalid_argument (413) for request bodies over 256 KiB.
| Code | HTTP | When |
|---|---|---|
| invalid_argument | 400 | Missing or malformed chainId, address, or body fields |
| plan_chain_denied | 403 | chainId is not on the project plan |
| chain_disabled | 403 | Chain turned off in Console › Networks |
| unsupported_capability | 400 | Capability not offered for this chain (e.g. testnet prices) |
| invalid_argument | 400 | Bad intent kind, missing from/to, or malformed signedPayload |
| unsupported_capability | 400 | The chain does not support this operation, such as a gas estimate on a non-EVM chain |
| simulation_failed | 400 | Simulate reported failure (may also return ok: false in data) |
| tx_unavailable | 503 | Preparation, broadcast, or receipt lookup is temporarily unavailable (retryable) |
| provider_error | 400 | Custom-chain RPC returned JSON-RPC error |
{
"error": {
"code": "invalid_argument",
"message": "Human-readable detail (may be sanitized).",
"retryable": false
}
}