Find Merchant Ledger Account
curl --request GET \
--url https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts \
--header 'X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>'import requests
url = "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts"
headers = {"X-SFPY-AGGREGATOR-SECRET-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-SFPY-AGGREGATOR-SECRET-KEY': '<api-key>'}};
fetch('https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts', 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.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts",
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-SFPY-AGGREGATOR-SECRET-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://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-SFPY-AGGREGATOR-SECRET-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://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts")
.header("X-SFPY-AGGREGATOR-SECRET-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-SFPY-AGGREGATOR-SECRET-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"api_version": "v1",
"data": {
"id": "47",
"token": "acct_9f23cbf6-8645-4599-b677-85f83175c3f2",
"account_type": "ACCT_MERCHANT",
"account_name": "Ali Aggre-Merch",
"normal_balance": "SIDE_CREDIT",
"balance": "1060",
"currency": "PKR",
"running_balance": "0",
"vault_token": "lock_25d98436-1eea-4d0b-a9df-8f124631b25a",
"bank_acct_id": "acc_831f36c0-97d2-4bd2-ae36-e36025f48ef4",
"external_partner_id": "partner_ed4f0480-36c8-4a5a-8cd4-381bc4d83f2c",
"external_aggregator_id": "agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e",
"external_merchant_id": "am_27211e51-3e1e-4462-b0a5-138e62d265e6",
"created_at": "2026-01-06T09:28:11Z",
"updated_at": "2026-01-06T09:28:11Z"
}
}{
"api_version": "v1",
"error": {
"code": "error.unauthorized_access",
"message": "partner access key is required in request header"
}
}Ledgers
Find Merchant Ledger Account
Explore ledger account in detail
GET
/
v1
/
aggregators
/
{raast-aggregator-id}
/
merchants
/
{aggregator-merchant-id}
/
ledger
/
accounts
Find Merchant Ledger Account
curl --request GET \
--url https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts \
--header 'X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>'import requests
url = "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts"
headers = {"X-SFPY-AGGREGATOR-SECRET-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-SFPY-AGGREGATOR-SECRET-KEY': '<api-key>'}};
fetch('https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts', 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.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts",
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-SFPY-AGGREGATOR-SECRET-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://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-SFPY-AGGREGATOR-SECRET-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://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts")
.header("X-SFPY-AGGREGATOR-SECRET-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants/{aggregator-merchant-id}/ledger/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-SFPY-AGGREGATOR-SECRET-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"api_version": "v1",
"data": {
"id": "47",
"token": "acct_9f23cbf6-8645-4599-b677-85f83175c3f2",
"account_type": "ACCT_MERCHANT",
"account_name": "Ali Aggre-Merch",
"normal_balance": "SIDE_CREDIT",
"balance": "1060",
"currency": "PKR",
"running_balance": "0",
"vault_token": "lock_25d98436-1eea-4d0b-a9df-8f124631b25a",
"bank_acct_id": "acc_831f36c0-97d2-4bd2-ae36-e36025f48ef4",
"external_partner_id": "partner_ed4f0480-36c8-4a5a-8cd4-381bc4d83f2c",
"external_aggregator_id": "agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e",
"external_merchant_id": "am_27211e51-3e1e-4462-b0a5-138e62d265e6",
"created_at": "2026-01-06T09:28:11Z",
"updated_at": "2026-01-06T09:28:11Z"
}
}{
"api_version": "v1",
"error": {
"code": "error.unauthorized_access",
"message": "partner access key is required in request header"
}
}Authorizations
Path Parameters
The unique identifier for the aggregator
Example:
"agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e"
The unique identifier for the merchant
Example:
"am_be454a50-7612-4dc6-a97e-284ebbe7ae93"
Was this page helpful?
⌘I