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.
The companyCreditConfig query can be used to fetch the details of the credit limit or hold applied to the current user’s company.
availableCredit contains the dollar amount of the company’s limit for PO payment on an order.limitPurchases is TRUE, the PO payment method will be disabled for any orders exceeding availableCredit.creditHold is TRUE, no transactions except invoice payments will be allowed for any of the company’s users.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.
The companyPaymentTerms query can be used to fetch details of a company’s payment terms.
isEnabled indicates whether custom payment terms are set for the company. If FALSE, this means the store’s default payment terms will apply.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.