Transaction responses

Once the transaction is completed and the form is submitted, Helcim.js will send POST data back to the merchant's server (webpage).

The POST data will include the fields listed below. The POST field [xml] will also contain an XML structure of the response.

Field NameTypeDescription
responseInteger1 = Success, 0 = Failure
responseMessageStringThe transaction response message.
noticeMessageIntegerThe transaction notice, such as "Order Updated".
dateStringThe transaction date, format: YYYY-MM-DD
timeStringThe transaction time, format: HH:MM:SS
typeStringThe transaction type, such as "Purchase" or "Verify".
amountDecimalThe amount processed.
cardHolderNameStringThe cardholder's name.
cardNumberStringThe credit card number (masked).
cardExpiryStringThe credit card expiry date.
cardTokenStringThe credit card token.
cardTypeStringThe credit card type.
transactionIdStringThe Helcim.js transactionId.

Refer to our Helcim.js transactions and the Payment API section for more information on retrieving these transactions through the Payment API.
avsResponseStringThe address verify (AVS) response.
cvvResponseStringThe CVV response.
approvalCodeStringThe transaction approval code.
orderNumberStringThe order number. Where no existing orderNumber was passed for your Helcim.js transaction, the Helcim System will create one.
customerCodeStringThe customer code. Where no existing customerCode was passed for your Helcim.js transaction, the Helcim System will create one.
currencyStringThe transaction currency. The Helcim.js Configuration determines the currency available for processing.
xmlStringThe XML response (XML document format). This will only be returned if the Include XML on Response setting is toggled on for your Helcim.js Configuration.

POST response sample

The following is an example of the POSt response that is submitted back to your websites server after processing a transaction.

[response] => 1
[responseMessage] => APPROVAL
[noticeMessage] => Order Created - Customer Created
[date] => 2017-06-21
[time] => 12:23:31
[type] => purchase
[amount] => 100.00
[cardHolderName] => John Smith
[cardNumber] => 5454****5454
[cardExpiry] => 1025
[cardToken] => 5440c5e27f287875889421
[cardType] => MasterCard
[transactionId] => 112415310
[avsResponse] => X
[cvvResponse] => M
[approvalCode] => 102542
[orderNumber] => INV10010
[customerCode] => CST2000
[currency] => CAD
[xml] => XML-DOCUMENT-SEE-BELOW

helcimResults sample

Helcim.js will also populate the transaction details into the helcimResults div using hidden HTML input elements, as outlined in the following example.

<div id-"helcimResults">
  <input type="hidden" name="response" id="response" value="1">
  <input type="hidden" name="responseMessage" id="responseMessage" value="APPROVAL">
  <input type="hidden" name="noticeMessage" id="noticeMessage" value="New Card Stored - New Customer Created - New Order Created - Order Marked as Paid">
  <input type="hidden" name="date" id="date" value="2024-04-24">
  <input type="hidden" name="time" id="time" value="16:08:45">
  <input type="hidden" name="type" id="type" value="purchase">
  <input type="hidden" name="amount" id="amount" value="826.00">
  <input type="hidden" name="cardHolderName" id="cardHolderName" value="Jessica Smith">
  <input type="hidden" name="cardNumber" id="cardNumber" value="5454 **** **** 5454">
  <input type="hidden" name="cardExpiry" id="cardExpiry" value="0138">
  <input type="hidden" name="cardToken" id="cardToken" value="f5974b9412d0ab953f6d63">
  <input type="hidden" name="cardType" id="cardType" value="Mastercard">
  <input type="hidden" name="transactionId" id="transactionId" value="42688777">
  <input type="hidden" name="avsResponse" id="avsResponse" value="X">
  <input type="hidden" name="cvvResponse" id="cvvResponse" value="">
  <input type="hidden" name="approvalCode" id="approvalCode" value="T6E3ST">
  <input type="hidden" name="orderNumber" id="orderNumber" value="INV8792465">
  <input type="hidden" name="customerCode" id="customerCode" value="CST123457142">
  <input type="hidden" name="currency" id="currency" value="CAD">
	<input type="hidden" name="xmlHash" id="xmlHash" value="2a5183a2735e3c74c582563ee701581e68a760afc9f70654e9f792a75f285dee">
</div>

XML response sample

When "Include XML in Response" is toggled on for your Helcim.js configuration, the response contains an XML values with the XML message containing the relevant transaction information included in it.

<?xml version=\"1.0\"?>
<message>
  <response>1</response>
  <responseMessage>APPROVAL</responseMessage>
  <noticeMessage>New Card Stored - New Customer Created - New Order Created - Order Marked as Paid</noticeMessage>
  <date>2024-04-24</date>
  <time>16:14:42</time>
  <type>purchase</type>
  <amount>456.00</amount>
  <currency>CAD</currency>
  <cardHolderName>Jessica Smith</cardHolderName>
  <cardNumber>5454 **** **** 5454</cardNumber>
  <cardExpiry>0138</cardExpiry>
  <cardToken>5c92996b7d573c1b15fc6e</cardToken>
  <cardType>Mastercard</cardType>
  <transactionId>42688929</transactionId>
  <avsResponse>X</avsResponse>
  <cvvResponse></cvvResponse>
  <approvalCode>T3E3ST</approvalCode>
  <orderNumber>INV8792466</orderNumber>
  <customerCode>CST123457143</customerCode>
  <includeXML>1</includeXML>
</message>

Helcim.js transactions and the Payment API

The Helcim System has a number of backend payment systems that facilitate the processing and settlement of credit card transactions with their own unique id values. Completing subsequent actions through the Payment API expects a different transactionId value than the one returned by Helcim.js.

Retrieving the updated V2 API transactionId value would be required you want to Refund or Reverse Purchase transactions processed through Helcim.js, or Capture any Pre-Authorize Transactions through the Payment API.

To retrieve this value, we recommend calling the Collect Card Transaction endpoint with relevant query parameters to filter returned transactions down to the correct one. This could include a combination of values returned by Helcim.js, such as the date, cardHolderName, amount and cardToken for the transaction.

Based on this the Payment API will return a transaction object with a transactionId that can be used through all Payment API endpoints.

 {
    "transactionId": 25133280,
    "dateCreated": "2024-04-24 16:14:41",
    "cardBatchId": 3509924,
    "status": "APPROVAL",
    "user": "Helcim System",
    "type": "purchase",
    "amount": 456,
    "currency": "CAD",
    "avsResponse": "X",
    "cvvResponse": "",
    "cardType": "MC",
    "approvalCode": "T3E3ST",
    "cardToken": "5c92996b7d573c1b15fc6e",
    "cardNumber": "5454545454",
    "cardHolderName": "Jessica Smith",
    "customerCode": "CST123457143",
    "invoiceNumber": "INV8792466",
    "warning": ""
  }