Skip to main content
GET
/
v1
/
transactions
/
{id}
Get a Transaction
curl --request GET \
  --url https://api.ecrypt.com/v1/transactions/{id} \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.ecrypt.com/v1/transactions/{id}"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.ecrypt.com/v1/transactions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ecrypt.com/v1/transactions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.ecrypt.com/v1/transactions/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.ecrypt.com/v1/transactions/{id}")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.ecrypt.com/v1/transactions/{id}")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "transactionId": 123,
  "type": "<string>",
  "tender": "<string>",
  "paymentName": "<string>",
  "paymentNetwork": "<string>",
  "paymentAccount": "<string>",
  "paymentAccountExpiry": "<string>",
  "amount": 123,
  "authorizationAmount": 123,
  "capturedAmount": 123,
  "gratuityAmount": 123,
  "surchargeAmount": 123,
  "settlementAmount": 123,
  "voidedAmount": 123,
  "referenceTransactionId": 123,
  "approvalCode": "<string>",
  "avsCode": "<string>",
  "cvvCode": "<string>",
  "enhanced": true,
  "status": "<string>",
  "created": "2023-11-07T05:31:56Z"
}
{
"requestId": "000000000000000000000",
"errors": [
{
"type": "<string>",
"message": "<unknown>"
}
]
}

Authorizations

x-api-key
string
header
required

Authorization by x-api-key inside request's header

Path Parameters

id
integer<int64>
required

Response

object | null

OK

transactionId
integer<uint64>
type
string
tender
string
paymentName
string | null
paymentNetwork
string | null
paymentAccount
string | null
paymentAccountExpiry
string | null
amount
number<decimal>
authorizationAmount
number<decimal> | null
capturedAmount
number<decimal> | null
gratuityAmount
number<decimal> | null
surchargeAmount
number<decimal> | null
settlementAmount
number<decimal> | null
voidedAmount
number<decimal> | null
referenceTransactionId
number<decimal> | null
approvalCode
string | null
avsCode
string | null
cvvCode
string | null
enhanced
boolean | null
status
string
created
string<date-time>

Create date time represented in UTC.