cURL
#!/usr/bin/env bash
# Pin the net payable amount (after loyalty redemption)
# BEFORE the browser calls threeDS.authenticate({ ..., selectedPaymentMethod: "card" })
# — required for 3DS + rewards.
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 pin}"
curl -sS -X PATCH "$API_BASE/v1/sessions/$RADIUMONE_SESSION_ID" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RADIUMONE_ACCESS_TOKEN" \
-d @request.json#!/usr/bin/env python3
"""Pin the net payable amount before the browser calls
threeDS.authenticate({ ..., selectedPaymentMethod: "card" }). 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 update_session_amount() -> dict:
body = json.loads((Path(__file__).parent / "request.json").read_text())
session_id = os.environ["RADIUMONE_SESSION_ID"]
resp = requests.patch(
f"{API_BASE}/v1/sessions/{session_id}",
json=body,
headers={"Authorization": f"Bearer {os.environ.get('RADIUMONE_ACCESS_TOKEN', '')}"},
timeout=30,
)
payload = resp.json()
if not resp.ok:
# 422 urn:radiumone:payment-gateway:sessions:amount-not-pinnable if net_payable_amount
# is above the gross order amount or the session expired. Match the whole type.
raise RuntimeError(f"sessions PATCH failed: {payload.get('type')} ({resp.status_code})")
return payload
if __name__ == "__main__":
print(json.dumps(update_session_amount(), indent=2))
{
"data": {
"net_payable_amount": 123,
"session_id": "<string>",
"currency": "<string>",
"currency_minor_units": 123,
"gross_order_amount": 123
},
"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:sessions:amount-not-pinnable`: the session has expired, has no currency, `net_payable_amount` is above the session's order total, or a purchase that presented one of the session's 3DS refs is still in progress.",
"status": 422,
"title": "Unprocessable Content",
"type": "urn:radiumone:payment-gateway:sessions:amount-not-pinnable"
}{
"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"
}Update session amount - Payments API
Set the amount the card will be charged on an existing session, which is also the amount 3D Secure authenticates, before you start 3D Secure.
PATCH
/
v1
/
sessions
/
{session_id}
cURL
#!/usr/bin/env bash
# Pin the net payable amount (after loyalty redemption)
# BEFORE the browser calls threeDS.authenticate({ ..., selectedPaymentMethod: "card" })
# — required for 3DS + rewards.
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 pin}"
curl -sS -X PATCH "$API_BASE/v1/sessions/$RADIUMONE_SESSION_ID" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RADIUMONE_ACCESS_TOKEN" \
-d @request.json#!/usr/bin/env python3
"""Pin the net payable amount before the browser calls
threeDS.authenticate({ ..., selectedPaymentMethod: "card" }). 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 update_session_amount() -> dict:
body = json.loads((Path(__file__).parent / "request.json").read_text())
session_id = os.environ["RADIUMONE_SESSION_ID"]
resp = requests.patch(
f"{API_BASE}/v1/sessions/{session_id}",
json=body,
headers={"Authorization": f"Bearer {os.environ.get('RADIUMONE_ACCESS_TOKEN', '')}"},
timeout=30,
)
payload = resp.json()
if not resp.ok:
# 422 urn:radiumone:payment-gateway:sessions:amount-not-pinnable if net_payable_amount
# is above the gross order amount or the session expired. Match the whole type.
raise RuntimeError(f"sessions PATCH failed: {payload.get('type')} ({resp.status_code})")
return payload
if __name__ == "__main__":
print(json.dumps(update_session_amount(), indent=2))
{
"data": {
"net_payable_amount": 123,
"session_id": "<string>",
"currency": "<string>",
"currency_minor_units": 123,
"gross_order_amount": 123
},
"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:sessions:amount-not-pinnable`: the session has expired, has no currency, `net_payable_amount` is above the session's order total, or a purchase that presented one of the session's 3DS refs is still in progress.",
"status": 422,
"title": "Unprocessable Content",
"type": "urn:radiumone:payment-gateway:sessions:amount-not-pinnable"
}{
"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
Set the amount the card will be charged on an existing checkout session.
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.