API DOCUMENTATION Last Update: Apr 2022

Generate a New Customer Card Number

Creates a random card number of a given length and checks that this number is unique and not in use already 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
account_id greatwidgets Required
type generate_card_number Required
how_many_digits (# of digits) Optional
card_number_prefix (any digits) Optional
card_number_suffix (any digits) Optional
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



  • The how_many_digits parameter is optional: if it is not given, it will default to 16 digits.


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['account_id'] = 'greatwidgets';
  4. $data['type'] = 'generate_card_number';
  5. or: $data['how_many_digits'] = 10; // for 10-digit number.


Success XML Response:

  1. <response status="success">
  2. <customer>
  3. <card_number>1234567890</card_number>
  4. </customer>
  5. </response>


Error XML Response:

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