Public APIs for Credit Limit
Use the Credit limit API for Net Terms to read each customer’s credit figures from your own systems. The figures cover customer, tag and Logged-in customers rules. Limits set only on a company or location are not included. Sync Net Terms balances with an ERP, an accounting tool or a dashboard.
The Credit endpoints are read-only and v2. They return figures only: no customer name, email or notes.
Authentication
Section titled “Authentication”| Method | Where | Value |
|---|---|---|
| Header | X-API-Key |
Your v2 API key, sk_live_... |
| Header | X-Shop-Domain |
Your store, for example your-store.myshopify.com |
Both headers are required on every request. The key needs the scope credit:read, which is the Credit Limit module set to Read (or Read & Edit, or All modules).
Base URL: https://solution-public-api.bss-b2b.solutions
List credit balances
Section titled “List credit balances”GET /api/v2/credit/customers
Returns customers in ascending customer ID order. It lists the same customers as the Customer balances table in the app.
Query parameters
Section titled “Query parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
limit |
integer | 100 |
Customers per page. Min 1, max 250. |
cursor |
string | - | The next_cursor of the previous page. |
customer_id |
string | - | Digits only. Returns just this customer. When the customer is not listed, items is empty. |
Example:
curl "https://solution-public-api.bss-b2b.solutions/api/v2/credit/customers?limit=50" \ -H "X-API-Key: YOUR_API_KEY" \ -H "X-Shop-Domain: your-shop.myshopify.com"Response
Section titled “Response”{ "success": true, "status": "success", "data": { "items": [ { "customer_id": "8123456789", "limit": "5000.00", "owed": "1200.00", "pending": "300.00", "available": "3500.00", "currency_code": "USD", "mode": "warn", "on_hold": false, "status": "ok", "as_of": "2026-10-25T09:30:00.000Z" } ], "next_cursor": null }, "meta": { "timestamp": "2026-10-25T09:30:00.000Z", "version": "v2", "request_id": "fbdc5205-5f7e-45d4-a6e2-dd283106c2b8", "rate_limit": { "cost": 10, "limit": 600, "remaining": 590, "restore_rate": 10 } }}The values above are an example. meta.rate_limit shows the cost of the call and the points left, see Rate limits.
| Field | Description |
|---|---|
customer_id |
Shopify customer ID. |
limit |
Credit limit in force. null when no customer, tag or Logged-in customers rule applies. |
owed |
Unpaid orders, plus the opening balance and manual adjustments. |
pending |
Draft orders reserved and not yet placed. |
available |
limit minus pending minus owed. Negative when over the limit. null when there is no limit. |
currency_code |
Currency of the rule. null when no customer, tag or Logged-in customers rule applies. |
mode |
The rule’s mode: warn or block. null when no customer, tag or Logged-in customers rule applies. |
on_hold |
true when the customer is on hold. |
status |
One of on_hold, over_limit, near_limit, no_limit, ok. |
as_of |
When the figures were read (ISO 8601, UTC). |
Amounts are strings.
Pagination
Section titled “Pagination”- Send the first request without
cursor. - If
data.next_cursoris notnull, send it ascursorin the next request. - Stop when
next_cursorisnull.
Treat cursors as opaque strings.
Get one customer’s credit
Section titled “Get one customer’s credit”GET /api/v2/credit/customers/{customerId}
customerId is the Shopify customer ID, digits only. The response has the same fields as one item above, in data.
curl "https://solution-public-api.bss-b2b.solutions/api/v2/credit/customers/8123456789" \ -H "X-API-Key: YOUR_API_KEY" \ -H "X-Shop-Domain: your-shop.myshopify.com"A customer who does not appear in Customer balances returns 404 RESOURCE_NOT_FOUND.
What do the figures mean?
Section titled “What do the figures mean?”Each field matches a column or card the merchant sees in Customer balances and on the customer page. The Credit limit glossary defines every term once.
| API field | The merchant sees | Notes |
|---|---|---|
limit |
Limit | The limit in force. While a temporary limit runs, it shows the temporary limit. |
owed |
Owed | Unpaid orders plus the opening balance and manual adjustments. Never below 0. |
pending |
Pending drafts | Pay later draft orders waiting for the merchant. |
available |
Available | limit - pending - owed. It can be negative. |
mode |
When over limit | warn is Warn only. block is Block Pay later. |
on_hold |
On hold | true while the customer is on hold. |
status |
Status | See the status values below. The API has no overdue status. |
as_of |
Not shown | The time of your request. |
limit reflects customer, tag and Logged-in customers rules. A limit set only on a company or a company location is not shown here, so a buyer under it shows no_limit. Read company limits in the app, on Company balances.
Amounts are strings in the rule’s currency, which is the store currency when the rule was created. To read these numbers in the app, see the Customer balances guide.
Status values
Section titled “Status values”status is the first value in this list that applies:
| Order | status |
When it applies |
|---|---|---|
| 1 | on_hold |
The customer is on hold. |
| 2 | over_limit |
available is below 0. |
| 3 | near_limit |
pending plus owed is at least 90% of limit, and the customer is not over the limit. |
| 4 | no_limit |
limit is null, including a buyer who is limited only by a company or location rule. |
| 5 | ok |
None of the above. |
How fresh is the data?
Section titled “How fresh is the data?”Each response is built when you call it, from the balance figures of the customer, tag and Logged-in customers rules. as_of is the time of your request, not the time of the last order or payment.
The figures move after Credit limit receives order and payment updates from Shopify. That usually takes a minute or less. Every day at 01:40 UTC all tracked orders are read again from Shopify, and Recalculate in the app starts the same refresh on demand.
A list request reads the balances of the whole store, so do not sync more often than every few minutes. Each request spends points from the same budget as the other Public API v2 endpoints, see Rate limit.
Which customers are returned?
Section titled “Which customers are returned?”The list matches Customer balances. A customer is listed when the store has a ledger record for that customer, a rule for that customer, or Net Terms orders not yet added to the ledger. Tag rules and Logged-in customers rules reach a customer once that customer has an order in the ledger.
A customer who is not listed returns 404 RESOURCE_NOT_FOUND on the single endpoint.
Rate limit
Section titled “Rate limit”Each store has a budget of 600 points that refills at 10 points a second, shared by all its keys and by the other Public API v2 endpoints. Each GET costs 10 points. When the budget is short, the request is refused with HTTP 429 and a Retry-After header. See Rate limits.
Error codes
Section titled “Error codes”Errors use this body:
{ "success": false, "status": "error", "errors": { "code": "ACCESS_KEY_INVALID", "message": "Invalid access key" }, "meta": { "timestamp": "2026-10-25T09:30:00.000Z", "version": "v2", "request_id": "..." }}The values above are an example.
| Code | HTTP | Cause | Fix |
|---|---|---|---|
DOMAIN_MISSING |
400 | The X-Shop-Domain header is missing |
Add X-Shop-Domain: your-shop.myshopify.com |
ACCESS_KEY_MISSING |
401 | The X-API-Key header is missing |
Add the header with your v2 key |
ACCESS_KEY_INVALID |
401 | Unknown key, a key of another store, a v1 key, or an unknown domain | Create a v2 key in the same store and check the domain |
ACCESS_KEY_REVOKED |
401 | The key was revoked | Create a new key |
AUTHORIZATION_DENIED |
403 | The key lacks the scope credit:read (details names it), or the request comes from an IP outside the key’s allowed IPs |
Set Credit Limit to Read on the key and check the allowed IPs |
AUTHORIZATION_DENIED |
403 | The store does not qualify: the plan is not Platinum or Enterprise, Net Terms is missing, or the Credit limit add-on is not active. When the add-on ends, the API returns this code. | Check your plan and the add-on in Pricing plans |
RESOURCE_NOT_FOUND |
404 | Customer not in Customer balances | Check the customer ID |
VALIDATION_ERROR |
422 | limit, cursor, customer_id or the customer ID in the path is not valid |
Fix the parameter: limit 1 to 250, the others digits only |
RATE_LIMIT_EXCEEDED |
429 | The point budget is spent, too many requests run at once, or too many failed key attempts | Wait for the Retry-After seconds |
SERVICE_UNAVAILABLE |
503 | The service cannot read the shop data right now | Retry after a short delay |
Next: Credit limit FAQ for common questions, and the Public APIs overview for other endpoints.
- Public APIs for Custom Pricing (CP)Programmatically manage Custom Pricing rules via REST API, create, retrieve, update, delete rules, and calculate prices for specific customers.
- Public APIs for Price List (PL)Programmatically manage Price List per Customer rules, create rules with per-product pricing for individual customers, retrieve applied prices, and manage customer/product data.
- Public APIs for Registration form (RF)Programmatically manage wholesale registration workflows, retrieve form schemas, create registrants, filter applicants, and manage approval status.
- Public APIs for UploadingThese public endpoints allow you to upload pricing and discount rules from an external system directly into your Shopify store using BSS B2B Solution.