Fetch transactions by reference ID
curl --request GET \
--url https://api-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_id} \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_id}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_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-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_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: <x-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-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-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-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_id}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": [
{
"id": "790ddbf6-b145-4d43-bd13-93b05cc202a2",
"sender_wallet_id": "6684cc88-7434-4a0e-bc2c-abee383368b7",
"receiver_wallet_id": null,
"transaction_id": "X2APAWCOE6",
"asset_code": "USDC",
"amount": "1.00000000",
"reference_id": "980ddbf6-b145-4d43-bd13-93b05cc202a2",
"status": "COMPLETED",
"created_at": "2025-04-02T22:06:03.507Z",
"updated_at": "2025-04-02T22:06:03.507Z",
"crypto_transaction_id": null,
"network": null,
"transaction_type": "INTERNAL TRANSFER",
"transaction_mode": "DEBIT",
"exchange_rate": null,
"withdrawal_recipient_name": null,
"fee": null,
"balance": "0.00000000",
"reason": null,
"customer_id": null,
"recipient_currency": null,
"recipient_country": null,
"bank_name": null,
"bank_code": null,
"address": null,
"bank_account": null
}
]
}{
"status": "error",
"message": "Invalid reference ID format",
"code": "INVALID_REFERENCE_ID"
}{
"status": "error",
"message": "No transactions found with this reference ID",
"code": "TRANSACTIONS_NOT_FOUND"
}Transactions
Get by Reference ID
API reference for fetching a transaction by Reference ID
GET
/
customers
/
transactions
/
by_ref_id
/
{reference_id}
Fetch transactions by reference ID
curl --request GET \
--url https://api-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_id} \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_id}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_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-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_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: <x-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-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-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-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_id}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.stablestack.com/api/customers/transactions/by_ref_id/{reference_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": [
{
"id": "790ddbf6-b145-4d43-bd13-93b05cc202a2",
"sender_wallet_id": "6684cc88-7434-4a0e-bc2c-abee383368b7",
"receiver_wallet_id": null,
"transaction_id": "X2APAWCOE6",
"asset_code": "USDC",
"amount": "1.00000000",
"reference_id": "980ddbf6-b145-4d43-bd13-93b05cc202a2",
"status": "COMPLETED",
"created_at": "2025-04-02T22:06:03.507Z",
"updated_at": "2025-04-02T22:06:03.507Z",
"crypto_transaction_id": null,
"network": null,
"transaction_type": "INTERNAL TRANSFER",
"transaction_mode": "DEBIT",
"exchange_rate": null,
"withdrawal_recipient_name": null,
"fee": null,
"balance": "0.00000000",
"reason": null,
"customer_id": null,
"recipient_currency": null,
"recipient_country": null,
"bank_name": null,
"bank_code": null,
"address": null,
"bank_account": null
}
]
}{
"status": "error",
"message": "Invalid reference ID format",
"code": "INVALID_REFERENCE_ID"
}{
"status": "error",
"message": "No transactions found with this reference ID",
"code": "TRANSACTIONS_NOT_FOUND"
}Retrieves detailed information about a specific transaction using its unique reference ID.
Key Features:
- Returns complete transaction details including sender/receiver information
- Provides status and timestamp information
- Includes all relevant financial details (amount, fees, exchange rate)
- Shows transaction type and mode
- Returns bank details for payout transactions
Path Parameters:
reference_id: The unique reference ID to retrieve (string, required). e.g980ddbf6-b145-4d43-bd13-93b05cc202a2