Posts: 1
Registered: ‎02-22-2017

Accept.js Integration / Attaching an Invoice Number

I'm integrating a simple purchase form with using Accept.js and I would like to have an Invoice # or Job # recorded with the credit card transaction. The form submission handler looks like:

function getSecureData() {

  /* Compile Data from Form */
  var secureData = {},  authData = {},  cardData = {};  cardData.cardNumber = document.getElementById('CARDNUMBER_ID').value;  cardData.month = document.getElementById('EXPIRY_MONTH_ID').value;  cardData.year = document.getElementById('EXPIRY_YEAR_ID').value;  = document.getElementById('ZIP_CODE').value;  cardData.cardCode  = document.getElementById('CARD_CODE').value;  authData.clientKey = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';  authData.apiLoginID = 'XXXXXXXXX';

  /* My attempt to attach a job number to the secureData being submitted */  secureData.userFields = {    job_number: document.getElementById('JOB_NUMBER').value
  };  secureData.cardData = cardData;  secureData.authData = authData;

  /* Dispatch Data to Accept.js */
  Accept.dispatchData(secureData, 'responseHandler');


I was trying to extrapolate from the data structure from createTransactionRequest in the documentation. However, the info doesn't seem to make it to the merchant's receipt.

Does anyone have any suggestions or experience doing this?

Posts: 2,765
Topics: 57
Kudos: 248
Blog Posts: 67
Registered: ‎12-05-2011

Re: Accept.js Integration / Attaching an Invoice Number

Hello @robbieg


You would not include an Invoice or Job # information as part of requesting the nonce, but instead during the createTransaction request.