PATCH
/api/public/v1/billing/auto-refillUpdate auto-refill settings
Update the auto-refill threshold and refill amount. Amounts are in cents.
Request Body
| Property | Type | Description |
|---|---|---|
creditAutoRefillEnabled | boolean | Enable/disable auto-refill. |
creditAutoRefillThreshold | number | Balance threshold in cents (>= 500). |
creditAutoRefillAmount | number | Amount 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
}
}