Skip to content

Get automatic top-up settings

GET
/billing/autotopup
curl --request GET \
--url https://api.sloose.com/billing/autotopup \
--header 'Authorization: Bearer <token>'

Threshold, monthly cap, chosen pack, what has been spent this month, and why it is paused if it is.

Current settings.

Media typeapplication/json
object
enabled
required
boolean
threshold
required

Top up when the available balance falls below this.

number | null
monthlyCapCents
required

Never spend more than this in a calendar month.

number | null
packKey
required
string | null
spentCentsThisMonth
required
number
spentMonth
required
string | null
pausedReason
required

Why automatic top-up stopped — a failed charge, or the monthly cap. Saving settings clears it.

string | null
Examplegenerated
{
"enabled": true,
"threshold": 1,
"monthlyCapCents": 1,
"packKey": "example",
"spentCentsThisMonth": 1,
"spentMonth": "example",
"pausedReason": "example"
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The bearer’s role is too low, or it was issued for a different org.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

This org is a sandbox. Billing is managed on its production org.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: SANDBOX_ORG
key
additional properties
Example
{
"code": "SANDBOX_ORG"
}