Get Transactions
curl --request GET \
--url https://api.zerocash.tech/api/b2b/transactions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zerocash.tech/api/b2b/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerocash.tech/api/b2b/transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zerocash.tech/api/b2b/transactions",
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.zerocash.tech/api/b2b/transactions"
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))
}{
"success": true,
"data": [
{
"country": "KE",
"amount": 2500,
"senderAmount": 2500,
"year": "2024",
"destination": "Bank Account",
"type": "withdrew",
"chargeStatus": "successful",
"transactionId": "onn4nQlnxWQbzZosaN57",
"receiverAmount": 2500,
"fullTimestamp": "2024-09-14T01:47:38+03:00",
"senderCurrency": "KES",
"month": "September",
"beneficiary": {
"country": "Kenya",
"bankCode": "MoMo",
"accountName": "John Doe",
"destination": "MoMo",
"currency": "KES",
"accountNumber": "0712345678"
},
"currency": "KES",
"receiverCurrency": "KES",
"day": "Saturday",
"status": "SUCCESSFUL"
}
]
}{}Transactions
Get Transactions
Lists recent transactions for your account. Results are paginated and return up to 3 transactions by default. Pass limit to request up to 10 transactions per call. For status checks on a known transaction, use GET /api/b2b/transactions/{tra
GET
/
api
/
b2b
/
transactions
Get Transactions
curl --request GET \
--url https://api.zerocash.tech/api/b2b/transactions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zerocash.tech/api/b2b/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerocash.tech/api/b2b/transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zerocash.tech/api/b2b/transactions",
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.zerocash.tech/api/b2b/transactions"
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))
}{
"success": true,
"data": [
{
"country": "KE",
"amount": 2500,
"senderAmount": 2500,
"year": "2024",
"destination": "Bank Account",
"type": "withdrew",
"chargeStatus": "successful",
"transactionId": "onn4nQlnxWQbzZosaN57",
"receiverAmount": 2500,
"fullTimestamp": "2024-09-14T01:47:38+03:00",
"senderCurrency": "KES",
"month": "September",
"beneficiary": {
"country": "Kenya",
"bankCode": "MoMo",
"accountName": "John Doe",
"destination": "MoMo",
"currency": "KES",
"accountNumber": "0712345678"
},
"currency": "KES",
"receiverCurrency": "KES",
"day": "Saturday",
"status": "SUCCESSFUL"
}
]
}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Format YYYY-MM-DD
Format YYYY-MM-DD
pending, failed or successful
Number of transactions to return. Defaults to 3 and cannot exceed 10.
Required range:
1 <= x <= 10Used to get the transactions after the specified transactionId