PATCH
/api/public/v1/billing/auto-refill

Update auto-refill settings

Update the auto-refill threshold and refill amount. Amounts are in cents.

Request Body

PropertyTypeDescription
creditAutoRefillEnabledbooleanEnable/disable auto-refill.
creditAutoRefillThresholdnumberBalance threshold in cents (>= 500).
creditAutoRefillAmountnumberAmount to add in cents (>= 500).
PATCHExample request
curl
curl -X PATCH "https://www.pxb.app/api/public/v1/billing/auto-refill" \
  -H "X-Organization-Id: your_org_id" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "creditAutoRefillThreshold": 1000,
    "creditAutoRefillAmount": 5000
  }'
200Example response
json
{
  "message": "Auto-refill settings updated successfully!",
  "content": {
    "creditBalance": 12500,
    "creditAutoRefillEnabled": true,
    "creditAutoRefillThreshold": 1000,
    "creditAutoRefillAmount": 5000
  }
}