Skip to content

Get prepaid automatic-recharge state

GET
/v1/account/auto-recharge
curl --request GET \
--url https://dev-api.infiniteaudience.ai/v1/account/auto-recharge \
--header 'Authorization: Bearer <token>'

Returns the prepaid balance threshold configuration and a verified Stripe hosted-invoice URL only when customer action is required. Self-billed prepaid org owners only. Requires ‘account’ scope.

Automatic-recharge state

Media typeapplication/json
object
billing_account_id
required
string
auto_recharge
required
object
configured
required
boolean
enabled
required
boolean
threshold_cents
required
integer | null
>= 500
recharge_to_cents
required
integer | null
>= 1500 <= 5000000
configuration_request_id
required
string | null
payment_status
required
string
Allowed values: none pending action_required paid failed
last_payment_attempt_id
required
string | null
stripe_invoice_id
required
string | null
stripe_payment_intent_id
required
string | null
last_error_code
required
string | null
updated_at
required
string | null format: date-time
pending_change
required
One of:
object
request_id
required
string
enabled
required
boolean
threshold_cents
required
integer
>= 500
recharge_to_cents
required
integer
>= 1500 <= 5000000
status
required
string
Allowed values: provisioning failed
last_error_code
required
string | null
created_at
required
string format: date-time
updated_at
required
string format: date-time
key
additional properties
any
action_url
required
string | null format: uri
Example
{
"auto_recharge": {
"payment_status": "none",
"pending_change": {
"status": "provisioning"
}
}
}

Invalid request — malformed body, missing required attribute, or failed validation. See error and message for details.

Media typeapplication/json
object
error
required

Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.

string
message

Human-readable explanation of the error.

string
code

Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.

string
request_id

Opaque support/debug identifier when available.

string
key
additional properties
any
Examples
Examplevalidation_error
{
"error": "Bad Request",
"code": "MISSING_SEGMENTS",
"message": "segment_ids is required for filter audiences."
}

Missing or invalid Bearer token. Obtain one via POST /v1/auth/token. When a token was supplied but rejected, code distinguishes TOKEN_EXPIRED (the token’s lifetime has passed — request a new one via POST /v1/auth/token and retry) from TOKEN_INVALID (malformed or revoked — re-authenticate).

Media typeapplication/json
object
error
required

Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.

string
message

Human-readable explanation of the error.

string
code

Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.

string
request_id

Opaque support/debug identifier when available.

string
key
additional properties
any
Examples
{
"error": "Unauthorized: Missing or invalid Authorization header"
}

Token is valid but lacks the required scope for this endpoint. Check the endpoint description for the required scope (discovery, purchase, or account).

Media typeapplication/json
object
error
required

Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.

string
message

Human-readable explanation of the error.

string
code

Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.

string
request_id

Opaque support/debug identifier when available.

string
key
additional properties
any
Examples
Examplemissing_scope
{
"error": "SCOPE_REQUIRED",
"message": "This endpoint requires the purchase scope."
}

Resource state conflicts with the request. For upload analysis this includes FILE_NOT_YET_UPLOADED.

Media typeapplication/json
object
error
required

Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.

string
message

Human-readable explanation of the error.

string
code

Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.

string
request_id

Opaque support/debug identifier when available.

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

An upstream billing provider rejected or could not complete the operation.

Media typeapplication/json
object
error
required

Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.

string
message

Human-readable explanation of the error.

string
code

Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.

string
request_id

Opaque support/debug identifier when available.

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