This guide details how to integrate Pagosnet into your existing EBANX Direct API setup. Pagosnet is a cash-based payment option that enables customers to complete online transactions by paying in cash at authorized physical locations. Integrating Pagosnet with the EBANX Direct API provides a convenient, accessible solution for customers who prefer or require cash payments, expanding payment flexibility and accessibility.
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 Direct API Guide for more info.
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 Pagosnet link
Pagosnet 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 Bolivia and Pagosnet 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": "joseperu@example.com",
"phone_number": "0405777687",
"country": "bo",
"payment_type_code": "pagosnet",
"merchant_payment_code": "0x0W28D03-BO-T02", // Must be unique.
"currency_code": "BOB",
"amount_total": "100"
}
}'Sample response
The voucher URL will be in the parameter
payment.voucher_url
.{
"payment": {
"hash": "6746074f71526c3d2c0374bcf1944305a2f48926c6a3e342",
"country": "bo",
"merchant_payment_code": "0x0W28D03-BO-T02",
"order_number": null,
"status": "PE",
"status_date": null,
"open_date": "2024-12-06 20:55:41",
"confirm_date": null,
"transfer_date": null,
"amount_br": "100.00",
"amount_ext": "100.00",
"amount_iof": "0.00",
"amount_ext_requested": "100.00",
"currency_rate": "1.0000",
"currency_ext": "BOB",
"due_date": "2024-12-09",
"instalments": "1",
"payment_type_code": "pagosnet",
"voucher_url": "https://sandbox.ebanxpay.com/print/voucher/execute?hash=6746074f71526c3d2c0374bcf1944305a2f48926c6a3e342",
"pre_approved": false,
"capture_available": null,
"customer": {
"document": "",
"email": "joseperu@example.com",
"name": "JOSE SILVA",
"birth_date": null
},
"single_transaction": {
"amount_local": "0.00",
"amount_crossborder": "100.00"
}
},
"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 PagosNet.
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.