cURL
#!/usr/bin/env bash
# Rotate the redirect-signature secret. The plaintext is returned exactly
# once — store it immediately. Old and new secrets both verify for a grace
# window after rotation.
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 with the merchant-secret-rotate scope}"
curl -sS -X POST "$API_BASE/v1/merchant/redirect-secret/rotate" \
-H "Authorization: Bearer $RADIUMONE_ACCESS_TOKEN"#!/usr/bin/env python3
"""Rotate the redirect-signature secret. The plaintext is returned exactly
once — store it immediately.
"""
import json
import os
import requests
API_BASE = os.environ.get("RADIUMONE_API_BASE", "https://api-sandbox.radiumone.io/gateway")
def rotate_redirect_secret() -> dict:
resp = requests.post(
f"{API_BASE}/v1/merchant/redirect-secret/rotate",
headers={"Authorization": f"Bearer {os.environ.get('RADIUMONE_ACCESS_TOKEN', '')}"},
timeout=30,
)
payload = resp.json()
if not resp.ok:
code = payload.get("type") or payload.get("code")
raise RuntimeError(f"redirect-secret rotate failed: {code} ({resp.status_code})")
# Never log payload["data"]["redirect_secret"] — store it in your secret manager only.
return payload
if __name__ == "__main__":
print(json.dumps(rotate_redirect_secret(), indent=2))
{
"data": {
"redirect_secret": "<string>",
"rotated_at": "<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": "A resource with that identifier already exists.",
"status": 409,
"title": "Conflict",
"type": "urn:radiumone:payment-gateway:conflict"
}{
"detail": "The payment token has expired or its card data is no longer available.",
"status": 410,
"title": "Gone",
"type": "urn:radiumone:payment-gateway:token:data-purged"
}{
"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"
}Rotate redirect secret - Payments API
Generate a new secret for signing hosted checkout redirects. The response contains the new secret in plaintext, so store it securely right away.
POST
/
v1
/
merchant
/
redirect-secret
/
rotate
cURL
#!/usr/bin/env bash
# Rotate the redirect-signature secret. The plaintext is returned exactly
# once — store it immediately. Old and new secrets both verify for a grace
# window after rotation.
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 with the merchant-secret-rotate scope}"
curl -sS -X POST "$API_BASE/v1/merchant/redirect-secret/rotate" \
-H "Authorization: Bearer $RADIUMONE_ACCESS_TOKEN"#!/usr/bin/env python3
"""Rotate the redirect-signature secret. The plaintext is returned exactly
once — store it immediately.
"""
import json
import os
import requests
API_BASE = os.environ.get("RADIUMONE_API_BASE", "https://api-sandbox.radiumone.io/gateway")
def rotate_redirect_secret() -> dict:
resp = requests.post(
f"{API_BASE}/v1/merchant/redirect-secret/rotate",
headers={"Authorization": f"Bearer {os.environ.get('RADIUMONE_ACCESS_TOKEN', '')}"},
timeout=30,
)
payload = resp.json()
if not resp.ok:
code = payload.get("type") or payload.get("code")
raise RuntimeError(f"redirect-secret rotate failed: {code} ({resp.status_code})")
# Never log payload["data"]["redirect_secret"] — store it in your secret manager only.
return payload
if __name__ == "__main__":
print(json.dumps(rotate_redirect_secret(), indent=2))
{
"data": {
"redirect_secret": "<string>",
"rotated_at": "<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": "A resource with that identifier already exists.",
"status": 409,
"title": "Conflict",
"type": "urn:radiumone:payment-gateway:conflict"
}{
"detail": "The payment token has expired or its card data is no longer available.",
"status": 410,
"title": "Gone",
"type": "urn:radiumone:payment-gateway:token:data-purged"
}{
"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
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.