Retrieve Credit Balance
GET https://infrahub-api.nexgencloud.com/v1/billing/user-credit/credit
Retrieves the current credit balance for your organization. Maintaining a positive credit balance ensures that you can create resources. However, if the credit balance falls below $0, all associated resources will be temporarily suspended until a payment is made.
Parameters
No parameters.
Attributes
message string
A message describing the status of the request to retrieve your credit balance.
status boolean
Indicates the status of the request to retrieve your credit balance, where true
indicates success, while false
indicates error.
data object
An object containing information about your organization's credit balance, including the threshold at which resource access will be suspended, and the current status of your resource access.
Show child attributes
credit number
Your current credit balance in dollars.
threshold number
The balance at which resource access will be suspended, in this case $0.
can_create_instance boolean
The status of your ability to create virtual machine resources, where true
indicates you have access, and false
indicates your balance is below the threshold
value.
curl -X GET "https://infrahub-api.nexgencloud.com/v1/billing/user-credit/credit" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
{
"message": "Success",
"status": true,
"data": {
"credit": 10.0,
"threshold": 0.0,
"can_create_instance": true
}
}
Returns
The response indicates the status of the request to retrieve the credit balance for your organization, where true
indicates success, and false
indicates error. The data
object returned by this API includes your credit balance in dollars, the threshold
specifying the minimum credit balance that must be maintained to create resources, and the can_create_instance
field indicating the current status of your ability to create resources.