Checkout API

To create a payment using EBANX Checkout, you must call the API method request.

The following parameters are mandatory for Brazilian payment methods using EBANX Checkout:

integration_key

string

Your unique and secret integration key.

name

string

Customer name.

email

string

Customer email address.

country

string

Two-letter country code - br for Brazil.

payment_type_code

string

The payment method chosen by the customer. Supported values:

  • _all: all available payment methods for the merchant account in this country.
  • boleto: Boleto Bancário.
  • _tef: bank transfer (TEF).
  • _creditcard: Credit Card

merchant_payment_code

string

Unique identifier for this payment (usually the order number from your system).

currency_code

string

The currency code of your transaction. Supported values: BRL, EUR, USD

amount

float

Transaction amount, in the specified currency. E.g.: 100.50

A successful request will return a JSON expression similar to the one below. You will need to redirect the customer to the EBANX Checkout using the redirect_url.

Direct API

To create a payment using EBANX Direct, you must call the API method direct.

The following parameters are mandatory for Brazilian payment methods using EBANX Direct:

integration_key

string

Your unique and secret integration key.

payment.name

string

Customer name.

payment.email

string

Customer email address.

payment.document

string

Customer CPF (taxpayer identification number). It must be a valid one.

payment.zipcode

string

Customer zipcode.

payment.address

string

Customer address (street name).

payment.street_number

string

Customer street number.

payment.city

string

Customer city name.

payment.state

string

Customer two-letter state code.

payment.phone_number

string

Customer phone number with area code.

payment.country

string

Two-letter country code - br for Brazil.

payment.payment_type_code

string

The payment method chosen by the customer. Supported values:

  • amex: American Express credit card.
  • aura: Aura credit card.
  • banrisul: Banrisul bank transfer.
  • boleto: boleto bancário.
  • bradesco: Bradesco bank transfer.
  • bancodobrasil: Banco do Brasil bank transfer.
  • diners: Diners credit card.
  • discover: Discover credit card.
  • ebanxaccount: EBANX Account.
  • elo: Elo credit card.
  • hipercard: Hipercard credit card.
  • itau: Itaú bank transfer.
  • mastercard: Mastercard credit card.
  • visa: Visa credit card.

payment.merchant_payment_code

string

Unique identifier for this payment (usually the order number from your system).

payment.currency_code

string

The currency code of your transaction. Supported values: BRL, EUR, USD

payment.amount_total

float

Transaction amount, in the specified currency. E.g.: 100.50

Bank transfer (TEF)

The following parameters are specific for the bank transfer payment method:

payment.payment_type_code

string

The supported values for bank transfer payments are::

  • banrisul: Banrisul bank transfer.
  • bradesco: Bradesco bank transfer.
  • bancodobrasil: Banco do Brasil bank transfer.
  • itau: Itaú bank transfer.
  • ebanxaccount: EBANX Account.

A successful request will return a JSON expression similar to the one below. You will need to redirect the customer to redirect_url – the customer then be automatically redirected to the bank website to complete the payment.

Boleto Bancário

The following parameters are specific for the boleto bancário payment method:

payment.payment_type_code

string

Value must be boleto for Boleto Báncário payments.

payment.due_date

The due date of payments slips. The boleto expiry date in the format dd/mm/yyyy. It can be more than three days only when “payment.currency” is BRL (Brazilian Real) and your merchant account has this feature enabled. The due date is based on the local time of the country that the payment is generated.

A successful request will return a JSON expression similar to the one below. The boleto link will be the value of payment.boleto_url, and the boleto barcode will be the value of payment.boleto_barcode.

Credit card

The following parameters are specific for the credit card payment method:

payment.payment_type_code

string

The supported values for bank transfer payments are:

  • amex: American Express credit card.
  • aura: Aura credit card.
  • diners: Diners credit card.
  • discover: Discover credit card.
  • elo: Elo credit card.
  • hipercard: Hipercard credit card.
  • mastercard: Mastercard credit card.
  • visa: Visa credit card.

payment.instalments

integer

The number of instalments of the payment (from 1 to 12). When using American Express is allowed only to use 1-6 instalments.

payment.creditcard

JSON

object Object containing the customers credit card information.

payment.creditcard.card_number

string

Credit card number.

payment.creditcard.card_name

string

Credit card cardholder name.

payment.creditcard.card_due_date

string

Credit card due date (“valid thru”) in the format mm/yyyy.

payment.creditcard.card_cvv

string

Credit card security code.

payment.creditcard.auto_capture

boolean

If true, the payment will be captured automatically by EBANX; if false, the payment will have to be captured by the merchant using the API method capture.

A successful request will return a JSON expression similar to the one below. Credit card payments for merchants with fraud checking enable will have status PE (pending), while for merchants that have fraud checking disabled and auto_capture set to true it will have status CO (confirmed).

Payments for companies

If you need to create a payment for a company a couple of extra parameters are need. The rest of the parameters will change depending on the chose payment method.

The following parameters are specific for payments created for companies:

payment.name

string

The company name (Razão social).

payment.document

string

The company CNPJ (taxpayer identification number). It must be a valid one.

payment.birth_date

string

The company founding date.

payment.person_type

string

The type of customer. Value must be business for companies.

payment.responsible

JSON object

Object containing the data of the person responsible for the payment.

payment.responsible.name

string

Responsible name.

payment.document

string

Responsible CPF (taxpayer identification number). It must be a valid one.

payment.birth_date

string

Responsible birthdate.

A successful request will return a JSON expression similar to the one below, which is the same response of a boleto request.