companyCreate - Percentage is invalid

I’m using the following input with companyCreate but getting Percentage is invalid, I don’t see how its wrong? What am I missing?

Input:

{
  "input": {
    "company": {
      "name": "Example Company Ltd",
      "externalId": "EX0001"
    },
    "companyLocation": {
      "name": "Example Company Ltd HQ",
      "shippingAddress": {
        "address1": "123 Example Street",
        "address2": "Suite 456",
        "city": "Example City",
        "countryCode": "GB",
        "recipient": "John Doe",
        "zip": "AB1 2CD"
      },
      "billingAddress": {
        "address1": "123 Example Street",
        "address2": "Suite 456",
        "city": "Example City",
        "countryCode": "GB",
        "firstName": "Example Company Ltd",
        "recipient": "John Doe",
        "zip": "AB1 2CD"
      },
      "billingSameAsShipping": true,
      "buyerExperienceConfiguration": {
        "deposit": {
          "percentage": 100
        },
        "editableShippingAddress": true
      }
    }
  }
}

Response:

{
  "data": {
    "companyCreate": {
      "company": null,
      "userErrors": [
        {
          "field": [
            "input",
            "companyLocation",
            "buyerExperienceConfiguration",
            "deposit",
            "percentage"
          ],
          "message": "Percentage is invalid",
          "code": "INVALID"
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 18,
      "actualQueryCost": 10,
      "throttleStatus": {
        "maximumAvailable": 2000,
        "currentlyAvailable": 1990,
        "restoreRate": 100
      }
    }
  }
}

Mutation reference - companyCreate - GraphQL Admin

Also worth noting that the dev assistant gave me the same similar structure, I don’t want to give it a thumbs down incase this is in fact correct and theres a bug on Shopify’s side.

mutation CompanyCreate {
  companyCreate(input: {
    company: {
      name: "Example Company"
    },
    companyLocation: {
      name: "Main Location",
      shippingAddress: {
        firstName: "John",
        lastName: "Doe",
        address1: "123 Main St",
        city: "Metropolis",
        zoneCode: "CA",
        zip: "12345",
        countryCode: US
      },
      billingSameAsShipping: true,
      buyerExperienceConfiguration: {
        deposit: {
          percentage: 100
        }
      }
    }
  }) {
    company {
      id
      name
      locations(first: 1) {
        edges {
          node {
            id
            name
          }
        }
      }
    }
    userErrors {
      field
      message
      code
    }
  }
}

Right it seems you can’t actually pass 100, and if you want full payment to be received you should just omit the deposit.percentage. Makes sense, but isn’t clear in the docs at all.

Can they please be updated to mention this?

Hey @Luke - thanks for flagging! I’ll get in touch with some folks internally to look at this. I can’t say for sure at the moment if this is intentional or not, but I do agree that seems like it may just be an omission in the docs. I’ll loop back with you once I have confirmation/can confirm we’ll push a fix to the docs on our end.

Hey @Luke - just following up on this. Can confirm that this is expected behaviour, deposit values do have to be between 1% and 99%. We’ll be updating our docs to reference this though, appreciate you flagging this again. Let me know if I can help out further on this one as always