API DOCUMENTATION Last Update: Apr 2022

Customer Exists (Fast Check)

Returns whether a customer already exists in the account.

 

The data to be submitted to the API is composed of the following fields:

 

  field   Example   Note
user_id john1970 Required
user_password 1959caadac9b13dcb3 Required
type customer_exists Required
account_id greatwidgets Required
card_number 1212121212 See Notes
code 1234567890123456 See Notes
customer_username jdoe1970 See Notes
email john.doe@email-provider.com See Notes
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

 

Notes:

  • Either the card_number, customer code, customer_username, or customer email is REQUIRED.
  • Use any combination of parameters. Success will only be returned if ALL passed parameters are matched. (ie. you can validate on card_number + email or customer_username + code, or on all parameters card_number + code + customer_username + email.)
  • If passing the customer code, this MUST be the unique Customer ID that was either
    • passed as 'code' by your program when the customer record was created previously, or
    • the 16-digit number that was generated by us and returned to you in the API response.

 

Example PHP Request:

If you are using PHP, the $data array would look like this:

  1. $data['user_id'] = 'john1970';
  2. $data['user_password'] = '1959caadac9b13dcb3';
  3. $data['type'] = 'customer_exists';
  4. $data['account_id'] = 'greatwidgets';
  5. $data['card_number'] = '121212121212';
  6. $data['customer_username'] = 'jdoe1970';

 

Success XML Response: All parameters passed match a customer

  1. <response status="success">
  2. <message>The information entered matches an existing customer.</message>
  3. </response>

 

No Match XML Response: No matching customer found

  1. <response status="no_match">
  2. <message>No customer matches data provided.</message>
  3. </response>

 

Error XML Response (error with structure of request):

  1. <response status="error">
  2. <error>Error message</error>
  3. </response>