Get transaction details
curl --request GET \
--url https://staging.api.mavapay.co/api/v1/transaction \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.api.mavapay.co/api/v1/transaction"
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://staging.api.mavapay.co/api/v1/transaction', 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://staging.api.mavapay.co/api/v1/transaction",
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://staging.api.mavapay.co/api/v1/transaction"
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://staging.api.mavapay.co/api/v1/transaction")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.mavapay.co/api/v1/transaction")
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{
"status": "ok",
"data": {
"id": "10cda92f-db32-4f69-ae30-af32a0055caf",
"ref": "142a39e0bb85c45b06a9657f56156",
"hash": "89d7fd6571c8bdf4242091953553c26228dd5b7679729d20aaf2cc84f000d1bc",
"amount": 10000,
"fees": 0,
"autopayout": true,
"createdAt": "2025-01-23T10:46:01.050Z",
"updatedAt": "2025-01-23T10:46:04.590Z",
"metadata": {
"id": "f2bf7bf8-9fe9-4afd-9ebb-cf3abae8cb19",
"merchantId": "f77986d6-75df-4979-85a9-8acedcfca392",
"merchantName": "Ricki Allardice",
"bankName": "CAPITEC BANK",
"bankAccountNumber": "1352906218",
"reference": "2bNkqVDLER7n65O7RrcV",
"customerInternalFee": 0,
"order": {
"id": "22723-5636",
"settledQuoteId": "e3d3cb1c-3206-40bb-81a9-8dfd9d69a853",
"amount": 10000,
"paymentMethod": "LIGHTNING",
"quote": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exchangeRate": 1874805.7499999998,
"usdToTargetCurrencyRate": 18.4977,
"paymentBtcDetail": "<string>",
"paymentMethod": "LIGHTNING",
"totalAmount": 6474,
"equivalentAmount": 10000,
"expiry": "2023-11-07T05:31:56Z",
"sourceCurrency": "BTCSAT",
"customerInternalFee": 0
}
}
}
}
}{
"message": "<string>",
"status": "error"
}Transaction
Get transaction details
Returns the transaction details for a given transaction ID or transactions associated with an order
GET
/
transaction
Get transaction details
curl --request GET \
--url https://staging.api.mavapay.co/api/v1/transaction \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.api.mavapay.co/api/v1/transaction"
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://staging.api.mavapay.co/api/v1/transaction', 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://staging.api.mavapay.co/api/v1/transaction",
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://staging.api.mavapay.co/api/v1/transaction"
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://staging.api.mavapay.co/api/v1/transaction")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.mavapay.co/api/v1/transaction")
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{
"status": "ok",
"data": {
"id": "10cda92f-db32-4f69-ae30-af32a0055caf",
"ref": "142a39e0bb85c45b06a9657f56156",
"hash": "89d7fd6571c8bdf4242091953553c26228dd5b7679729d20aaf2cc84f000d1bc",
"amount": 10000,
"fees": 0,
"autopayout": true,
"createdAt": "2025-01-23T10:46:01.050Z",
"updatedAt": "2025-01-23T10:46:04.590Z",
"metadata": {
"id": "f2bf7bf8-9fe9-4afd-9ebb-cf3abae8cb19",
"merchantId": "f77986d6-75df-4979-85a9-8acedcfca392",
"merchantName": "Ricki Allardice",
"bankName": "CAPITEC BANK",
"bankAccountNumber": "1352906218",
"reference": "2bNkqVDLER7n65O7RrcV",
"customerInternalFee": 0,
"order": {
"id": "22723-5636",
"settledQuoteId": "e3d3cb1c-3206-40bb-81a9-8dfd9d69a853",
"amount": 10000,
"paymentMethod": "LIGHTNING",
"quote": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exchangeRate": 1874805.7499999998,
"usdToTargetCurrencyRate": 18.4977,
"paymentBtcDetail": "<string>",
"paymentMethod": "LIGHTNING",
"totalAmount": 6474,
"equivalentAmount": 10000,
"expiry": "2023-11-07T05:31:56Z",
"sourceCurrency": "BTCSAT",
"customerInternalFee": 0
}
}
}
}
}{
"message": "<string>",
"status": "error"
}Authorizations
ApiKeyAuthbearerAuth
Query Parameters
The transaction ID to get the details for
The order ID to get the transactions for
The payment hash of the transaction to get the details for
⌘I
