Payment Page
This guide explains how to automate API requests for generating an EBANX Payment Page. If youโre new to this integration method, we recommend reviewing the EBANX Payment Page Product Info for a comprehensive overview. Please follow the instructions below to use this feature.
Requirementsโ
- API credentials - Ensure you have your EBANX integration key. If not, complete the Merchant Signup Form.
Instructionsโ
Follow the steps below.
Select your environment
Select the appropriate environment for your integration. Use the sandbox environment for testing, or the production environment for live transactions. Use the URL for your HTTP requests based on your selection.
https://sandbox.ebanx.com/ws/requestBase parameters
To redirect your customers to a payment page hosted by EBANX, you will need to send an HTTP request to /ws/request to obtain a Payment Page URL. When sending a request, some parameters are country specific. Use the selector below to view unique values for each country.
Select a country:โ
Parameter Description countryTwo-letter country code.br: brazilintegration_keyYour EBANX integration key. nameCustomer name. emailCustomer email address. payment_type_codeboleto: Boleto Bancรกrio_creditcard: Credit Cardsdebitcard: Debit Cardsmercadopago: Mercado Pagonupay: NuPaynupay-recurrent: NuPay Recurrentpaypal: PayPalpicpay: Picpaypix: Pix_all: All Payment Types
Select 1 or more individual payment methods, or select_all.For a complete list, see Payment Type Codes.currency_codeThe currency code of your transaction.BRL: Brazilian RealEUR: EurosUSD: US Dollars
amountTransaction amount, in the specified currency. E.g.,: 100.50 merchant_payment_codeUnique identifier for this payment (usually the order number from your system). Note: If you want to use
Eurosas the currency in your Payment Page or Direct API, please contact your sales engineer at sales.engineering@ebanx.com.Sample request
Use the following example to initiate a request.
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/request' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "****************", // Your EBANX integration_key
"name": "Josรฉ Silva",
"email": "josesilva@example.com",
"country": "br", // 2 digit country code.
"payment_type_code": "_all",
"merchant_payment_code": "0x0W26D05-T10",
"currency_code": "BRL",
"amount": 1000
}'Sample response
A successful request will return a JSON response similar to the example below. The redirection link, found in the
redirect_urlparameter, will guide your customers to the payment page.{
"payment": {
"hash": "5ef6208cc0ae84cee0a3850148e1417a0a2e70495c6b2807",
"country": "br",
"merchant_payment_code": "0x0W26D05-T10",
"order_number": null,
"status": "OP",
"status_date": null,
"open_date": "2020-06-26 16:21:31",
"confirm_date": null,
"transfer_date": null,
"amount_br": 1000,
"amount_ext": 996.2143853357243,
"amount_iof": 3.79,
"amount_ext_requested": "1000.00",
"currency_rate": 1,
"currency_ext": "BRL",
"due_date": "2020-06-29",
"instalments": 1,
"payment_type_code": "_all",
"pre_approved": false,
"capture_available": null
},
"redirect_url": "https://sandbox.ebanx.com/checkout?hash=5ef6208cc0ae84cee0a3850148e1417a0a2e70495c6b2807",
"status": "SUCCESS"
}The
redirect_urlcontains a url for redirecting customers to a web-based payment page.Redirect customer to Payment Page
Redirect your customer to the URL provided in the
redirect_urlfield, which will forward them to the EBANX Payment Page.{
"redirect_url": "https://sandbox.ebanx.com/checkout?hash=5ef6208cc0ae84cee0a3850148e1417a0a2e70495c6b2807",
}Example screenshot of a payment page (redirect_url) in Brazil.

Confirmation
Once your customer completes the purchase, they will be redirected to a "Thank You" page similar to the one below, with an option to return to your website.
Example Screenshot of Thank You Page.

If the customer does not complete payment, the transaction will automatically cancel after a predefined period.
infoYou can configure the return URL in your EBANX dashboard, or include it as the
redirect_urlparameter in the/ws/requestAPI call.Congratulations!
You have succesfully generated an EBANX hosted Payment Page.
Resourcesโ
Use the following resources when testing in your sandbox environment.
Sample Cards
Click here to view mock card data to validate your payment integration.
API Reference
Click here to access detailed API documentation to integrate efficiently.
Mock Customer Data
Click here to view mock customer data for testing and validating user flows.
Error Codes
Click here to review common error codes to troubleshoot and resolve issues quickly.
Still need help?
We hope this article was helpful. If you still have questions, you can explore the following options:
- Merchant support: Contact our support team at sales.engineering@ebanx.com for assistance.
- Not a partner yet? Please complete the Merchant Signup Form, and our commercial team will reach out to you.