Skip to main content
GET
/
v1
/
aggregators
/
{raast-aggregator-id}
/
merchants
List Merchants
curl --request GET \
  --url https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants \
  --header 'X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>'
import requests

url = "https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/merchants"

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', 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",
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"

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")
.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")

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": {
    "merchants": [
      {
        "id": "39",
        "token": "am_c1460543-4a10-473c-b60b-60218326d1b1",
        "name": "test co type1",
        "aggregator_id": "agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e",
        "merchant_id": "mer_eb2f5757-c0e4-4eb4-ad4b-2f4b671a84e2",
        "merchant_external_id": "sec_0c3de397-441f-471f-bcd7-b6d948e1c307",
        "bank_account_id": "acc_a17a478a-f7cd-448b-9753-5729a6f237ad",
        "enabled": false,
        "created_at": "2025-07-24T07:11:31Z",
        "updated_at": "2025-07-25T06:31:25Z"
      },
      {
        "id": "44",
        "token": "am_d7fd05ea-8613-4038-afd7-4275f29110f5",
        "name": "TestingMerchant",
        "aggregator_id": "agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e",
        "merchant_id": "mer_eb2f5757-c0e4-4eb4-ad4b-2f4b671a84e2",
        "merchant_external_id": "sec_0c3de397-441f-471f-bcd7-b6d948e1c307",
        "bank_account_id": "acc_a17a478a-f7cd-448b-9753-5729a6f237ad",
        "enabled": true,
        "created_at": "2025-05-21T09:36:42.586176361Z",
        "updated_at": "2025-05-21T09:36:42.586185862Z"
      }
    ],
    "count": "2"
  }
}
{
"api_version": "v1",
"error": {
"code": "error.unauthorized_access",
"message": "partner access key is required in request header"
}
}

Authorizations

X-SFPY-AGGREGATOR-SECRET-KEY
string
header
required

Path Parameters

raast-aggregator-id
string
required

The unique identifier for the aggregator

Example:

"agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e"

Query Parameters

limit
string

Maximum number of merchants to return in a single page

Example:

"10"

offset
string

Cursor offset used for pagination

Example:

"0"

enabled
string

Filter merchants by their enabled status

Example:

"true"

merchant_identifiers
string

Comma-separated list of merchant identifiers to match

Example:

"am_1234567890"

names
string

Comma-separated list of merchant names to match

Example:

"Test Merchant"

Response

This response contains a paginated list of merchants linked to an aggregator

Standard response structure for successful operations

api_version
string

The current version of the API spec

Example:

"v1"

data
object

Contains the response data