Phone number formatting
Format phone numbers for the Pay.com API using ITU E.123 and E.164 international notation.
Format phone numbers sent to the Pay.com API (such as in customer or payout details) using ITU E.123 and E.164 international notation.
Format rules
We recommend formatting every phone number you send to the API so that it:
- Starts with a
+prefix to mark the number as international. - Includes the country code immediately after
+(for example,1for the US,44for the UK, or234for Nigeria). - Uses only spaces for digit grouping, with no dashes, parentheses, dots, or other separators.
Examples
These numbers show the recommended format and common variations.
| Format | Example | Recommended |
|---|---|---|
| US number | +1 212 555 0198 | Yes |
| UK number | +44 20 7946 0958 | Yes |
| German number | +49 30 1234 5678 | Yes |
Missing + prefix | 1 212 555 0198 | No |
| Using dashes | +1-212-555-0198 | No |
| Using parentheses | +1 (212) 555 0198 | No |
| Using dots | +1.212.555.0198 | No |
| Missing country code | +212 555 0198, which reads as a number in Morocco (+212) | No |
How Pay.com handles billing phone numbers
Values in billing_details.phone and shipping.phone must start with a digit
or +, or the API rejects the request with HTTP 400. Pay.com stores
billing_details.phone only when it's a valid phone number for the billing
country or a valid international number. Numbers that fail validation, such as
numbers with the 555 area code (+1 555 123 4567), are dropped without an
error, so features that depend on the phone number (such as
risk rule conditions) won't see them.
Next steps
See how phone numbers fit into requests and their errors.
- Errors: Error response shapes when a request fails validation.
- Create a charge: Accept a payment using the Pay.com API.