Integrate NodeJS and Usaepay
Trexle connects NodeJS to Usaepay and 100+ other payment gateways using a single plugin for one time annual fee
Usaepay and NodeJS Integration Guide
To integrate USAePay, you will need the following credentials: API key and PIN.
To obtain these credentials, log to your USAePay Merchant portal.
From your home page, click on “Settings” in the menu. In the sub menu, press “API Keys”
Press the “Add API key” button
On the API Keys Editor page:
Add a Name for your website
A PIN is required for integration, even though USAePay’s interface states it’s optional.
Add your store’s email to the “Email Merchant Receipt To” textarea
Press “Apply” to save the settings and stay on the editor page. Your key will be displayed.
Take the credentials you just obtained from Usaepay and navigate to Trexle dashboard, click Payments Gateways and select Usaepay from the drop down menu as shown below.
Fill into your Usaepay credential and click Add Gateway. Click the Activate button next to Usaepay, 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
4000100011112224
4000100111112223
4000100211112222
4000100311112221
4000100411112220
4000100511112229
4000100611112228
4000100711112227
4000100811112226
4000100911112225
4000101011112222
4000101111112221
4000101211112220
4000101311112229
4000101411112228
4000101511112227
4000101611112226
- Exp/date – any future date
CVV code – any
Usaepay Supported Countries
Usaepay 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 Usaepay and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.
About Usaepay
USAePay is a payment gateway that provides U.S. merchants the ability to accept credit cards easily, safely and securely online. By connecting their shop to USAePay gateway, processing system, online merchants ensure seamless onsite checkout experience for their customers.
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.