> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.walletstech.com/llms.txt.
> For full documentation content, see https://docs.walletstech.com/llms-full.txt.

# Get transaction details

POST https://wallet/txid
Content-Type: application/json

Get the transaction details

#### **Statuses**

| **Type** | **Status** |
| --- | --- |
| 1 | (confirmations colum)  <br>\-2 => 'Conflicted',  <br>\-1 => 'Invalid',  <br>0 => 'Pending',  <br>\> 0 => 'Confirmed',  <br>< 0 => 'Rejected', |
| 2 | 0 = failed  <br>1 = sucsess |
| 21 | 0 = failed  <br>1 = sucsess |
| 3 | 0 = failed  <br>1 = sucsess |
| 31 | 0 = failed  <br>1 = sucsess |
| 4 | "contractRet": "SUCCESS" |
| 41 | "contractRet": "SUCCESS" |

Reference: https://docs.walletstech.com/api/wallet/get-transaction-details

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /wallet/txid:
    post:
      operationId: get-transaction-details
      summary: Get transaction details
      description: >-
        Get the transaction details


        #### **Statuses**


        | **Type** | **Status** |

        | --- | --- |

        | 1 | (confirmations colum)  <br>\-2 => 'Conflicted',  <br>\-1 =>
        'Invalid',  <br>0 => 'Pending',  <br>\> 0 => 'Confirmed',  <br>< 0 =>
        'Rejected', |

        | 2 | 0 = failed  <br>1 = sucsess |

        | 21 | 0 = failed  <br>1 = sucsess |

        | 3 | 0 = failed  <br>1 = sucsess |

        | 31 | 0 = failed  <br>1 = sucsess |

        | 4 | "contractRet": "SUCCESS" |

        | 41 | "contractRet": "SUCCESS" |
      tags:
        - subpackage_wallet
      parameters:
        - name: X-AUTH-TOKEN
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Wallet_Get transaction
                  details_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: string
servers:
  - url: https:/
components:
  schemas:
    Wallet_Get transaction details_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Wallet_Get transaction details_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-AUTH-TOKEN

```

## SDK Code Examples

```python
import requests

url = "https://https/wallet/txid"

payload = "{
    \"type\": type_ID,
    \"txid\": \"transactionHash\"
}"
headers = {
    "X-AUTH-TOKEN": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://https/wallet/txid';
const options = {
  method: 'POST',
  headers: {'X-AUTH-TOKEN': '<apiKey>', 'Content-Type': 'application/json'},
  body: '"{\n    \"type\": type_ID,\n    \"txid\": \"transactionHash\"\n}"'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/wallet/txid"

	payload := strings.NewReader("\"{\\n    \\\"type\\\": type_ID,\\n    \\\"txid\\\": \\\"transactionHash\\\"\\n}\"")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-AUTH-TOKEN", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://https/wallet/txid")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-AUTH-TOKEN"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "\"{\\n    \\\"type\\\": type_ID,\\n    \\\"txid\\\": \\\"transactionHash\\\"\\n}\""

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/wallet/txid")
  .header("X-AUTH-TOKEN", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("\"{\\n    \\\"type\\\": type_ID,\\n    \\\"txid\\\": \\\"transactionHash\\\"\\n}\"")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/wallet/txid', [
  'body' => '"{\\n    \\"type\\": type_ID,\\n    \\"txid\\": \\"transactionHash\\"\\n}"',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-AUTH-TOKEN' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://https/wallet/txid");
var request = new RestRequest(Method.POST);
request.AddHeader("X-AUTH-TOKEN", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n    \\\"type\\\": type_ID,\\n    \\\"txid\\\": \\\"transactionHash\\\"\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-AUTH-TOKEN": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = "{
    \"type\": type_ID,
    \"txid\": \"transactionHash\"
}" as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://https/wallet/txid")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```