List counters
curl --request GET \
--url http://api-sandbox.fexpayments.com/merchant/api/v1/counters \
--header 'Authorization: Bearer <token>'import requests
url = "http://api-sandbox.fexpayments.com/merchant/api/v1/counters"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api-sandbox.fexpayments.com/merchant/api/v1/counters', 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 => "http://api-sandbox.fexpayments.com/merchant/api/v1/counters",
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 := "http://api-sandbox.fexpayments.com/merchant/api/v1/counters"
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("http://api-sandbox.fexpayments.com/merchant/api/v1/counters")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api-sandbox.fexpayments.com/merchant/api/v1/counters")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"counters": [
{
"id": "c1d2e3f4-a5b6-7890-abcd-ef1234567890",
"merchant_id": "74815c83-e47b-4dc5-aefe-abe4484dd280",
"name": "Counter 1",
"status": "active",
"location": "Floor 2, Register 3",
"keycloak_client_id": "counter-c1d2e3f4-a5b6-7890-abcd-ef1234567890",
"webhook_url": "https://pos.example.com/webhooks/payments",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total": 3
}{
"success": false,
"error": "Unauthorized"
}{
"success": false,
"error": "Failed to create payment intent"
}Counters
List counters
List all counters (POS terminals) for the authenticated merchant.
GET
/
merchant
/
api
/
v1
/
counters
List counters
curl --request GET \
--url http://api-sandbox.fexpayments.com/merchant/api/v1/counters \
--header 'Authorization: Bearer <token>'import requests
url = "http://api-sandbox.fexpayments.com/merchant/api/v1/counters"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api-sandbox.fexpayments.com/merchant/api/v1/counters', 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 => "http://api-sandbox.fexpayments.com/merchant/api/v1/counters",
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 := "http://api-sandbox.fexpayments.com/merchant/api/v1/counters"
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("http://api-sandbox.fexpayments.com/merchant/api/v1/counters")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api-sandbox.fexpayments.com/merchant/api/v1/counters")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"counters": [
{
"id": "c1d2e3f4-a5b6-7890-abcd-ef1234567890",
"merchant_id": "74815c83-e47b-4dc5-aefe-abe4484dd280",
"name": "Counter 1",
"status": "active",
"location": "Floor 2, Register 3",
"keycloak_client_id": "counter-c1d2e3f4-a5b6-7890-abcd-ef1234567890",
"webhook_url": "https://pos.example.com/webhooks/payments",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total": 3
}{
"success": false,
"error": "Unauthorized"
}{
"success": false,
"error": "Failed to create payment intent"
}Authorizations
Keycloak JWT. Roles: admin (platform admin — can register merchants, act on behalf of any merchant), merchant (dashboard user — scoped to their own merchant_id via user attribute mapper), POS terminals use client credentials flow with merchant_id injected via protocol mapper.
⌘I
