Billing

Setup drawdown billing

Changed on

Set up or update drawdown billing for the authenticated developer

post/api/v1/billing/drawdown

Request

  • Base URL
    https://staging.api.rye.com
  • URL
    https://staging.api.rye.com/api/v1/billing/drawdown
  • Auth
    API key in header Authorization

Request body

chargeAutomaticallyboolean

Whether to automatically charge the invoice when created. Defaults to true if not specified.

minBalanceSubunitsinteger required

Minimum balance threshold in smallest currency unit (e.g. cents). A top-up is triggered when balance falls below this value.

targetBalanceSubunitsinteger required

Target balance in smallest currency unit (e.g. cents). When balance drops below minBalanceSubunits, a top-up invoice is created to replenish to this amount.

Example request

{
  "chargeAutomatically": true,
  "minBalanceSubunits": 200000,
  "targetBalanceSubunits": 1000000
}

Response

Updated billing configuration

Example response

{
  "drawdown": {
    "balance": {
      "currencyCode": "USD",
      "amountSubunits": 1500
    },
    "config": {
      "currency": "USD",
      "minBalanceSubunits": 200000,
      "targetBalanceSubunits": 1000000
    }
  }
}

Changes