# Credits and billing

How prepaid reseller credits work and how an order moves from charged to provisioned.

Your reseller account runs on a prepaid credit balance held in your account's currency. Ordering domains deducts from it. Check your balance before you order so a call does not fail for insufficient funds.

## Read your balance

`GET /billing/credits` returns your current balance as a string amount, such as `"982.00"`.

<CodeGroup>
```bash cURL
# Compute TOKEN as in /guides/authentication, then:
curl -s "$ENDPOINT/billing/credits" \
  -H "username: $EMAIL" \
  -H "token: $TOKEN"
```

```php PHP
<?php
// $endpoint, $email, $token computed as in /guides/authentication
$curl = curl_init("{$endpoint}/billing/credits");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    "username: {$email}",
    "token: {$token}",
]);
echo curl_exec($curl);
```

```python Python
# token(), EMAIL, ENDPOINT as in /guides/authentication
resp = requests.get(f"{ENDPOINT}/billing/credits",
                    headers={"username": EMAIL, "token": token()})
print(resp.json())
```

```javascript Node.js
// token(), EMAIL, ENDPOINT as in /guides/authentication
const res = await fetch(`${ENDPOINT}/billing/credits`, {
  headers: { username: EMAIL, token: token() },
});
console.log(await res.json());
```

```go Go
// token(), email, endpoint as in /guides/authentication
req, _ := http.NewRequest("GET", endpoint+"/billing/credits", nil)
req.Header.Set("username", email)
req.Header.Set("token", token())
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
```
</CodeGroup>

Response:

```json
"982.00"
```

<Note>
  The value is a bare number in your account's currency, with no currency symbol — the currency your reseller account is configured in (for example USD, KES, or TZS). Domain [pricing](/api-reference/pricing) is charged in the same currency, so no conversion is needed to compare a price against your balance.
</Note>

## What deducts credits

Ordering calls charge your balance:

- `POST /order/domains/register`
- `POST /order/domains/transfer`
- `POST /order/domains/renew`

Use [pricing](/api-reference/pricing) to check the cost of a register, renew, or transfer before you order, and read your [balance](/api-reference/account) to confirm you have enough.

## Order lifecycle

An order does not become a manageable domain instantly. The stages are:

1. **Order placed.** The order call returns `"success"` and your credits are deducted.
2. **Order pending.** The domain is not yet in your reseller account. Management endpoints (information, contacts, nameservers, and so on) return `403 {"error":"Provided domain has not been found in reseller account"}`, and sync returns a `500` registrar error.
3. **Order active.** Once the account and order are active, the domain is provisioned to your reseller account and the management endpoints start returning data.

<Note>
  Verify your account email before ordering. Until your email is verified, domain orders stay pending and will not provision. See [Order and activate reseller access](/guides/ordering-and-activation).
</Note>

Because provisioning is asynchronous, a `403` "not found in reseller account" right after ordering means the order is still pending, not that the order failed. Poll the domain's [information](/api-reference/information) endpoint until it resolves.
