---
title: "Check access by usage key"
description: "The access check for an app that knows the customer only by a usage key."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/credits/check-access-by-usage-key"
---
# Check access by usage key

> The access check for an app that knows the customer only by a usage key.

<api-operation method="GET" path="/v1/businesses/{biz}/access">
<template v-slot:docs="">

Same answer as `GET …/customers/{cus}/access`.

## Path parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        biz
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The business's id (biz_…).
    </td>
  </tr>
</tbody>
</table>

## Query parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        customer_key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      A usage key of the customer.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        meter
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      The meter the call will use.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        estimate
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      The estimated cost in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        scope[<property>]
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      A usage property value, for scoped spend limits. Up to 10.
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type; always <code>
        access_check
      </code>
      
      . One of <code>
        access_check
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        allowed
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      The access check's allowed.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        code
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The access check's code. One of <code>
        ok
      </code>
      
      , <code>
        insufficient_credit
      </code>
      
      , <code>
        spend_limit_reached
      </code>
      
      , <code>
        in_flight_limit
      </code>
      
      , <code>
        no_subscription
      </code>
      
      , <code>
        not_entitled
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        message
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      A sentence for your logs.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        customer
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      cus_…
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        meter
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The meter's id.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        currency
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      ISO 4217.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        available_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Balance plus the overdraft limit. Can be negative.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        available_units
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The access check's available units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        balance
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The access check's balance.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        on_exhausted
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The access check's on exhausted.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        usage_this_period
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The access check's usage this period.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        cost_this_period_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Rated usage of the meter this period.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limits
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      Spend limits checked. When the code is spend_limit_reached, only the tightest refusing limit.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        entitlement
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The access check's entitlement.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        renews_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the customer's plan credits next renew. Null = no plan credits renew.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        as_of
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      The access check's as of.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      The answer.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        400
      </code>
    </td>
    
    <td>
      <code>
        customer_key
      </code>
      
       is missing, or a parameter is not correct.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        404
      </code>
    </td>
    
    <td>
      No customer has this usage key, or no such meter.
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/access?customer_key=Customer%20key" \
  -H "Authorization: Bearer $TMBILLING_API_KEY"
```

</template>

<template v-slot:response="">
<code-group>

```json [200 OK]
{
  "object": "access_check",
  "allowed": false,
  "code": "ok",
  "message": "Requested by the customer.",
  "customer": "cus_XXXXXXXXXXXX01",
  "meter": "Meter",
  "currency": "USD",
  "available_minor": 2900,
  "available_units": [
    {
      "unit": "seat",
      "units": 1
    }
  ],
  "balance": {
    "grants_minor": 2900,
    "unbilled_usage_minor": 2900,
    "open_holds_minor": 2900,
    "overdraft_limit_minor": 2900
  },
  "on_exhausted": {
    "policy": "block",
    "source": "business_blocking_off"
  },
  "usage_this_period": {
    "quantity": "Quantity"
  },
  "cost_this_period_minor": 2900,
  "limits": [
    {
      "id": "slim_XXXXXXXXXXXX01",
      "limit": "Limit",
      "scope": "customer",
      "property_key": "Property key",
      "property_value": "Property value",
      "interval": "day"
    }
  ],
  "entitlement": {
    "feature": "feat_XXXXXXXXXXXX01",
    "value": "West",
    "used": "Used",
    "resets_at": "2026-03-14T09:30:00Z"
  },
  "renews_at": "2026-04-14T09:30:00Z",
  "as_of": "2026-03-14T09:30:00Z"
}
```

```json [400 Bad Request]
{
  "error": {
    "type": "invalid_request_error",
    "message": "customer_key is missing, or a parameter is not correct."
  }
}
```

```json [404 Not Found]
{
  "error": {
    "type": "invalid_request_error",
    "message": "No customer has this usage key, or no such meter."
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
