API Reference

Complete reference for all public Veriphone API endpoints. Base URL: https://api.veriphone.io

Authentication

All endpoints accept both GET and POST requests. Pass your API key via one of the following methods (checked in this order):

  1. Authorization header (recommended): Authorization: Bearer YOUR_API_KEY
  2. Cookie: key=YOUR_API_KEY
  3. Query parameter: ?key=YOUR_API_KEY

Error Responses

JSON
{
  "status": "error",
  "code": 401,
  "type": "Unauthorized",
  "message": "API key or token required"
}
CodeTypeMeaning
400BadRequest / MissingParameterInvalid or missing input
401UnauthorizedMissing or invalid API key
402PaymentRequiredInsufficient credits
403ForbiddenAccount inactive or access denied
404NotFoundResource not found
500InternalServerErrorServer error

GET POST /v2/verify

The primary phone number validation endpoint. Validates a phone number and returns carrier, line type, and formatting data. Each successful call deducts 1 credit.

If the number doesn't start with a country prefix (leading +), it will be checked against default_country. If no default country is provided, one is inferred from the caller's IP address.

Parameters

NameTypeDescription
phonestringRequiredPhone number to verify.
default_countrystringOptionalISO 3166-1 alpha-2 country code (e.g. US, GB). Auto-detected from IP if omitted.

Response Fields

FieldTypeDescription
statusstring"success", "error", or "syntax-error"
phonestringThe phone number as submitted
phone_validbooleanWhether the number is valid
phone_typestringmobile, fixed_line, toll_free, premium_rate, shared_cost, voip, unknown
phone_regionstringGeographic region name
countrystringFull country name
country_codestringISO 3166-1 alpha-2 code
country_prefixstringCountry dialing prefix
international_numberstringInternational format
local_numberstringLocal format
e164stringE.164 format
carrierstringCarrier name

Example Request

cURL
curl "https://api.veriphone.io/v2/verify?phone=%2B11234567890" \
  -H "Authorization: Bearer YOUR_API_KEY"

Success Response 200

JSON
{
  "status": "success",
  "phone": "+11234567890",
  "phone_valid": true,
  "phone_type": "mobile",
  "phone_region": "California",
  "country": "United States",
  "country_code": "US",
  "country_prefix": "1",
  "international_number": "+1 123-456-7890",
  "local_number": "(123) 456-7890",
  "e164": "+11234567890",
  "carrier": "T-Mobile USA, Inc."
}

Invalid Number Response

JSON
{
  "status": "error",
  "phone": "+00000000",
  "phone_valid": false,
  "phone_type": "",
  "phone_region": "",
  "country": "",
  "country_code": "",
  "country_prefix": "",
  "international_number": "",
  "local_number": "",
  "e164": "",
  "carrier": ""
}
Note
If the input has fewer than 4 digits or more than 20, the API returns status: "syntax-error" and does not count against your credit balance.

GET POST /v2/credits

Returns current credit and usage information for your API key.

Parameters

No additional parameters beyond authentication.

Example Request

cURL
curl "https://api.veriphone.io/v2/credits" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

JSON
{
  "email": "user@example.com",
  "counter": 1250,
  "active": true,
  "payg": 0,
  "limit": 5000,
  "plan": "FREE",
  "renew": 15,
  "last_reset": "2026-03-01T00:00:00Z"
}
FieldTypeDescription
emailstringAccount email address
counternumberVerifications used in the current billing period
activebooleanWhether the account is active
paygnumberPay-as-you-go credits remaining
limitnumberMonthly verification limit for the current plan
planstringCurrent plan name
renewnumberDay of month when the counter resets
last_resetstringTimestamp of when the counter was last reset

GET POST /v2/plan/getPayments

Returns payment history and active subscription details for your account.

Parameters

No additional parameters beyond authentication.

Example Request

cURL
curl "https://api.veriphone.io/v2/plan/getPayments" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

JSON
{
  "status": "success",
  "payments": [
    {
      "product_name": "Veriphone Pro",
      "plan_name": "Monthly",
      "currency": "USD",
      "amount": "29.99",
      "receipt_url": "https://...",
      "event_time": "2026-03-15T10:30:00Z"
    }
  ],
  "subscription": {
    "update_url": "https://...",
    "status": "active",
    "next_bill_date": "2026-04-15",
    "currency": "USD",
    "new_price": "29.99"
  }
}
Note
The subscription object is empty { } if no active subscription exists.