> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Credit and Payment Terms

Plan: B2B Developer

Lesson 7 of 18 · 15 min

## Introduction

A capability of B2B Edition is to set individualized credit restrictions and payment terms per company, and it's useful to be able to inspect these company details from a storefront perspective.

The GraphQL queries explained here require only a valid Bearer token after a `login` operation and will return the correct details for the corresponding company.

## Fetching Credit Configuration

The `companyCreditConfig` query can be used to fetch the details of the credit limit or hold applied to the current user's company.

### Example Query and Response:

#### Query

```graphql showLineNumbers={false}
query GetCreditConfig {
    companyCreditConfig {
        creditEnabled
        creditCurrency
        availableCredit
        limitPurchases
        creditHold
    }
}
```

#### Response

```json showLineNumbers={false}
{
    "data": {
        "companyCreditConfig": {
            "creditEnabled": true,
            "creditCurrency": "USD",
            "availableCredit": 5000.0,
            "limitPurchases": true,
            "creditHold": true
        }
    }
}
```

* `availableCredit` contains the dollar amount of the company's limit for PO payment on an order.
* When `limitPurchases` is TRUE, the PO payment method will be disabled for any orders exceeding `availableCredit`.
* When `creditHold` is TRUE, no transactions except invoice payments will be allowed for any of the company's users.

> **Info**
>
> Note that the available credit value for a company only affects the maximum amount allowed in a single order. Existing orders and open invoices will not affect the `availableCredit` value returned or the user's checkout experience for lower amounts.

## Fetching Payment Terms

The `companyPaymentTerms` query can be used to fetch details of a company's payment terms.

### Example Query and Response:

#### Query

```graphql showLineNumbers={false}
query GetPaymentTerms(
    $companyId: Int!
) {
    companyPaymentTerms(
        companyId: $companyId
    ) {
        isEnabled
        paymentTerms
    }
}
```

#### Response

```json showLineNumbers={false}
{
    "data": {
        "companyPaymentTerms": {
            "isEnabled": false,
            "paymentTerms": 15
        }
    }
}
```

* `isEnabled` indicates whether custom payment terms are set for the company. If FALSE, this means the store's default payment terms will apply.
* If custom terms are set for the company, `paymentTerms` will return that value. If not, it will return the store's default terms.

A value of 30 for `paymentTerms`, for example, indicates Net 30 terms, meaning that the company's invoices will be due 30 days after they are created.