0.0.4 • Published 3 years ago

@nuinalp/ebanx-sdk v0.0.4

Weekly downloads
-
License
BSD-3-Clause
Repository
gitlab
Last release
3 years ago

EBANX APIs NodeJS library

Install

# Install from npm
npm install @nuinalp/ebanx-sdk

# Install from yarn
yarn add @nuinalp/ebanx-sdk

# Install from pnpm
pnpm install @nuinalp/ebanx-sdk

Getting Started

NodeJS

// ES6 (>=node 10.16.0 LTS)
import { EbanxSdk } from '@nuinalp/ebanx-sdk/node'; // All Resources
import { Utils } from '@nuinalp/ebanx-sdk/node'; // Just the Server Resource
//...etc

// ES5, assuming native or polyfilled Promise is available
const { EbanxSdk } = require('@nuinalp/ebanx-sdk/node');

Browser

// ES6 (>=node 10.16.0 LTS)
import { EbanxSdk } from '@nuinalp/ebanx-sdk/browser'; // All Resources
import { Utils } from '@nuinalp/ebanx-sdk/browser'; // Just the Server Resource
//...etc

// ES5, assuming native or polyfilled Promise is available
const { EbanxSdk } = require('@nuinalp/ebanx-sdk/browser');

OR through the script tag:

<script src="node_modules/@nuinalp/ebanx-sdk/browser/index.js" />
<script>
  const { Utils } = EbanxSdk;
</script>

Instantiate the library using a custom authentication with EBANX Integration key or Public integration key created by the EBANX team.

const sdk = new EbanxSdk({
  integration_key: 'your_integration_key',
});

Available instantiating options:

NameOptionalDefaultDescription
integration_keyNoThe account integration key or public key
hostYesEbanx APIs Instance Host URL

Docs

All apis were added following the official documentation.

Supported APIs

The API's that are currently supported are:

// FX
Get FX rate
Get an FX Token 

// Tokenization
Create a Card token 
Set a token CVV 

// Payment Page
Payment Page API 

// Get available e-wallets 
Get available e-wallets 

// Direct Payments
Direct Payments 
Capture a payment 


// After the payment
Cancel
Refund
Refund or Cancel

// Utils
Document Balance 
ZipCode
Tracking
EBANX BIN List 
Get bank list 
Query
Print
Installments Plan 

Examples

Once you have your library instantiated, you can utilize many of the API's functionality:

Using the await/async method

import { Utils } from '@nuinalp/ebanx-sdk';

// Initialize the SDK Instance
const sdk = new Utils({
  integration_key: 'your_integration_key',
});

// Get Payment information
await sdk.query({ hash: 'payment_hash' });

// Or using Promise-Then notation
await sdk.query({ hash: 'payment_hash' }).then((details) => {
  console.log(details);
});

Documentation

You can check our Wiki to help you get started. Full documentation will be added soon.

Testing

Testing will be added soon

Support

Do you have a question? Please open an issue on our main repo.

License

BSD Clause 3

Copyright (c) 2021 The Nuinalp Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

0.0.3

3 years ago

0.0.2

3 years ago

0.0.4

3 years ago

0.0.1

3 years ago