Skip to content

Retrieve payment history and manual balance adjustments for the active workspace.

GET /api/v1/user/payments · Permission: payments.read

Terminal window
curl https://restlink23telecom.com/api/v1/user/payments \
-H "X-API-Key: $API_KEY"

This endpoint requires payments.read. When a key lacks it, the response is 403 FORBIDDEN with required_permission set to payments.read; enable it in Portal → API Keys → Edit permissions. A key can be updated only by a user who holds that permission; otherwise ask the account owner to update or replace the key. An integration SMS key also receives 403 FORBIDDEN, without required_permission, because it can call only the integration send endpoint. A team member whose role hides Billing or lacks billing.read (in the portal, or through a key they created) receives 403 SECTION_ACCESS_DENIED with "section": "billing". Workspace errors for portal sessions are listed in Errors.

200 OK
{
"payments": [
{
"id": "sms_gateway_S12345",
"amount": 500,
"currency": "EUR",
"date": "2026-02-10T14:30:00Z",
"type": "deposit",
"method": "bank",
"status": "settled",
"ref_display": "Bank transfer",
"description": "Bank transfer",
"source": "sms_gateway"
},
{
"id": "crypto_h_42",
"amount": 100,
"currency": "EUR",
"date": "2026-02-09T12:00:00Z",
"type": "deposit",
"method": "crypto",
"status": "declined",
"ref_display": "Crypto top-up",
"reason": "Deposit could not be credited automatically. Please contact support.",
"description": "Crypto top-up",
"source": "crypto"
},
{
"id": "portal_P678",
"amount": -20,
"currency": "EUR",
"date": "2026-02-08T09:00:00Z",
"type": "adjustment",
"method": "portal",
"status": "settled",
"ref_display": "Manual debit",
"description": "Manual debit",
"source": "portal"
}
],
"totals": {
"deposits": 500,
"withdrawals": 0,
"adjustments": -20,
"count": 2,
"currency": "EUR"
}
}
Field Meaning
payments Newest first; [] when empty.
totals Totals for settled rows in the account currency.
sources_degraded Present only when a source failed; rows from listed sources may be incomplete.
Field Type Meaning
id string Opaque payment ID.
amount number Signed: deposits positive, usage negative, adjustments either sign.
currency string Currency code.
date string (RFC3339 date-time) Payment date.
type string deposit, usage, or adjustment.
method string card, crypto, bank, or portal.
status string settled, in_progress, or declined.
ref_display string Same text as description; never a raw provider reference.
reason string (optional) Only on declined rows, when a reason is known.
description string Client-safe payment label.
source string sms_gateway, portal, stripe, or crypto.

IDs are opaque. Prefixes are sms_gateway_S, portal_P, stripe_, crypto_, and crypto_h_.

Totals include settled rows in the account currency only. count is the number of rows summed; withdrawals is a positive magnitude. An unknown currency gives "" and zero sums.

There is no pagination.

During setup, HTTP 200 contains "error": "Account is in setup process" and "status": false.

X-Sms-Gateway-Status is partial when rows exist and unavailable otherwise. See degraded balance for the reason header.

Money fields and labels are null for team-member portal sessions without balance.read; API keys are never redacted.

Authentication and access checks run before balance, pricing and payments handlers. Their response body is:

{"status":false,"error_code":"API_KEY_VALIDATION_UNAVAILABLE","description":"An internal error occurred. Reference: req-3f9c2b7d1e0a4c5b6d7e8f90"}

Quote the X-Request-ID header to support. Retry after a short pause; when Retry-After is present it is 1.

error_code Who can receive it Retry-After Cause
API_KEY_VALIDATION_UNAVAILABLE API keys 1 The key could not be checked.
AUTH_PROTECTION_UNAVAILABLE Unrecognised API keys 1 Failed-attempt protection is unavailable.
REPLAY_PROTECTION_UNAVAILABLE Signed API-key POST requests (here only POST /user/pricing); never GET 1 Replay protection is unavailable.
RATE_LIMIT_UNAVAILABLE API keys and portal sessions — The per-account rate limiter is unavailable.
SECTION_ACCESS_UNAVAILABLE Team members (portal session or a key they created) — Section access could not be checked.
WORKSPACE_ACCESS_UNAVAILABLE Portal sessions only; never API keys 1 Workspace access could not be checked.

Like balance and pricing, this endpoint can also return 429 RATE_LIMIT_EXCEEDED or 429 TOO_MANY_ATTEMPTS; see Balance errors.