cURL
#!/usr/bin/env bash
# Revoke a refresh token. Requires a valid Bearer access token. Idempotent:
# 204 whether the token was found, already revoked, or unknown.
set -euo pipefail
API_BASE="${RADIUMONE_API_BASE:-https://api-sandbox.radiumone.io/gateway}"
: "${RADIUMONE_ACCESS_TOKEN:?set RADIUMONE_ACCESS_TOKEN to a Bearer access token}"
curl -sS -o /dev/null -w '%{http_code}\n' -X POST "$API_BASE/v1/auth/token/revoke" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RADIUMONE_ACCESS_TOKEN" \
-d @request.json#!/usr/bin/env python3
"""Revoke a refresh token. Requires a Bearer access token. Python 3.10+, requests."""
import json
import os
from pathlib import Path
import requests
API_BASE = os.environ.get("RADIUMONE_API_BASE", "https://api-sandbox.radiumone.io/gateway")
def revoke_refresh_token() -> int:
body = json.loads((Path(__file__).parent / "request.json").read_text())
if os.environ.get("RADIUMONE_REFRESH_TOKEN"):
body["refresh_token"] = os.environ["RADIUMONE_REFRESH_TOKEN"]
resp = requests.post(
f"{API_BASE}/v1/auth/token/revoke",
json=body,
headers={"Authorization": f"Bearer {os.environ.get('RADIUMONE_ACCESS_TOKEN', '')}"},
timeout=30,
)
if resp.status_code != 204:
payload = resp.json() if resp.content else {}
raise RuntimeError(f"auth/token/revoke failed: {payload.get('type') or payload.get('code')} ({resp.status_code})")
return resp.status_code
if __name__ == "__main__":
print(f"revoked (HTTP {revoke_refresh_token()})")
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"request_id": "<string>",
"code": "<string>",
"retry_allowed": true,
"errors": [
{
"pointer": "<string>",
"parameter": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}{
"detail": "Missing or invalid Bearer token.",
"status": 401,
"title": "Authentication Required",
"type": "urn:radiumone:gateway:authentication-required"
}{
"detail": "An unexpected error occurred.",
"status": 500,
"title": "Internal Server Error",
"type": "urn:radiumone:gateway:internal-server-error"
}{
"detail": "A downstream dependency is unavailable or did not respond in time.",
"status": 503,
"title": "Service Unavailable",
"type": "urn:radiumone:gateway:service-unavailable"
}Revoke refresh token - Payments API
Revoke a refresh token so it can’t issue new access tokens. Safe to retry — returns 204 even if the token was already revoked.
POST
/
v1
/
auth
/
token
/
revoke
cURL
#!/usr/bin/env bash
# Revoke a refresh token. Requires a valid Bearer access token. Idempotent:
# 204 whether the token was found, already revoked, or unknown.
set -euo pipefail
API_BASE="${RADIUMONE_API_BASE:-https://api-sandbox.radiumone.io/gateway}"
: "${RADIUMONE_ACCESS_TOKEN:?set RADIUMONE_ACCESS_TOKEN to a Bearer access token}"
curl -sS -o /dev/null -w '%{http_code}\n' -X POST "$API_BASE/v1/auth/token/revoke" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RADIUMONE_ACCESS_TOKEN" \
-d @request.json#!/usr/bin/env python3
"""Revoke a refresh token. Requires a Bearer access token. Python 3.10+, requests."""
import json
import os
from pathlib import Path
import requests
API_BASE = os.environ.get("RADIUMONE_API_BASE", "https://api-sandbox.radiumone.io/gateway")
def revoke_refresh_token() -> int:
body = json.loads((Path(__file__).parent / "request.json").read_text())
if os.environ.get("RADIUMONE_REFRESH_TOKEN"):
body["refresh_token"] = os.environ["RADIUMONE_REFRESH_TOKEN"]
resp = requests.post(
f"{API_BASE}/v1/auth/token/revoke",
json=body,
headers={"Authorization": f"Bearer {os.environ.get('RADIUMONE_ACCESS_TOKEN', '')}"},
timeout=30,
)
if resp.status_code != 204:
payload = resp.json() if resp.content else {}
raise RuntimeError(f"auth/token/revoke failed: {payload.get('type') or payload.get('code')} ({resp.status_code})")
return resp.status_code
if __name__ == "__main__":
print(f"revoked (HTTP {revoke_refresh_token()})")
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"request_id": "<string>",
"code": "<string>",
"retry_allowed": true,
"errors": [
{
"pointer": "<string>",
"parameter": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}{
"detail": "Missing or invalid Bearer token.",
"status": 401,
"title": "Authentication Required",
"type": "urn:radiumone:gateway:authentication-required"
}{
"detail": "An unexpected error occurred.",
"status": 500,
"title": "Internal Server Error",
"type": "urn:radiumone:gateway:internal-server-error"
}{
"detail": "A downstream dependency is unavailable or did not respond in time.",
"status": 503,
"title": "Service Unavailable",
"type": "urn:radiumone:gateway:service-unavailable"
}Authorizations
Bearer access token from POST /v1/auth/token. Treat it as an opaque string — do not depend on its internal encoding, which has changed before and isn't part of the contract.
Body
application/json
Request body for POST /auth/token/revoke.
Opaque refresh token to revoke.
Required string length:
53Pattern:
^r1rt_[0-9a-f]{48}$Response
Token revoked (or already revoked / not found). Idempotent.
Last modified on September 15, 2026