This guide explains how to integrate PagoFacil, a widely-used cash payment method in Argentina, with the EBANX Direct API. PagoFácil allows customers to finalize transactions by paying in person at designated locations, making it an essential option for Argentinian customers who prefer or rely on cash payments.
Requirements
- API credentials - Ensure you have your EBANX integration key. If not, complete the Merchant Signup Form.
- Familiarity with EBANX Direct - This setup follows the same general structure as other payment methods, with a few unique parameters. See EBANX Direct for more info.
How it works
PagoFácil works as a cash-based payment method for online purchases in Argentina. Here’s how the process generally works when integrated with the EBANX API:
- Generate the payment - During checkout, customers select PagoFácil as their payment method. A payment request is sent to EBANX, which generates a voucher containing details like the payment amount, due date, and a unique barcode or reference code.
- Voucher presentation - The customer receives a URL to view and print the PagoFácil voucher, which includes the payment instructions.
- In-person payment - The customer visits a PagoFácil location with the printed voucher or a digital copy and pays the specified amount in cash. PagoFácil agents scan the barcode or reference code to confirm the payment amount.
- Payment confirmation - Once PagoFácil processes the payment, EBANX receives a confirmation update, changing the payment status from pending (PE) to confirmed (CO) in the EBANX system. If the customer does not pay by the voucher’s due date, the payment status will automatically be updated to canceled (CA). Once the payment is canceled, the customer will no longer be able to pay using the same voucher.
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/directCreate a PagoFácil link
PagoFácil operates as a voucher-based payment method, so you’ll need to redirect your customer to a page displaying the voucher details. To obtain this redirection link, call the ws/direct endpoint with the required parameters.
You must provide required parameters for payment requests. These parameters ensure successful completion of transactions.Defining API parameters
Essential parameters
payment.payment_type_code
- Specifies the payment method to be used for the transaction.payment.currency_code
- Three-letter code of the payment currency.payment.amount_total
- Total amount to be charged.
Additional parameters
- EBANX Integration Key - Used to authenticate and authorize API requests.
- Customer Information
- Includes details such as the customer name, email, address and document number (Depends on the requirements of the payment method or local regulations).
- While not mandatory for all countries or payment methods, providing this information can enhance security and increase the likelihood of successful processing.
- Additional Context - Extra data for specific methods or countries.
To learn more about API parameters, please refer to theAPI Reference Guide chevron_rightAt the API Reference Guide, select Argentina and PagoFácil from the dropdown menues.
Sample request
Use the following example to initiate a request.
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"operation": "request",
"payment": {
"name": "José Silva",
"email": "random@example.com",
"document": "23876543214",
"country": "ar",
"payment_type_code": "pagofacil",
"merchant_payment_code": "0x0W28D03-AR-T04", // Unique merchant identifier
"currency_code": "ARS",
"amount_total": "100"
}
}'Sample response
The voucher URL will be in the parameter
payment.voucher_url
.{
"payment": {
"hash": "67535c250d65f947202b432d982377b065d0b8e2df45ce75",
"country": "ar",
"merchant_payment_code": "0x0W28D03-AR-T04",
"order_number": null,
"status": "PE",
"status_date": null,
"open_date": "2024-12-06 20:18:45",
"confirm_date": null,
"transfer_date": null,
"amount_br": "100.00",
"amount_ext": "100.00",
"amount_iof": "0.00",
"currency_rate": "1.0000",
"currency_ext": "ARS",
"due_date": "2024-12-09",
"instalments": "1",
"payment_type_code": "rapipago",
"voucher_url": "https:\/\/sandbox.ebanxpay.com\/print\/voucher\/execute?hash=67535c250d65f947202b432d982377b065d0b8e2df45ce75",
"pre_approved": false,
"capture_available": null
},
"status": "SUCCESS"
}At this stage, the payment will appear as pending (PE) in yourEBANX Dashboardchevron_rightRedirect customer to voucher URL
Redirect your customer to the URL provided in the
voucher_url
parameter. Once redirected, they will be able to view or print the voucher.Sample voucher:
Monitor payment for status changes
Notifications
EBANX will send a notification whenever a payment status changes.
Make sure your system is set up to receive notifications from EBANX for any changes in payment status.
Status
After receiving a notification, retrieve the payment status.
When a payment is confirmed, the status will change from pending (PE) to confirmed (CO). If the customer does not complete the payment, the status will automatically update to cancelled (CA).
Congratulations!
You have succesfully integrated PagoFácil.
For more information, refer to theDirect API reference guidechevron_right
Resources
Use the following resources when testing in your sandbox environment.
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.