Billing

Set the org's auto-recharge policy

Changed on

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.

Requires the billing.manage permission. See Permissions for the roles and API key permissions that include it.

put/v1/orgs/{orgId}/billing/auto-recharge

Request

  • Base URL
    https://api.openrelay.inc
  • URL
    https://api.openrelay.inc/v1/orgs/{orgId}/billing/auto-recharge
  • Auth
    HTTP bearer

Path parameters

orgIdstring required

Request body

amountCentsinteger required

Amount 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.

enabledboolean required

When on, the balance is topped up automatically below the threshold.

thresholdCentsinteger required

Recharge 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.

Response

Saved settings

amountCentsinteger required

Amount 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.

enabledboolean required

When on, the balance is topped up automatically below the threshold.

thresholdCentsinteger required

Recharge 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.

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status