Integrate NodeJS and Cardstream
Trexle connects NodeJS to Cardstream and 100+ other payment gateways using a single plugin for one time annual fee
Cardstream and NodeJS Integration Guide
You will need the following information to integrate with the Payment Gateway using the Direct integration method; Cardstream Merchant ID. Your Merchant ID enables you to access and communicate with the Payment Gateway. Please note that these details will differ to the login supplied to access the administration panel. You should have received these details when your account was set up.
You may also use test Merchant IDs (if you have been issued with a test ID) and swap these for your live account details when you receive them.
Integration URL https://gateway.cardstream.com/direct/
New Merchants who have not yet received their live Merchant ID can still perform an integration for testing purposes. Simply enter one of the test Merchant IDs below and use the test cards provided to run a test transaction.
For non 3-D Secure testing use Merchant ID 100001
For 3-D Secure Testing use Merchant ID 100856
Please note that the field names are cAsE sEnSiTiVe.
Take the credentials you just obtained from Cardstream and navigate to Trexle dashboard, click Payments Gateways and select Cardstream from the drop down menu as shown below.
Fill into your Cardstream credential and click Add Gateway. Click the Activate button next to Cardstream, 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
Visa Debit
Card Number CVV Number Address
4539791001730106 CVV 289
Unit 5
Pickwick Walk
120 Uxbridge Road
Hatch End
Middlesex
HA6 7HJ
4462000000000003 CVV 672
Mews 57
Ladybird Drive
Denmark 65890
MasterCard Credit
Card Number CVV Number Address
5301250070000191 419
25 The Larches
Narborough
Leicester
LE10 2RT
5413339000001000 304
Pear Tree Cottage
The Green
Milton Keynes
MK11 7UY
5434849999999951 470
34a Rubbery Close
Cloisters Run
Rugby
CV21 8JT
5434849999999993 557
4-7 The Hay Market
Grantham
NG32 4HG
MasterCard Debit
Card Number CVV Number Address
5573 4712 3456 7898 159
Merevale Avenue
Leicester
LE10 2BU
UK Maestro
Card Number CVV Number Address
6759 0150 5012 3445 002 309
The Parkway
5258 Larches Approach
Hull
North Humberside
HU10 5OP
6759 0168 0000 0120 097 701
The Manor
Wolvey Road
Middlesex
TW7 9FF
JCB
Card Number CVV Number Address
3540599999991047 209
2 Middle Wallop
Merideth-in-the-Wolds
Lincolnshire
LN2 8HG
Electron
Card Number CVV Number Address
4917480000000008 009
5-6 Ross Avenue
Birmingham
B67 8UJ
American Express
Card Number CVV Number Address
374245455400001 4887
The Hunts Way
Southampton
SO18 1GW
Diners Club
Card Number
36432685260294
Cardstream Supported Countries
Cardstream 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 Cardstream and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.
About Cardstream
Cardstream has developed a modern payment gateway technology and management platform which has the capability to be fully white labeled. With a fully branded payment gateway, their resellers are able to offer their own in-house payment gateway solution to their own merchants. They already have many white label resellers, including Acquirers, Payment Facilitators, Independent Sales Organisations, and Software Vendors who use our state of the art technology to deliver a reliable, easy to use and secure card processing solution.
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.