Retreive Company object custom metafield using graphql

Topic summary

A developer is implementing a credit limit feature for a B2B Shopify store using GraphQL in a custom cart and checkout validation app.

Initial Problem:

  • Encountered errors when trying to retrieve Company object custom metafields
  • GraphQL validation failed with “Cannot query field ‘company’ on type ‘Input’”
  • Images show schema.graphql file modifications

Solution Provided:
The correct GraphQL query path is through buyerIdentity.purchasingCompany.company.metafield, not directly accessing company on the Input type. A working query example was shared retrieving the “credit_remaining_limit” metafield from the “b2b” namespace.

Evolving Requirements:
The developer wants to:

  • Block customers at checkout (not cart) when credit limit is insufficient
  • Allow orders only if customers select “net payment” option
  • Permit credit card payments when credit limit is exceeded
  • Hide the “choose payment later” option based on order total using Payment Customization API
  • Accept split payments (credit limit + credit card)

Current Status:
Split payment functionality is not currently supported. The discussion remains open regarding how to properly target and hide specific payment methods like “Net-7, Net-15, choose payment later” using payment customization.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

Hi @Eric-HAN

Can you let me know if the validation can be done on checkout page instead of cart page(https://shopify.dev/docs/api/functions/reference/cart-checkout-validation/graphql) . At present I am blocking the customer on the cart page if their credit limit is less than order total, I want them to proceed to checkout but block them only if they select net payment option in the checkout. And allow them to place order if they select credit card payment option.

Thanks

Khasim