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 Name | Type | Description |
---|---|---|
response | Integer | 1 = Success, 0 = Failure |
responseMessage | String | The transaction response message. |
noticeMessage | Integer | The transaction notice, such as "Order Updated". |
date | String | The transaction date, format: YYYY-MM-DD |
time | String | The transaction time, format: HH:MM:SS |
type | String | The transaction type, such as "Purchase" or "Verify". |
amount | Decimal | The amount processed. |
cardHolderName | String | The cardholder's name. |
cardNumber | String | The credit card number (masked). |
cardExpiry | String | The credit card expiry date. |
cardToken | String | The credit card token. |
cardType | String | The credit card type. |
transactionId | String | The 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. |
avsResponse | String | The address verify (AVS) response. |
cvvResponse | String | The CVV response. |
approvalCode | String | The transaction approval code. |
orderNumber | String | The order number. Where no existing orderNumber was passed for your Helcim.js transaction, the Helcim System will create one. |
customerCode | String | The customer code. Where no existing customerCode was passed for your Helcim.js transaction, the Helcim System will create one. |
currency | String | The transaction currency. The Helcim.js Configuration determines the currency available for processing. |
xml | String | The 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
helcimResults
SampleHelcim.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": ""
}
Updated 1 day ago