Skip to main content
GET
/
merchant-accounts
List merchant accounts
using RestSharp;


var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/merchant-accounts");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.{id}.gr4vy.app/merchant-accounts"

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.sandbox.{id}.gr4vy.app/merchant-accounts")
.header("Authorization", "Bearer <token>")
.asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/merchant-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 => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
import requests

url = "https://api.sandbox.{id}.gr4vy.app/merchant-accounts"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.sandbox.{id}.gr4vy.app/merchant-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/merchant-accounts \
--header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "type": "merchant-account",
      "id": "plantly-uk",
      "display_name": "Plantly UK",
      "outbound_webhook_url": "https://www.example.com/webhook",
      "outbound_webhook_username": "gr4vy",
      "outbound_webhook_password": "********",
      "visa_network_tokens_requestor_id": "e50fa0da-903d-4d54-aacc-4cac57d48df2",
      "visa_network_tokens_app_id": "e50fa0da-903d-4d54-aacc-4cac57d48df2",
      "amex_network_tokens_requestor_id": "e50fa0da-903d-4d54-aacc-4cac57d48df2",
      "amex_network_tokens_app_id": "e50fa0da-903d-4d54-aacc-4cac57d48df2",
      "mastercard_network_tokens_requestor_id": "e50fa0da-903d-4d54-aacc-4cac57d48df2",
      "mastercard_network_tokens_app_id": "e50fa0da-903d-4d54-aacc-4cac57d48df2",
      "loon_client_key": "7DD771287D0024BA418F8F7ECC7DF1CD",
      "loon_secret_key": "********",
      "loon_accepted_schemes": [
        "mastercard",
        "visa"
      ],
      "account_updater_enabled": true,
      "account_updater_request_encryption_key": "example-encryption-key",
      "account_updater_request_encryption_key_id": "example-encryption-key-id",
      "account_updater_response_decryption_key": "example-decryption-key",
      "account_updater_response_decryption_key_id": "example-decryption-key-id",
      "created_at": "2022-02-01T14:20:00.000+00:00",
      "updated_at": "2022-02-01T14:20:00.000+00:00",
      "over_capture_amount": 1000,
      "over_capture_percentage": 20
    }
  ],
  "limit": 1,
  "next_cursor": "ZXhhbXBsZTE",
  "previous_cursor": null
}
{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}
This endpoint requires the merchant-accounts.read scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Returns a paginated list of merchant accounts.

items
Merchant Account · object[]

A list of merchant accounts.

limit
integer<int32>
default:20

The limit applied to request. This represents the number of items that are at maximum returned by this request.

Required range: 1 <= x <= 100
Example:

1

next_cursor
string | null

The cursor that represents the next page of results. Use the cursor query parameter to fetch this page of items.

Required string length: 1 - 1000
Example:

"ZXhhbXBsZTE"

previous_cursor
string | null

The cursor that represents the next page of results. Use the cursor query parameter to fetch this page of items.

Required string length: 1 - 1000
Example:

null