Version: current


This library enables you to integrate EBANX with any Ruby application.


Ruby >= 2.0.0 Bundler ##Installation Add this line to your application’s Gemfile, and bundle it:

gem 'ebanx'
$ bundle

Or install it globally using:

$ gem install ebanx


To use the EBANX Ruby gem you need to setup your integration key.

Ebanx.tap do |e|
e.integration_key = 'YOUR_SANDBOX_INTEGRATION_KEY'
e.test_mode = true

You can change the following settings:

  • integration_key: Your integration key. It will be different in test and production modes.
  • test_mode: Enable or disable the test mode. The default value is false.

To create a new API request, just call one of the following methods on the Ebanx class and supply it with the request parameters:

  • Ebanx.do_cancel
  • Ebanx.do_capture
  • Ebanx.do_direct
  • Ebanx.do_exchange
  • Ebanx.do_print
  • Ebanx.do_query
  • Ebanx.do_refund
  • Ebanx.do_refund_or_cancel
  • Ebanx.do_request
  • Ebanx.do_token
  • Ebanx.do_zipcode

do_direct command example:

require 'ebanx'
Ebanx.tap do |e|
e.integration_key = 'YOUR_SANDBOX_INTEGRATION_KEY'
e.test_mode = true
response = Ebanx.do_direct({
operation: 'request',
mode: 'full',
payment: {
name: 'João da Silva',
email: '',
currency_code: 'USD',
amount_total: 100.00,
merchant_payment_code: 'aca8c1d848a',
payment_type_code: 'boleto',
person_type: 'personal',
document: '13326724691',
birth_date: '01/01/1980',
zipcode: '70000-000',
address: 'Rua Brasil',
street_number: '1',
city: 'Brasília',
state: 'DF',
country: 'br',
phone_number: '6130001111',
due_date: '19/10/2016'


Found a bug? Want to add a new feature? Go on and send a pull request to our GitHub repository:

Last updated on by Anderson Fraga