Is it to be expected that the customer creation validates phone numbers like +17701231234 as invalid? I haven't seen anything in the create customer api docs that says this should be invalid, as it is a standard US number. Is the back end checking that 1231234 is invalid?
2025-08-21T15:05:51.135-04:00 DEBUG 7314 --- [nio-8081-exec-3] c.g.y.p.s.impl.SquarePaymentService : Creating new customer for paymentMethodId 743d1bac-c4b3-4eef-ad0a-1be4fb7940a1
2025-08-21T15:05:55.535-04:00 DEBUG 7314 --- [nio-8081-exec-3] c.g.y.p.s.impl.SquarePaymentService : Calling square to crate new customer {
"idempotency_key" : "743d1bac-c4b3-4eef-ad0a-1be4fb7940a1",
"given_name" : "Jeffrey",
"family_name" : "Sinclair",
"email_address" : "[email protected]",
"address" : {
"country" : "US",
"address_line_1" : "2391 Armand Road",
"locality" : "Atlanta",
"postal_code" : "30324",
"first_name" : "Jeffrey",
"last_name" : "Sinclair",
"administrative_district_level_1" : "GA"
},
"phone_number" : "+17701231234",
"reference_id" : "97f25b92-ae6b-4c2b-8eba-0a3e0430823d"
} for paymentMethodId 743d1bac-c4b3-4eef-ad0a-1be4fb7940a1
2025-08-21T15:05:58.708-04:00 ERROR 7314 --- [nio-8081-exec-3] c.g.y.p.s.PaymentOrchestrationService : Error Body {errors=[{code=INVALID_PHONE_NUMBER, detail=Expected phone_number to be a valid phone number, field=phone_number, category=INVALID_REQUEST_ERROR}]}
Hi there @maloney1.. I took the number you gave above and tried adding a manual customer in my Square Dashboard. Sure enough, it seems to know that there is no 123 exchange in area code 770. Since the dashboard does it, it makes sense and would be expected that the API does it, also.
Also @maloney1 I did a little digging and complete phone number validation tools are readily available that even determine if the number is a cell or land line. So I'm not surprised that Square is also doing this.
Interesting, it's good that this is being done, but I would expect a little better documentation in the API docs around this and what to expect. Also, given this is a test system, maybe different rules for testing, so that obviously dummy / invalid numbers pass through, so testing does not require using a real number?
Square Community
Square Products