Required and Optional Fields
  • 30 Aug 2022
  • 1 Minute to read
  • Contributors
  • Dark

Required and Optional Fields

  • Dark

Required Fields

Below are the minimum required elements inside the html page in order for Helcim.js to work. The JavaScript will warn users if an element is missing.

Element TypeNameIDFormat / OptionsDescription
script--text/javascriptThe JavaScript include. Should include src=""
formhelcimFormhelcimFormmethod="POST"The HTML form. Once the transaction is complete, the JavaScript will submit the form back to the merchant server to capture the transaction results.
This DIV will be overwritten by the JavaScript. It will display errors as well as the transaction results before the form is finally submitted.
input hiddennone*merchantIdnumericYour merchant id; must not include any spaces or special characters.
input textnone*cardNumber16/numericCredit card number; must not include any spaces or special characters.
input textnone*expiryDate4/numericCredit card expiry date in the form of MMYY. With leading zeroes if the month or year is only one digit.
input textnone*cvv4/numericCVV2 value
input buttonbuttonProcessbuttonProcessonclick="javascript:helcimProcess();"The input button to process the payment. The value can be set to anything, such as "Process Payment".
IMPORTANT: Fields with sensitive credit card information should not have a field name, only a field ID. This will allow the JavaScript to retrieve the values, but prevent the fields from being submitted back to the merchant server.

Optional Fields

Field NameType / FormatDescription
amountnumericAmount, decimal place
dev1/numericSets whether transactions are sent to the live ( or dev environment (
test1/numericSets whether this is a test or not. Any value other than 1 will assume this is a real transaction.
preauth1/numericSets whether the transaction should be pre-authorization (default is purchase).
submitDecline1/numericSets whether the form should be submitted on a decline (default is =1).
cardholderName100/alphaName on card.
cardholderAddress255/alphaAddress of cardholder for address verification.
cardholderPostalCode50/alphaPostal code/zip code of cardholder for address verification.
billingName100/alphaCustomer's billing name.
billingAddress255/alphaCustomer's billing address.
billingCity255/alphaCustomer's billing city.
billingProvince255/alphaCustomer's billing province or state.
billingPostalCode50/alphaCustomer's billing postal code or zip code.
billingCountry255/alphaCustomer's billing country.
billingPhoneNumber255/alphaCustomer's billing phone number.
billingEmailAddress255/alphaCustomer's billing email address (used for emailing a receipt to customer if feature is enabled)
shippingName100/alphaCustomer's shipping name.
shippingAddress255/alphaCustomer's shipping address.
shippingCity255/alphaCustomer's shipping city.
shippingProvince255/alphaCustomer's shipping province or state.
shippingPostalCode50/alphaCustomer's shipping postal code or zip code.
shippingCountry255/alphaCustomer's shipping country.
shippingPhoneNumber255/alphaCustomer's shipping phone number.
shippingEmailAddress255/alphaCustomer's shipping email address.
orderId50/alphaUnique transaction identifier, transaction will fail if a duplicate order id is found. The order id will be automatically generated by the Gateway if this field is blank.
customerId50/alphaCustomer identifier.
commentsalphaAny extra information from the cardholder or merchant.
shippingAmount10,2/decimalTotal shipping amount.
taxAmount10,2/decimalTotal tax amount.

What's Next