Create a Shopify B2B company, assign payment terms, and set a net-30 due-date schedule via the Admin GraphQL API
domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
In-depth guide
Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.
Steps
Call the companyCreate mutation with a name, externalId (your ERP account ID), and an initial companyLocation including a billingAddress and shippingAddress.
Use the companyAssignCustomerAsContact mutation to link an existing customer record (or create one first with customerCreate) to the company as a contact with the ADMIN role.
Call the companyLocationAssignRoles mutation to grant the contact PURCHASING_ROLE at the location.
Set payment terms by calling the paymentTermsCreate mutation referencing the companyLocationId and a paymentTermsTemplateId — retrieve available templates first with a paymentTermsTemplates query; look for the template with paymentTermsType FIXED and a 30-day net period.
Verify the setup by querying company(id:) with nested fields: locations, contacts, paymentTerms, and catalog to confirm catalog and price list assignment.
When the buyer places an order, the order will automatically carry the payment due date derived from the net-30 terms; monitor via the orders query filtering on paymentStatus.
Known gotchas
Shopify B2B company catalogs and price lists are a separate resource — creating a company does not automatically assign a catalog; you must call companyAssignCatalogs after creating the company.
The paymentTermsTemplates available depend on your Shopify plan; not all net-day options are available on non-Plus plans — verify which templates are returned before hardcoding a template ID.
companyLocationAssignRoles requires the contact to already exist as a company contact; attempting to assign a role before associating the customer will return a user error.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?