Search a ETH payment transaction

Find transactions on a network and retrieve all the information related to the transaction.

What you will learn

In this tutorial, we will demonstrate how to search for a transaction on chain.

This tutorial enables you to retrieve information about the 0.001 ETH payment that occurred on the Ethereum Sepolia testnet in the previous tutorial. The API calls and transactions occur within the testnet environment.

Prerequisites

  • Select a transaction ID to search
  • Obtain an authorization token
    You must obtain an authorisation token to interact with Overledger's API and call any endpoint. This token will authenticate your requests and grant you access to the necessary endpoints. Please follow the authentication process provided by Overledger to get your authorisation token.

Submit a search transaction

The transaction ID is provided in the body parameters.

In the body of the request, you define which blockchain network Overledger will search for the transaction.

As an example, we can search for the transaction created in the previous tutorial using transactionId '0x1191e515119bb3ba085a28d98215b40c54b161f22305e0fa038959448d424ce9'


POST
https://api.sandbox.overledger.io/v2/autoexecution/search/transaction?transactionId=0x1191e515119bb3ba085a28d98215b40c54b161f22305e0fa038959448d424ce9
{
  "location": {
    "technology": "Ethereum",
    "network": "Ethereum Sepolia Testnet"
  }
}

The response will include important data points such as:

  • Confirmation of the location of this transaction
  • How much the transaction processed
  • Who sent the transaction (originId) and who received the transaction (destinationId)
  • The transaction status
  • The timestamp of when the transaction reached the provided status
  • How the transaction is formatted in its specific blockchain (nativeData)

Below is a sample response:

{
    "preparationTransactionSearchResponse": {
        "requestId": "890c88be-b32c-47f8-9ed3-4d6198344056",
        "gatewayFee": {
            "amount": "0",
            "unit": "QNT"
        }
    },
    "executionTransactionSearchResponse": {
        "location": {
            "technology": "Ethereum",
            "network": "ethereum sepolia testnet"
        },
        "type": "PAYMENT",
        "timestamp": "1710259800",
        "status": {
            "value": "SUCCESSFUL",
            "code": "TXN1003",
            "description": "Transaction successful",
            "message": "Transaction successful",
            "timestamp": "1710260040"
        },
        "transaction": {
            "transactionId": "0x1191e515119bb3ba085a28d98215b40c54b161f22305e0fa038959448d424ce9",
            "message":"sample Message",
          	"signature": [
                "0x6376463d26b298e659e5f64c151841bb4431d859db90fbf2946c033b1b544032",
                "0x68f65dcc5e79d851a3eb5a7f765117314201d55187a82b061b64552cdea71b85",
                "0"
            ],
            "totalPaymentAmount": [
                {
                    "amount": "0.001000000000000000",
                    "unit": "ETH"
                }
            ],
            "origin": [
                {
                    "originId": "0x4f84ac29b182e0e474Ea3fc17950200BB4765F31",
                    "sequence": "0"
                }
            ],
            "destination": [
                {
                    "destinationId": "0x03B651d2251eA03cf3ceD600E3B4948303A94BE6",
                    "payment": {
                        "amount": "0.001000000000000000",
                        "unit": "ETH"
                    }
                }
            ],
            "fee": {
                "amount": "0",
                "unit": "ETH"
            },
            "nativeData": {
                "hash": "0x1191e515119bb3ba085a28d98215b40c54b161f22305e0fa038959448d424ce9",
                "nonce": 0,
                "blockHash": "0x20548cf1206bfcd95a9054545bebd5adbcb85856ce664a8ce47b8dc06c41a667",
                "blockNumber": 5471555,
                "chainId": 11155111,
                "transactionIndex": 71,
                "from": "0x4f84ac29b182e0e474ea3fc17950200bb4765f31",
                "to": "0x03b651d2251ea03cf3ced600e3b4948303a94be6",
                "value": 1000000000000000,
                "gasPrice": 36412364825,
                "gas": 21414,
                "input": "0x00000000000073616d706c65204d657373616765",
                "creates": null,
                "publicKey": null,
                "raw": null,
                "r": "0x6376463d26b298e659e5f64c151841bb4431d859db90fbf2946c033b1b544032",
                "s": "0x68f65dcc5e79d851a3eb5a7f765117314201d55187a82b061b64552cdea71b85",
                "v": 0,
                "type": "0x2",
                "maxFeePerGas": 36412364825,
                "maxPriorityFeePerGas": 1000000000,
                "accessList": [],
                "chainIdRaw": "0xaa36a7",
                "blockNumberRaw": "0x537d43",
                "transactionIndexRaw": "0x47",
                "valueRaw": "0x38d7ea4c68000",
                "gasPriceRaw": "0x87a589819",
                "gasRaw": "0x53a6",
                "maxFeePerGasRaw": "0x87a589819",
                "maxPriorityFeePerGasRaw": "0x3b9aca00",
                "nonceRaw": "0x0"
            }
        }
    }
}