PAYMENTS

Validate Address

Validate and standardize an address. A successful response includes the corrected address and a description of any changes. An error response explains why the address could not be validated.

Class: payments

Method: validate-address

POST/payments/validate-address

Parameters

  • client_id*
  • akey*
  • name - Optional business name. This may help identify suite information during validation.
  • address - Street address to validate.
  • address2 - Additional delivery information, such as "Attention: Accounts Payable".
  • city - City. Required when no ZIP code is provided.
  • state - State name or abbreviation. Required when no ZIP code is provided.
  • zip - ZIP code. Required unless both city and state are provided.

Validation Errors: If the supplied address cannot be validated, the response will contain an errors array describing the reason validation failed. The possible validation errors are listed below.

Error Description
Address not found The supplied address could not be found and does not match a known USPS special-case scenario.
Multiple addresses match Multiple address candidates were found that are equally likely to match the supplied address.
Example: "1 Main St" may match both "1 E Main St" and "1 W Main St".
Please enter a valid address number. The supplied address does not contain a valid primary street number.
Example: "Main St, Santa Barbara CA 93101".
Street not found The supplied street name could not be found within the specified city, state, or ZIP code.
Street number or box number out of range The street was found, but the supplied primary street or box number is not valid for that street.
Internal processing error, please contact SmartPayables as soon as possible An unexpected error occurred while processing the address, or the address matched a special-case scenario that could not be validated.
City not found The supplied city could not be found for the specified state or ZIP code.
State not found The supplied state or state abbreviation could not be identified.
DPV lockout, please contact SmartPayables as soon as possible The address triggered a USPS DPV lockout condition and cannot currently be validated.
Address not found but the region has General Delivery service The supplied address could not be found, but the specified region supports USPS General Delivery service. Mail addressed to "General Delivery" with the recipient's name may still be deliverable.
Unable to parse address. The supplied address could not be parsed into the individual address components required for validation.

Sample Return:

JSON response

JSONResponse example
{
  "result": {
    "address": "1250 Market Street",
    "address2": "",
    "city": "Denver",
    "state": "CO",
    "zip": "80202-1234",
    "corrections_desc": ""
  }
}

XML response

XMLResponse example
<wmc-response status="1">
<result>
	<address>1250 Market Street</address>
	<address2></address2>
	<city>Denver</city>
	<state>CO</state>
	<zip>80202-1234</zip>
	<corrections_desc></corrections_desc>
</result>
</wmc-response>

Search documentation