Skip to main content
GET
/
transactions
/
{id}
Get a transaction
curl --request GET \
  --url https://api.fyatu.com/api/v3.20/transactions/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.fyatu.com/api/v3.20/transactions/{id}"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.fyatu.com/api/v3.20/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.fyatu.com/api/v3.20/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 => [
"Authorization: Bearer <token>"
],
]);

$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.fyatu.com/api/v3.20/transactions/{id}"

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

req.Header.Add("Authorization", "Bearer <token>")

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.fyatu.com/api/v3.20/transactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.fyatu.com/api/v3.20/transactions/{id}")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "status": 200,
  "message": "Transaction retrieved",
  "data": {
    "transactionId": "txn_01HXYZ8888ABCDEF9999",
    "type": "CARD_FUNDING",
    "direction": "DEBIT",
    "status": "SETTLED",
    "amount": 500,
    "currency": "USD",
    "fee": 0,
    "reference": "fund_01HXYZ5555ABCDEF1111",
    "account": "prg_01HXYZ9876ABCDEF0000",
    "memo": "Card funding — crd_01HXYZ5555ABCDEF1111",
    "balanceBefore": 10000,
    "balanceAfter": 9500,
    "relatedTransactionId": null,
    "completedAt": "2026-05-22T14:32:00Z",
    "createdAt": "2026-05-22T14:30:00Z",
    "cardId": "crd_01HXYZ5555ABCDEF1111"
  },
  "meta": {
    "requestId": "req_a1b2c3d4e5f6a7b8c9d0e1f2",
    "platform": "Fyatu CaaS",
    "timestamp": "2026-05-22T15:00:00Z"
  }
}

Overview

Returns the full details of a single card transaction, including merchant data, billing amounts, and related transaction references (e.g. the original authorization that a reversal or refund relates to).

Path Parameters

ParameterTypeDescription
idstringThe transaction ID (prefix txn_)

Example

curl https://api.fyatu.com/api/v3.20/transactions/txn_01HXYZ8888ABCDEF9999 \
  -H "Authorization: Bearer $FYATU_API_KEY"
const resp = await fetch(
  'https://api.fyatu.com/api/v3.20/transactions/txn_01HXYZ8888ABCDEF9999',
  { headers: { 'Authorization': `Bearer ${process.env.FYATU_API_KEY}` } }
);
const { data: tx } = await resp.json();
console.log(tx.type, tx.status);
console.log('Merchant:', tx.merchant?.name);
console.log('Amount:', tx.amount.displayValue);
import os, requests

resp = requests.get(
    'https://api.fyatu.com/api/v3.20/transactions/txn_01HXYZ8888ABCDEF9999',
    headers={'Authorization': f'Bearer {os.environ["FYATU_API_KEY"]}'}
)
tx = resp.json()['data']
print(tx['type'], tx['status'])
print('Merchant:', tx.get('merchant', {}).get('name'))
print('Amount:', tx['amount']['displayValue'])

Success Response (200)

{
  "success": true,
  "status": 200,
  "message": "Transaction retrieved",
  "data": {
    "transactionId":        "txn_01HXYZ8888ABCDEF9999",
    "type":                 "CLEARING",
    "status":               "CLEARED",
    "amount": {
      "value":        2999,
      "currency":     "USD",
      "displayValue": "29.99"
    },
    "merchant": {
      "name":           "Amazon",
      "city":           "Seattle",
      "country":        "US",
      "mcc":            "5999",
      "mccDescription": "Miscellaneous General Merchandise"
    },
    "cardId":               "crd_01HXYZ5555ABCDEF1111",
    "cardholderId":         "chl_01HXYZ1234ABCDEF5678",
    "programId":            "prg_01HXYZ9876ABCDEF0000",
    "relatedTransactionId": "txn_01HXYZ8888ABCDEF0000",
    "environment":          "LIVE",
    "declineReason":        null,
    "processedAt":          "2026-05-22T16:00:00Z",
    "createdAt":            "2026-05-22T14:30:00Z"
  },
  "meta": {
    "requestId":  "req_01HXY123456ABCDEF",
    "platform": "Fyatu CaaS",
    "timestamp":  "2026-05-22T16:05:00Z"
  }
}

Field Reference

FieldDescription
transactionIdUnique transaction identifier
typeAUTHORIZATION, CLEARING, REVERSAL, REFUND, DECLINE, or FEE
statusPENDING, CLEARED, REVERSED, or DECLINED
amount.valueAmount in cents
amount.currencyISO 4217 currency code
amount.displayValueHuman-readable amount (e.g. 29.99)
merchantMerchant details — present for purchases and declines; absent for fees/reversals
merchant.mccISO 18245 Merchant Category Code
relatedTransactionIdFor reversals/refunds, the ID of the original transaction; null otherwise
declineReasonPresent on DECLINE transactions — reason the transaction was declined; null otherwise
processedAtWhen the transaction was settled/processed; null if still pending

Error Codes

CodeHTTPCause
TRANSACTION_NOT_FOUND404Transaction does not exist or belongs to another business/environment
INSUFFICIENT_SCOPE403Key lacks transactions:read scope

Authorizations

Authorization
string
header
required

API key from the FYATU CaaS portal. Pass as Authorization: Bearer <key>.

Path Parameters

id
string
required

Response

Transaction retrieved

success
boolean
Example:

true

status
integer
Example:

200

message
string
Example:

"Transaction retrieved"

data
object
meta
object