Get payments
Copy page
Transaction history, merged from two sources: gateway payments and portal adjustments.
GET
/api/v1/user/payments
· Permission: payments.read
Request
Section titled “Request”curl https://restlink23telecom.com/api/v1/user/payments \ -H "X-API-Key: $API_KEY"const res = await fetch('https://restlink23telecom.com/api/v1/user/payments', { method: 'GET', headers: { 'X-API-Key': process.env.API_KEY },});
if (!res.ok) { const err = await res.json(); throw new Error(`${err.error_code}: ${err.description}`);}const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://restlink23telecom.com/api/v1/user/payments", headers={"X-API-Key": os.environ["API_KEY"]},)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://restlink23telecom.com/api/v1/user/payments');curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('API_KEY')],]);
$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);curl_close($ch);
if ($status !== 200) { throw new Exception("HTTP $status: $response");}$data = json_decode($response, true);print_r($data);require "net/http"require "json"
uri = URI("https://restlink23telecom.com/api/v1/user/payments")req = Net::HTTP::Get.new(uri)req["X-API-Key"] = ENV.fetch("API_KEY")
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }raise "HTTP #{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)
puts JSON.parse(res.body)import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://restlink23telecom.com/api/v1/user/payments")) .header("X-API-Key", System.getenv("API_KEY")) .GET() .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://restlink23telecom.com/api/v1/user/payments", nil) if err != nil { panic(err) } req.Header.Set("X-API-Key", os.Getenv("API_KEY"))
res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close()
data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();client.DefaultRequestHeaders.Add("X-API-Key", Environment.GetEnvironmentVariable("API_KEY"));
var response = await client.GetAsync("https://restlink23telecom.com/api/v1/user/payments");
response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());Response
Section titled “Response”[ { "id": "sms_gateway_S12345", "amount": 500.00, "currency": "EUR", "date": "2026-02-10T14:30:00Z", "type": "deposit", "description": "Wire transfer REF-2026-001", "source": "sms_gateway" }, { "id": "portal_P678", "amount": 50.00, "currency": "EUR", "date": "2026-02-08T09:00:00Z", "type": "adjustment", "description": "Manual credit by admin", "source": "portal" }]| Field | Description |
|---|---|
id | sms_gateway_S{id} for gateway payments, portal_P{id} for portal adjustments |
source | sms_gateway (upstream payment) or portal (manual admin adjustment) |
type | Meaning |
|---|---|
deposit | Incoming payment |
usage | SMS cost (negative amount) |
adjustment | Manual credit or debit by an administrator |
- During account setup the endpoint returns HTTP 200 with
{"status": false, "error": "Account is in setup process", …}. - Degraded-cache behavior (see balance):
partialreturns portal adjustments only;unavailablereturns[]— check theX-Sms-Gateway-Statusheader.