Skip to content

Get Transaction Status

Base Url:
Endpoint: /getStatus

This endpoint enables you to seamlessly track the status of pending transactions. As applications and payments splinter across chains, it can be very difficult to accurately prompt UI updates based on the status of a user's transaction. Decent provides a reliable endpoint to provide you with confirmations at each step of a transaction's lifecycle.

Poll this endpoint in your application to track a transaction's status. When the status turns from "Processing" to "Executed", you know that the transaction has been finalized on the destination chain.

Query Parameters

chainIdTransaction source chain ID.ChainIdfalseN/A
txHashSource or destination transaction hash.0x${string}trueN/A

Sample Request

If you are using this endpoint to prompt UI updates in your application, you might want to poll this endpoint. Please see our example here as to how you might set up a polling function.

Node Fetch
  const queryParams = new URLSearchParams({
    chainId: 42161,
    txHash: 0xb0990e9485a0c8993ae55f1a6ae4d65f82a4ea2af2d261c1bcf0c4132459080b
  const options = { method: 'GET', headers: { 'x-api-key': `${process.env.DECENT_API_KEY}` }}
  fetch(`{queryParams}`, options)
    .then(response => response.json())
    .then(response => console.log(response))
    .catch(err => console.error(err));

Response Schema

Please refer to Transaction Types for a detailed breakout of the transaction response schema. Transactions include key data used to call the transaction, identify its sender, and confirm receipt of each leg of the transaction's journey.

  transaction: {
    srcTx: SrcTx,
    bridgeTx: {
      fast: BridgeTxLZ | null,
      canonical: BridgeTxOrbit | null, // Expect to add additional types with canonical bridges from other chain stacks
      multiHop: 'fast' | 'canonical' | false // The type of the first bridge in the transaction will be listed here to denote order.
      success: boolean
    } | null,
    dstTx: {
      fast: DstTxFast | null
      canonical: DstTxCanonical | null,
      success: boolean | null
    } | null,
  status: 'Initiated' | 'Processing' | 'Executed' | 'Failed'