Skip to Content
Docs

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:

  1. Starts with a + prefix to mark the number as international.
  2. Includes the country code immediately after + (for example, 1 for the US, 44 for the UK, or 234 for Nigeria).
  3. Uses only spaces for digit grouping, with no dashes, parentheses, dots, or other separators.

Examples

These numbers show the recommended format and common variations.

FormatExampleRecommended
US number+1 212 555 0198Yes
UK number+44 20 7946 0958Yes
German number+49 30 1234 5678Yes
Missing + prefix1 212 555 0198No
Using dashes+1-212-555-0198No
Using parentheses+1 (212) 555 0198No
Using dots+1.212.555.0198No
Missing country code+212 555 0198, which reads as a number in Morocco (+212)No

E.164 numbers can contain at most 15 digits, including the country code. The + prefix doesn't count as a digit.

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.
Was this page helpful?