Set the org's auto-recharge policy
Saves the org's auto-recharge settings and returns them. Turning it on needs a default saved card, an amount from $25 to $500, and a threshold of 0 or more.
Required permission
Requires the billing.manage permission. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
orl billing auto-recharge update --amount-cents <amount-cents> --enabled --threshold-cents <threshold-cents>apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
orgId*stringapplication/json- body
enabled*booleanWhen on, the balance is topped up automatically below the threshold.
thresholdCents*integerRecharge fires when available balance drops below this. For an org subject to auto-stop, a value under the $0.50 auto-stop floor acts as the floor, so a recharge is attempted before workloads are stopped. The attempt is still subject to the amount bounds and the monthly spend limit.
amountCents*integerAmount charged per auto-recharge, in cents. When enabled is true it must sit within the deposit bounds, $25 to $500; a stored amount under the $25 floor is never charged. Ignored while enabled is false.
Saved settings
application/json- response
enabled*booleanWhen on, the balance is topped up automatically below the threshold.
thresholdCents*integerRecharge fires when available balance drops below this. For an org subject to auto-stop, a value under the $0.50 auto-stop floor acts as the floor, so a recharge is attempted before workloads are stopped. The attempt is still subject to the amount bounds and the monthly spend limit.
amountCents*integerAmount charged per auto-recharge, in cents. When enabled is true it must sit within the deposit bounds, $25 to $500; a stored amount under the $25 floor is never charged. Ignored while enabled is false.
curl -X PUT 'https://api.openrelay.inc/v1/orgs/string/billing/auto-recharge' \ -H 'Content-Type: application/json' \ -d '{ "enabled": true, "thresholdCents": 0, "amountCents": 0}'{ "enabled": true, "thresholdCents": 0, "amountCents": 0}Read the org's auto-recharge policy GET
Returns the org's auto-recharge settings: whether it is on, the available-balance threshold that triggers a charge, and the amount charged, in cents.
List saved cards (brand/last4/exp only) GET
Returns the org's saved cards (id, brand, last four digits, and expiry month and year) and the id of the default card. Empty when no card is saved.