Skip to main content
PUT
/
v1
/
x402
/
settings
curl -X PUT https://api.danubeai.com/v1/x402/settings \
  -H "danube-api-key: dk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "max_per_call_atomic": 2000000,
    "daily_limit_atomic": 10000000
  }'
{
  "id": "abc123",
  "user_id": "user-uuid",
  "max_per_call_atomic": 2000000,
  "daily_limit_atomic": 10000000,
  "created_at": "2026-02-01T00:00:00Z",
  "updated_at": "2026-02-24T12:00:00Z"
}

Overview

Updates the user’s x402 spending limit configuration. Controls how much USDC can be spent on paid tool executions per call and per day. The platform enforces a hard cap of $5.00 (5,000,000 atomic units) per tool call. The max_per_call_atomic cannot exceed this value. Authentication: Requires JWT token or API key.

Body Parameters

max_per_call_atomic
integer
Maximum USDC per tool call in atomic units (6 decimals). Must be between 0 and 5,000,000. Default: 5,000,000 ($5.00).
daily_limit_atomic
integer | null
Daily spending limit in atomic units. Set to null to remove the daily limit. Must be >= 0.

Response

id
string
Settings record UUID.
user_id
string
The user’s UUID.
max_per_call_atomic
integer
Updated maximum USDC per tool call in atomic units.
daily_limit_atomic
integer | null
Updated daily spending limit in atomic units.
created_at
string
ISO 8601 timestamp.
updated_at
string
ISO 8601 timestamp of the update.

Example

curl -X PUT https://api.danubeai.com/v1/x402/settings \
  -H "danube-api-key: dk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "max_per_call_atomic": 2000000,
    "daily_limit_atomic": 10000000
  }'
{
  "id": "abc123",
  "user_id": "user-uuid",
  "max_per_call_atomic": 2000000,
  "daily_limit_atomic": 10000000,
  "created_at": "2026-02-01T00:00:00Z",
  "updated_at": "2026-02-24T12:00:00Z"
}

MCP Tool

When using the Danube MCP Server, use the update_spending_limits tool:
update_spending_limits(max_per_call_usdc=2.0, daily_limit_usdc=10.0)
The MCP tool accepts human-readable USDC values (e.g., 2.0 = $2.00) and converts to atomic units internally. Set daily_limit_usdc to 0 to remove the daily limit.