cURL
#!/usr/bin/env bash
# Confirm a card token is bound to a session before your server trusts it.
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}"
: "${RADIUMONE_SESSION_ID:?set RADIUMONE_SESSION_ID to the session to verify}"
curl -sS -X POST "$API_BASE/v1/sessions/$RADIUMONE_SESSION_ID/verify" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RADIUMONE_ACCESS_TOKEN" \
-d @request.json#!/usr/bin/env python3
"""Confirm a card token is bound to a session. 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 verify_session_token() -> dict:
body = json.loads((Path(__file__).parent / "request.json").read_text())
session_id = os.environ["RADIUMONE_SESSION_ID"]
resp = requests.post(
f"{API_BASE}/v1/sessions/{session_id}/verify",
json=body,
headers={"Authorization": f"Bearer {os.environ.get('RADIUMONE_ACCESS_TOKEN', '')}"},
timeout=30,
)
payload = resp.json()
if not resp.ok:
# 422 token:verification-failed on a mismatch.
code = payload.get("type") or payload.get("code")
raise RuntimeError(f"sessions verify failed: {code} ({resp.status_code})")
return payload
if __name__ == "__main__":
print(json.dumps(verify_session_token(), indent=2))
{
"data": {
"session_id": "<string>",
"status": "<string>",
"token": "<string>"
},
"message": "<string>",
"request_id": "<string>",
"status": "ok"
}{
"detail": "Request payload failed validation.",
"status": 400,
"title": "Validation Error",
"type": "urn:radiumone:payment-gateway:validation-error"
}{
"detail": "Missing or invalid Bearer token.",
"status": 401,
"title": "Authentication Required",
"type": "urn:radiumone:payment-gateway:authentication-required"
}{
"detail": "Insufficient permissions for this operation.",
"status": 403,
"title": "Permission Denied",
"type": "urn:radiumone:payment-gateway:permission-denied"
}{
"detail": "The requested resource does not exist.",
"status": 404,
"title": "Not Found",
"type": "urn:radiumone:payment-gateway:not-found"
}{
"detail": "Your merchant account is not yet set up for card tokenization and could not be set up automatically. Retry later; contact support if the problem continues.",
"status": 409,
"title": "Merchant Not Provisioned",
"type": "urn:radiumone:payment-gateway:checkout:merchant-not-provisioned"
}{
"detail": "`urn:radiumone:payment-gateway:token:verification-failed`: the token does not match the card bound to the session, or no card is bound.",
"status": 422,
"title": "Unprocessable Content",
"type": "urn:radiumone:payment-gateway:token:verification-failed"
}{
"detail": "Too many bind attempts for this session; the session is temporarily locked. This is a lockout, not a transient error -- do not auto-retry.",
"status": 429,
"title": "Bind Rate Limit",
"type": "urn:radiumone:tokenization:bind-rate-limit"
}{
"detail": "An unexpected error occurred.",
"status": 500,
"title": "Internal Server Error",
"type": "urn:radiumone:payment-gateway:internal-error"
}{
"detail": "A downstream dependency is unavailable or did not respond in time. `urn:radiumone:payment-gateway:service-unavailable` carries `retry_allowed` true when the failure came before any work (signing keys unavailable, service starting). `urn:radiumone:payment-gateway:request-deadline-exceeded` carries `retry_allowed` true only for GET/HEAD/OPTIONS -- a mutating request may have reached a host.",
"status": 503,
"title": "Service Unavailable",
"type": "urn:radiumone:payment-gateway:service-unavailable"
}Verify session token - Payments API
Confirm that a card token belongs to a tokenization session your merchant account owns before you charge it.
POST
/
v1
/
sessions
/
{session_id}
/
verify
cURL
#!/usr/bin/env bash
# Confirm a card token is bound to a session before your server trusts it.
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}"
: "${RADIUMONE_SESSION_ID:?set RADIUMONE_SESSION_ID to the session to verify}"
curl -sS -X POST "$API_BASE/v1/sessions/$RADIUMONE_SESSION_ID/verify" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RADIUMONE_ACCESS_TOKEN" \
-d @request.json#!/usr/bin/env python3
"""Confirm a card token is bound to a session. 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 verify_session_token() -> dict:
body = json.loads((Path(__file__).parent / "request.json").read_text())
session_id = os.environ["RADIUMONE_SESSION_ID"]
resp = requests.post(
f"{API_BASE}/v1/sessions/{session_id}/verify",
json=body,
headers={"Authorization": f"Bearer {os.environ.get('RADIUMONE_ACCESS_TOKEN', '')}"},
timeout=30,
)
payload = resp.json()
if not resp.ok:
# 422 token:verification-failed on a mismatch.
code = payload.get("type") or payload.get("code")
raise RuntimeError(f"sessions verify failed: {code} ({resp.status_code})")
return payload
if __name__ == "__main__":
print(json.dumps(verify_session_token(), indent=2))
{
"data": {
"session_id": "<string>",
"status": "<string>",
"token": "<string>"
},
"message": "<string>",
"request_id": "<string>",
"status": "ok"
}{
"detail": "Request payload failed validation.",
"status": 400,
"title": "Validation Error",
"type": "urn:radiumone:payment-gateway:validation-error"
}{
"detail": "Missing or invalid Bearer token.",
"status": 401,
"title": "Authentication Required",
"type": "urn:radiumone:payment-gateway:authentication-required"
}{
"detail": "Insufficient permissions for this operation.",
"status": 403,
"title": "Permission Denied",
"type": "urn:radiumone:payment-gateway:permission-denied"
}{
"detail": "The requested resource does not exist.",
"status": 404,
"title": "Not Found",
"type": "urn:radiumone:payment-gateway:not-found"
}{
"detail": "Your merchant account is not yet set up for card tokenization and could not be set up automatically. Retry later; contact support if the problem continues.",
"status": 409,
"title": "Merchant Not Provisioned",
"type": "urn:radiumone:payment-gateway:checkout:merchant-not-provisioned"
}{
"detail": "`urn:radiumone:payment-gateway:token:verification-failed`: the token does not match the card bound to the session, or no card is bound.",
"status": 422,
"title": "Unprocessable Content",
"type": "urn:radiumone:payment-gateway:token:verification-failed"
}{
"detail": "Too many bind attempts for this session; the session is temporarily locked. This is a lockout, not a transient error -- do not auto-retry.",
"status": 429,
"title": "Bind Rate Limit",
"type": "urn:radiumone:tokenization:bind-rate-limit"
}{
"detail": "An unexpected error occurred.",
"status": 500,
"title": "Internal Server Error",
"type": "urn:radiumone:payment-gateway:internal-error"
}{
"detail": "A downstream dependency is unavailable or did not respond in time. `urn:radiumone:payment-gateway:service-unavailable` carries `retry_allowed` true when the failure came before any work (signing keys unavailable, service starting). `urn:radiumone:payment-gateway:request-deadline-exceeded` carries `retry_allowed` true only for GET/HEAD/OPTIONS -- a mutating request may have reached a host.",
"status": 503,
"title": "Service Unavailable",
"type": "urn:radiumone:payment-gateway:service-unavailable"
}Authorizations
Body
application/json
Response
Successful Response
Standard success envelope. Every successful response has this shape, with the operation's own payload under data.
Correlation ID for this HTTP request, for logs and support. Send your own in the X-Request-Id header (letters, digits and hyphens, up to 36 characters -- other characters are stripped) or the gateway generates one. This is NOT the request_id idempotency key you send in a transaction body; the two are unrelated.