This page's content:

EBANX JS FORM

What you found here:

What’s EBANX JS FORM

The EBANX JS FORM, makes it easy to collect and process all LATAM payment methods, including EBANX Dollar Card, by security way with low PCI burden, because this build to satisfies the SAQ A level of PCI compliance.

How it work’s

Built to be simple: – EBANX JS FORM, It does the hard work for you! You just need TWO steps:
  1. Setup the CLI
  2. Setup the SERVER

Setup CLI

This guide demonstrates one way to set up the CLI.
REQUIREMENT’S
  • [x] This just work when your app uses SSL.
  • [x] Just work when loaded from our domain (https://js.ebanx.com).
  • [x] If your business is EBANX KEY ACCOUNT see this.
UNDERSTANDING
How it work's

1. Setup

  • Begin by including the library. Add this script tag to your page:
<script type="text/javascript" src="https://js.ebanx.com/"></script>
EBANX.setPublishableKey('pk_test_6pRNASCoBOKtIshFeQd4XMUh');
NOTE: Best Practices, put scripts at the bottom.

2. Country abbreviation field.

Provide the country abbreviation field with EBANX element data attribute. This is the country of the delivery address or billing address, your consumer.
<!-- Your checkout/compliance form -->
<form id="my-checkout-form" action="/transaction-endpoint" method="post">
  <input type="hidden" ebanx-data-country-abbreviation="BR">
</form>
NOTE: Country needs respect ISO 3166-1 abbreviation. NOTE: See another’s compliance/checkout fields EBANX JS FORM needs. NOTE: Don’t use name attribute in sensible inputs.

3. DECIDES PAYMENT METHODS

EBANX JS FORM, decides for you, which payment methods to be used and which compliance fields is required. Based on the countries and payment method’s that your business, working with us.

4. Compliance form

EBANX JS FORM, build your SMART compliance form and mount device-fingerprint.

5. TOKEN

Based on payment method your customer choose, EBANX JS FORM decides which tokenize routine needs used and TOKENIZE checkout data.

6. TOKEN TO SERVER

EBANX JS FORM submit for your server, tokenized data checkout.

Setup SERVER

1. REQUEST PAYMENT ON SERVER

Your server can use EBANX SDK’s or EBANX PLUGINS, to request PAYMENT. Example using NODE JS. See more here.
var ebanx;
var ebanxMod;
ebanxMod = require('ebanx');
ebanx = new ebanxMod();

//Configuring the module
ebanx.configure({
  integrationKey : '1231000',
  testMode : true
});

//Creating new checkout payment

var myPreferCurrency = 'USD';

var params = {
  currency_code : req.body.ebanx.currency_code || myPreferCurrency,
  amount        : req.body.amount,
  name          : req.body.customer.name,
  email         : req.body.customer.email,
  token         : req.body.ebanx.token
};

ebanx.request(params, function(error, reply) {
  if(error) {
    console.log(error);
  } else {
    console.log(reply);
  }
});

2. RESPONSE PAYMENT DATA

EBANX Server send for your server payment data. You need help here? contact us