Read payment details
curl --request GET \
--url https://api.sarafa.site/v3/transactions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sarafa.site/v3/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.sarafa.site/v3/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.sarafa.site/v3/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.sarafa.site/v3/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.sarafa.site/v3/transactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sarafa.site/v3/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{
"status": "success",
"transaction": {
"tx_reference": "TX7A2B9C4D1E0",
"reference": "collection-101",
"transaction_type": "credit",
"product": "sarafa_charge",
"description": "Payment approval request",
"amount": "10",
"total_amount": "10",
"total_fees": "0",
"currency": "USD",
"channel": "Sarafa",
"status": "pending",
"created_at": "2026-10-30T10:00:00.000Z",
"updated_at": "2026-10-30T10:00:00.000Z",
"exchange_details": null,
"expires_at": "2026-10-30T10:15:00.000Z",
"reason": null
},
"quote": {
"source_currency": "USD",
"destination_currency": "USD",
"amount": "10",
"exchange_rate": "1",
"amount_received": "10",
"total_fees": "0",
"total_debit": "10",
"pricing": "temporary_fixed"
}
}{
"status": "failed",
"error": "<string>",
"request_id": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"status": "failed",
"error": "<string>",
"request_id": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"status": "failed",
"error": "<string>",
"request_id": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"status": "failed",
"error": "<string>",
"request_id": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"status": "failed",
"error": "<string>",
"request_id": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}Accounts and transactions
Payment details
Read a payment’s current status and pricing.
GET
/
transactions
/
{id}
Read payment details
curl --request GET \
--url https://api.sarafa.site/v3/transactions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sarafa.site/v3/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.sarafa.site/v3/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.sarafa.site/v3/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.sarafa.site/v3/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.sarafa.site/v3/transactions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sarafa.site/v3/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{
"status": "success",
"transaction": {
"tx_reference": "TX7A2B9C4D1E0",
"reference": "collection-101",
"transaction_type": "credit",
"product": "sarafa_charge",
"description": "Payment approval request",
"amount": "10",
"total_amount": "10",
"total_fees": "0",
"currency": "USD",
"channel": "Sarafa",
"status": "pending",
"created_at": "2026-10-30T10:00:00.000Z",
"updated_at": "2026-10-30T10:00:00.000Z",
"exchange_details": null,
"expires_at": "2026-10-30T10:15:00.000Z",
"reason": null
},
"quote": {
"source_currency": "USD",
"destination_currency": "USD",
"amount": "10",
"exchange_rate": "1",
"amount_received": "10",
"total_fees": "0",
"total_debit": "10",
"pricing": "temporary_fixed"
}
}{
"status": "failed",
"error": "<string>",
"request_id": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"status": "failed",
"error": "<string>",
"request_id": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"status": "failed",
"error": "<string>",
"request_id": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"status": "failed",
"error": "<string>",
"request_id": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"status": "failed",
"error": "<string>",
"request_id": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>"
}
]
}Use the Sarafa
The top-level
tx_reference as id, for example TX7A2B9C4D1E0. This is different from your merchant reference and is not a database ID. The payment must belong to your organization’s account.
The response includes transaction and quote. A quote can be null for records without payment pricing. Transaction details include exchange_details, and approval requests also include expires_at and reason.
| Transaction status | Meaning |
|---|---|
pending | Awaiting payer approval or settlement. |
needs_review | Outcome requires reconciliation; payment is not confirmed. |
completed | Payment completed. |
failed | Payment failed, was rejected, or approval expired. |
status: "success" only confirms the read succeeded. Check transaction.status before fulfilling an order. For hosted payment links, you can also read the checkout using your merchant reference.Authorizations
Use the full key from the merchant dashboard API section. Keep it on your server.
Path Parameters
Sarafa tx_reference, not the merchant reference or a database ID.
Example:
"TX7A2B9C4D1E0"
