# Transactions

## Check Contract Execution Status

Returns the status code of a contract execution.

```
https://api.xdcscan.io/api
   ?module=transaction
   &action=getstatus
   &txhash=0x3ac8a2f2db1c13edb2a2e9040f2378f0edc74bc59495365a637fe85ddc88c5fc
```

> Try this endpoint in your [**browser**](https://api.xdcscan.io/api?module=transaction\&action=getstatus\&txhash=0x3ac8a2f2db1c13edb2a2e9040f2378f0edc74bc59495365a637fe85ddc88c5fc) :link:

{% tabs %}
{% tab title="Request" %}
Query Parameters

| Parameter    | Description                                                                  |
| ------------ | ---------------------------------------------------------------------------- |
| txhash       | the `string` representing the transaction hash to check the execution status |
| {% endtab %} |                                                                              |

{% tab title="Response" %}
Sample Response

```
{
   "status":"1",
   "message":"OK",
   "result":{
      "isError":"1",
      "errDescription":"Transaction fail"
   }
}
```

{% hint style="info" %}
:book: **Tip:** The `isError` field returns `0` for **Successful transactions** and `1` for **Failed transactions.**
{% endhint %}
{% endtab %}
{% endtabs %}

## Check Transaction Receipt Status

Returns the status code of a transaction execution.

```
https://api.xdcscan.io/api
   ?module=transaction
   &action=gettxreceiptstatus
   &txhash=0x8a317d8a24629994da2bf25de2896fb55aec4de837425cb5bcf6ba697e06af89
   &apikey=YourApiKeyToken
```

> Try this endpoint in your [**browser**](https://api.xdcscan.io/api?module=transaction\&action=gettxreceiptstatus\&txhash=0x8a317d8a24629994da2bf25de2896fb55aec4de837425cb5bcf6ba697e06af89\&apikey=YourApiKeyToken) :link:

{% tabs %}
{% tab title="Request" %}
Query Parameters

| Parameter    | Description                                                                  |
| ------------ | ---------------------------------------------------------------------------- |
| txhash       | the `string` representing the transaction hash to check the execution status |
| {% endtab %} |                                                                              |

{% tab title="Response" %}
Sample Response

```
{
   "status":"1",
   "message":"OK",
   "result":{
      "status":"1"
   }
}
```

{% endtab %}
{% endtabs %}
