Authenticate the B2B buyer using the Customer Account API (Storefront API) to obtain a customer access token associated with a company contact.
When creating or updating the cart, call cartBuyerIdentityUpdate with the customerAccessToken; Shopify resolves the associated company and active catalog.
Verify that cart.buyerIdentity.purchasingCompany is populated in the response, confirming B2B context was resolved; it will include company and companyLocation.
If a buyer belongs to multiple company locations, the Storefront API may require selecting a specific location; consult current docs for how location selection is surfaced.
Verify that cart line item prices reflect the B2B price list prices, not DTC prices, by comparing cart.lines.cost.amountPerQuantity values.
Complete checkout via the Storefront API checkout URL with the buyer authenticated; the resulting order will be associated with the company location.
Known gotchas
A customer must be a confirmed company contact with the appropriate role to trigger B2B pricing; simply being an authenticated customer is not sufficient.
B2B carts and DTC carts cannot coexist for the same session in some configurations; consult current Shopify docs on how to handle customers who are both B2B contacts and DTC buyers.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp