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"
}
}Get Transaction
Retrieve full details for a single transaction by ID. GET /transactions/. Requires transactions:read scope.
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
| Parameter | Type | Description |
|---|---|---|
id | string | The 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
| Field | Description |
|---|---|
transactionId | Unique transaction identifier |
type | AUTHORIZATION, CLEARING, REVERSAL, REFUND, DECLINE, or FEE |
status | PENDING, CLEARED, REVERSED, or DECLINED |
amount.value | Amount in cents |
amount.currency | ISO 4217 currency code |
amount.displayValue | Human-readable amount (e.g. 29.99) |
merchant | Merchant details — present for purchases and declines; absent for fees/reversals |
merchant.mcc | ISO 18245 Merchant Category Code |
relatedTransactionId | For reversals/refunds, the ID of the original transaction; null otherwise |
declineReason | Present on DECLINE transactions — reason the transaction was declined; null otherwise |
processedAt | When the transaction was settled/processed; null if still pending |
Error Codes
| Code | HTTP | Cause |
|---|---|---|
TRANSACTION_NOT_FOUND | 404 | Transaction does not exist or belongs to another business/environment |
INSUFFICIENT_SCOPE | 403 | Key lacks transactions:read scope |
Authorizations
API key from the FYATU CaaS portal. Pass as Authorization: Bearer <key>.
Path Parameters
⌘I

