Phone Number Validations

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}]}

523 Views
Message 1 of 4
Report
3 REPLIES 3
Square Champion

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.

Chip A.
Square Expert & Innovator and member of the Square Champions group. (But NOT a Square employee, just a seller like you)

Was my post helpful? Take a moment to mark it as a solution. Marked solutions help other sellers find possible resolutions to similar problems. Also, if you find your solution elsewhere (say, through Support), it is helpful to come back to your post and tell us about it, then mark that as a Solution. Solutions are what this Community is all about!
487 Views
Message 2 of 4
Report
Square Champion

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.

Chip A.
Square Expert & Innovator and member of the Square Champions group. (But NOT a Square employee, just a seller like you)

Was my post helpful? Take a moment to mark it as a solution. Marked solutions help other sellers find possible resolutions to similar problems. Also, if you find your solution elsewhere (say, through Support), it is helpful to come back to your post and tell us about it, then mark that as a Solution. Solutions are what this Community is all about!
486 Views
Message 3 of 4
Report

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?

435 Views
Message 4 of 4
Report