Integrate NodeJS and Dibs
Trexle connects NodeJS to Dibs and 100+ other payment gateways using a single plugin for one time annual fee
Dibs and NodeJS Integration Guide
For DIBS integration, you will need the following credentials: DIBS Merchant ID, MD5 k1, MD5 k2 and HMAC key.
You can obtain these credentials by logging to your DIBS account
To obtain Merchant ID, on the Menu on the left, click “Setup –> Edit profile”.
To obtain MD5 k1 and MD5 k2 keys, navigate to Integration > MD5 keys
HMAC Key (k) – is only needed when using Payment Window as the payment method. To obtain it, navigate to Integration –> HMAC keys.
Take the credentials you just obtained from Dibs and navigate to Trexle dashboard, click Payments Gateways and select Dibs from the drop down menu as shown below.
Fill into your Dibs credential and click Add Gateway. Click the Activate button next to Dibs, 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
Cards to be used in the test environment checkout. These will only work when checkout is in test mode.
Card type | Card number | Expire date | CVC | Result |
VISA | 4925000000000004 | > today | Any 3 digits | Success |
VISA | 4925000000000087 | > today | Any 3 digits | Reservation will fail |
VISA | 4925000000000079 | > today | Any 3 digits | Charge will fail |
MasterCard | 5413000000000000 | > today | Any 3 digits | Success |
Test PNO (personal identification number) to be used in the test environment checkout. These will only work when checkout is in test mode.
PNO | Postal code | Card or Invoice | Result | |
19440317-1111 | 36030 | Card | Success | |
19450225-1111 | 12345 | Card | Success | |
19420826-2222 | 75650 | Card | Success | |
19440424-1111 | 14552 | Card | Reservation not approved | |
Invoice Sweden | ||||
19420913-1111 | 79021 | Invoice | Success | |
19440317-1111 | 36030 | Invoice | Success | |
19440424-1111 | 14552 | Invoice | Reservation not approved | |
Invoice Norway | ||||
PNO | Postal code | Address | Card or Invoice | Result |
06073910828 | 9300 | STARTVEIEN 56 | Invoice | Success |
10114000294 | 0150 | LANGKAIA 1 | Invoice | Success |
101055001361 | 0150 | LANGKAIA 1 | Invoice | Reservation not approved |
Dibs Supported Countries
Dibs 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 Dibs and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.
About Dibs
DIBS Payment Services allows the use of its new Easy solution, it becomes super easy for your customers to pay using a embedded checkout in your webshop. It remembers the payment information of your customer and provides fewer payment steps on the way to a purchase. Make it easy for your customers to shop online and easy for you to increase your revenue due to fewer discontinued purchases.
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.