This page's content:

Payment Page API

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

The following parameters are mandatory for Peruvian payment methods using EBANX Payment Page. Depending on your business model, more information can be required for a payment request:

integration_key string

Your unique and secret integration key.

name string

Customer name.

email string

Customer email address.

country string

Two-letter country code pe for Peru.

payment_type_code string

The customer chooses the payment method. Supported values:

  • _all: all available payment methods for the merchant account in this country.
  • pagoefectivo: PagoEfectivo.
  • safetypay: SafetyPay, will offer the customer to choose between SafetyPay Cash and SafetyPay Online.
  • _creditcard: Credit card payment.
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: PEN, 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 Payment Page 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 Peruvian payment methods using EBANX Direct. Depending on your business model, more information can be required for a payment request:

integration_key string

Your unique and secret integration key.

payment.name string

Customer name.

payment.email string

Customer email address.

payment.phone_number string

Customer phone number with area code.

payment.country string

Two-letter country code - pe for Peru.

payment.payment_type_code string

The customer chooses the payment method. Supported values:

  • pagoefectivo: PagoEfectivo.
  • safetypay-cash: SafetyPay Cash.
  • safetypay-online: SafetyPay Online.
  • creditcard: Credit card payment method.
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: PEN, USD

payment.amount_total float

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

PagoEfectivo – Direct API

The following parameters are specific to the PagoEfectivo payment method. Depending on your business model, more information can be required for a payment request:

payment.payment_type_code string

Value must be pagoefectivo for PagoEfectivo payments.

A successful request will return a JSON expression similar to the one below. The PagoEfectivo link will be the value of payment.cip_url.

SafetyPay – Direct API

The following parameters are specific to the SafetyPay payment method. Depending on your business model, more information can be required for a payment request:

payment.payment_type_code string

The payment method chosen by the customer. Supported values:

  • safetypay-cash: SafetyPay Cash.
  • safetypay-online: SafetyPay Online.

A successful request will return a JSON expression similar to the one below. You will need to redirect the customer to redirect_url – he’ll then be automatically redirected to SafetyPay’s website.

Credit card – Direct API

The following parameters are specific for the credit card payment method. Depending on your business model, more information can be required for a payment request:

payment.payment_type_code string

The value must be creditcard for credit card payments.

payment.instalments integer

The number of instalments* of the amount (from 1 to 48).

payment.creditcard JSON

An object containing the customer’s 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.