The Shopify help pages say that B2B features are available only for Shopify Plus stores. Does this count as a B2B feature? Is this the reason why I don’t get the company name input?
I believe the field you referenced in your screenshot is not the actual company, but just part of the address fields. But from what I can see you cannot access address fields from within the Payment Customization APIs.
In regards to purchasingCompany being null, did you login to your store via an account which is associated to a company in B2B?
Here’s some info explaining purchasingCompany in the docs
You can’t directly access the “Company” name from the shipping address in the input object used in payment customizations via Shopify Functions. Instead, consider capturing that info earlier (via custom fields), or architecting a solution around customer tags or metafields.
You are right @Luke, the field in the checkout was not the same as input.cart.buyerIdentity.purchasingCompany.company.name.
Yet, it turns out that you can actually access the company name via the delivery address. See inside the “deliveryAddress” input in the docs: CartDeliveryGroup
I tried logging in with a B2B associated account, and after that the input.cart.buyerIdentity.purchasingCompany.company.name is finally shown, so indeed, this input is reserved for Shopify Plus stores only.