Skip to main content

Get customer by phone number

GET 

/api/v1/customers/by-phone/:phoneNumber

This endpoint retrieves customer information by phone number. Useful for customer lookup during checkout or support operations.

Authentication: Requires a Private API Key (sk_*) passed in the X-API-Key header.

Phone Number Format: Must be in E.164 format with country code (e.g., +1234567890)

Use Cases:

  • Customer lookup during phone-based checkout flows
  • Retrieving customer purchase history for support
  • Customer verification before order placement
  • CRM integration and customer data synchronization

Error Scenarios:

  • 404 NOT FOUND: Customer with this phone number doesn't exist (Error code: CUSTOMER_NOT_FOUND)
  • 400 BAD REQUEST: Invalid phone number format (Error code: INVALID_PHONE_FORMAT)
  • 401 UNAUTHORIZED: Invalid or missing API key (Error code: INVALID_API_KEY)
  • 403 FORBIDDEN: API key doesn't have access to this store (Error code: NO_STORE_ACCESS)

Request​

Responses​

Customer found and returned successfully