---
title: "List a customer's credit grants"
canonical_url: "https://twominutebilling.com/help/developers/api-reference/credits/list-a-customer-s-credit-grants"
---
# List a customer's credit grants

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

## 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>
  
  <tr>
    <td>
      <code>
        cus
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The customer's id (cus_…).
    </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>
        limit
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Page size, 1 to 1000. Default 50.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        starting_after
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      The <code>
        next_cursor
      </code>
      
       of the previous page.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Only grants in this status.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        category
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Only grants in this category.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        currency
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Only grants in this currency (ISO 4217).
    </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>
        list
      </code>
      
      . One of <code>
        list
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The rows on this page.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type; always <code>
        credit_grant
      </code>
      
      . One of <code>
        credit_grant
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      cgr_…
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.customer
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      cus_…
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.currency
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      ISO 4217.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.unit
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The credit unit's id. Null = money.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.amount
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Units at grant, in the unit's smallest step (money: minor units).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.amount_decimal
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        amount
      </code>
      
       in whole units, as a decimal string.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.face_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      The money value at grant. Fixed for life.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.cost_basis_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Paid: the net money received for it. Promotional: 0.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.category
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The credit grant's category. One of <code>
        paid
      </code>
      
      , <code>
        promotional
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.priority
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      0 to 100. Lower draws first.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.effective_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      The effective time (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.expires_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the credit grant expires (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.applicability
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      Which invoice lines the grant may pay: <code>
        {"kind":"metered"}
      </code>
      
       (every usage line, the default), <code>
        {"kind":"prices","prices":["…"]}
      </code>
      
      , or <code>
        {"kind":"meters","meters":["…"]}
      </code>
      
       (meter keys: the usage lines of every price that bills the meter when the grant draws). A <code>
        metered
      </code>
      
       grant takes the business's <code>
        credit_config.credit_scope
      </code>
      
       when one is set.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.source
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Where the credit grant comes from. One of <code>
        purchase
      </code>
      
      , <code>
        plan_cycle
      </code>
      
      , <code>
        manual
      </code>
      
      , <code>
        restore
      </code>
      
      , <code>
        auto_top_up
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.tax_treatment
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The credit grant's tax treatment. One of <code>
        taxed_at_purchase
      </code>
      
      , <code>
        taxed_at_use
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.on_exhausted
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      What happens when the credit is used up, for a business with blocking on. Null = not set here. One of <code>
        block
      </code>
      
      , <code>
        bill
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The credit grant's status. One of <code>
        pending
      </code>
      
      , <code>
        active
      </code>
      
      , <code>
        expired
      </code>
      
      , <code>
        voided
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.invoice
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The invoice that sold it (paid grants).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.restored_from
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The expired grant this one restores.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.auto_top_up_run
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      atur_…: the automatic top-up run that sold it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.remaining
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      What is left: the sum of the grant's movements.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.metadata
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      Key-value pairs you attach to the credit grant.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.created_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the credit grant was created (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.updated_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the credit grant was last changed (ISO-8601 UTC).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.resource_version
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      A number that goes up on every change.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        has_more
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Whether more rows exist after this page.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        next_cursor
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Send as <code>
        starting_after
      </code>
      
       for the next page.
    </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 customer's credit grants, newest first.
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/customers/cus_XXXXXXXXXXXX01/credit_grants?limit=10" \
  -H "Authorization: Bearer $TMBILLING_API_KEY"
```

</template>

<template v-slot:response="">

```json [200 OK]
{
  "object": "list",
  "data": [
    {
      "object": "credit_grant",
      "id": "cgr_XXXXXXXXXXXX01",
      "customer": "cus_XXXXXXXXXXXX01",
      "currency": "USD",
      "amount": 2900,
      "face_minor": 2900,
      "category": "paid",
      "status": "active",
      "remaining": {
        "units": 1,
        "units_decimal": "Units decimal",
        "face_minor": 2900,
        "cost_minor": 2900
      }
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

</template>
</api-operation>


## Sitemap

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