Integrate NodeJS and Eway Managed Payments

Trexle connects NodeJS to Eway Managed Payments and 100+ other payment gateways using a single plugin for one time annual fee

Eway Managed Payments and NodeJS Integration Guide

On the homepage in your MYeWAY account, you can click on the “Get Connected Page” link in the Get Connected banner to quickly access your Live Rapid API Key and Password.


To quickly and easily create a Rapid API Key and Password, follow these steps:

Navigate to the API Key Page

  • You are currently in the Success Community. Login to MYeWAY.
  • Hover the mouse over the My Account tab located at the top of the page, then click API Key.

  • Use the Copy to Clipboard button to copy your API Key. This can then be added to your website, or passed through to your developer.

  • To obtain the Rapid API password, click Generate Password. Be aware that the new password can only be viewed while you remain on the API Key page, and will be masked when returning to the page later. You can use the Copy To Clipboard button to copy the password. This can then be added into your website or passed through to your developer.
    Note: Generating the password will override the existing password, this means any systems using the existing password will stop working. Due to this it is recommended you check any website settings or speak with your developer before generating a new password. See this guide for steps on how to create a second API Key.

You now have your API Key and API Password for our Rapid API, enter this into your website/system or provide these details directly through to your developer.


Take the credentials you just obtained from Eway Managed Payments and navigate to Trexle dashboard, click Payments Gateways and select Eway Managed Payments from the drop down menu as shown below.

Fill into your Eway Managed Payments credential and click Add Gateway. Click the Activate button next to Eway Managed Payments, and it will give you a success message and the button will turn into green. You should see something like below.

To integrate Eway Managed Payments and NodeJS you need Trexle API keys

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

amount: 400,
currency: ‘usd’,
description: ‘test charge’,
email: ‘[email protected]’,
ip_address: ‘’,
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) {

Then run the code:

node test.js

There are several test credit card numbers available to use. All provided test cards listed will pass a Luhn check, however all the below cards will be declined on the live gateway.

Visa – 4444333322221111
Mastercard – 5105105105105100 / 2223000048400011 / 2223520043560014
Amex – 378282246310005
Diners – 38520000023237 or 30569309025904

Q. What expiry date should be used?
A. Any valid(future) expiry date can be passed with the card.

Q. What Name should be used?
A. Any name can be used, we recommend using eWAY test to identify these as your test payments in the live gateway.

Q. If a CVN is required, what number can be used?
A. If CVN’s are required for testing the following formats should be used:
Visa/Mastercard/Diners – Any 3 digits – Amex – Any 4 digits

Q. What result will the eWAY test card (4444333322221111) receive on the live gateway?
A. On the live gateway, this card will always fail, usually with the error 58 Function Not Permitted to Terminal or 92 Unable To Route Transaction.

Eway Managed Payments Supported Countries

Eway Managed Payments Supported Payment Processing Actions

✔ Purchase
✖ Authorize
✖ Capture
✖ Void
✔ Credit
✖ Recurring
✖ Card Store

Key Features

Credit Card Vault: securely store your customers sensitive credit card data using tokens.
Instant PCI-DSS Compliance: your customers credit card data never touches your site or server.
Multiple Gateway Support: Connect your NodeJS site to 100+ payment gateway

About Trexle

Trexle is a powerful online recurring subscription billing platform that integrate Eway Managed Payments and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.

About Eway Managed Payments

The eWAY Managed Payments application allows you to securely accept and process credit card payments in real-time from within Salesforce. Detailed transaction information is captured and retained within your Salesforce customer records.

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.