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:
- $data['user_id'] = 'john1970';
- $data['user_password'] = '1959caadac9b13dcb3';
- $data['type'] = 'customer_exists';
- $data['account_id'] = 'greatwidgets';
- $data['card_number'] = '121212121212';
- $data['customer_username'] = 'jdoe1970';
Success XML Response: All parameters passed match a customer
- <response status="success">
- <message>The information entered matches an existing customer.</message>
- </response>
No Match XML Response: No matching customer found
- <response status="no_match">
- <message>No customer matches data provided.</message>
- </response>
Error XML Response (error with structure of request):
- <response status="error">
- <error>Error message</error>
- </response>
|