Integrate NodeJS and Heartland Payment Systems
Trexle connects NodeJS to Heartland Payment Systems and 100+ other payment gateways using a single plugin for one time annual fee
Heartland Payment Systems and NodeJS Integration Guide
Login to your Heartland Account and
get your API keys and other Credentials needed to access the API.
Take the credentials you just obtained from Heartland Payment Systems and navigate to Trexle dashboard, click Payments Gateways and select Heartland Payment Systems from the drop down menu as shown below.
Fill into your Heartland Payment Systems credential and click Add Gateway. Click the Activate button next to Heartland Payment Systems, and it will give you a success message and the button will turn into green. You should see something like below.
In your NodeJS project, open a terminal and issue the following command:
npm install trexlejs
If you want to test, consider writing the following example in a test.js file:
var Trexle = require('trexlejs');
var trexle = Trexle.setup({
key: ‘your-api-key’,
production: false
});
trexle.createCharge({
amount: 400,
currency: ‘usd’,
description: ‘test charge’,
email: ‘[email protected]’,
ip_address: ‘66.249.79.118’,
card: {
number: ‘4242424242424242’,
expiry_month: 8,
expiry_year: 2018,
cvc: 123,
name: ‘John Milwood’,
address_line1: ‘423 Shoreline Park’,
address_city: ‘Mountain View’,
address_postcode: 94043,
address_state: ‘CA’,
address_country: ‘US’
}
}, function (response) {
console.log(response.body);
});
Then run the code:
node test.js
Credit
The following card numbers are used by our Certification environment to verify that your tests worked. Note that while variations (such as 4111111111111111) will work for general testing the cards listed below are required to complete certification.
Name | Number | Exp Month | Exp Year | CVV | Address | Zip |
---|---|---|---|---|---|---|
Visa | 4012002000060016 | 12 | 2025 | 123 | 6860 Dallas Pkwy | 750241234 |
MasterCard | 2223000010005780 | 12 | 2019 | 900 | 6860 Dallas Pkwy | 75024 |
MasterCard | 5473500000000014 | 12 | 2025 | 123 | 6860 Dallas Pkwy | 75024 |
Discover | 6011000990156527 | 12 | 2025 | 123 | 6860 | 750241234 |
Amex | 372700699251018 | 12 | 2025 | 1234 | 6860 | 75024 |
JCB | 3566007770007321 | 12 | 2025 | 123 | 6860 | 75024 |
Gift
The following Gift card numbers are used by our Certification environment to verify that your tests worked.
Number | Pin |
---|---|
5022440000000000098 | 1234 |
5022440000000000007 | 1234 |
Heartland Payment Systems Supported Countries
Heartland Payment Systems Supported Payment Processing Actions
✔ Authorize
✔ Capture
✔ Void
✔ Credit
✔ Recurring
✖ Card Store
Key Features
About Trexle
Trexle is a powerful online recurring subscription billing platform that integrate Heartland Payment Systems and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.
About Heartland Payment Systems
Heartland provides amazing solutions for the restaurant industry. Restaurant owners should be looking into this company for sure. But you’ll also see that Heartland caters to schools (particularly K-12), the hospitality industry, local governments, and nonprofits, to name a few. Heartland has some interesting offerings for restaurants, educational institutions, the hospitality industry, and other types of businesses. It certainly shines in some specialized niches, but that doesn’t mean Heartland can’t also cater to your standard retail or ecommerce businesses.
About NodeJS
Node.js is an open-source, cross-platform JavaScript runtime environment for executing JavaScript code server-side, and uses the Chrome V8 JavaScript engine. Historically, JavaScript was used primarily for client-side scripting, in which scripts written in JavaScript are embedded in a webpage's HTML, to be run client-side by a JavaScript engine in the user's web browser. Node.js enables JavaScript to be used for server-side scripting, and runs scripts server-side to produce dynamic web page content before the page is sent to the user's web browser.