Pagaleve
Pagaleve is a Brazilian payment provider that offers installment payment solutions through PIX. This payment method allows customers to split their purchases into 4 biweekly installments, with the first payment made via PIX and subsequent installments automatically charged. This guide will walk you through the steps to integrate Pagaleve with EBANX's Direct API.
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.
- Webhook endpoint - HTTPS endpoint with valid SSL certificate to receive payment notifications.
How it works
Pagaleve enables installment payments through PIX for online purchases in Brazil. Here's how the process works when integrated with the EBANX API:
- Create checkout - Send a payment request to EBANX with the Pagaleve payment type code and customer information.
- Redirect customer - Redirect the customer to Pagaleve's checkout page using the URL provided in the response.
- First payment - The customer reviews the installment plan (4x biweekly) and completes the first payment via PIX.
- Webhook notification - Pagaleve sends a webhook to EBANX confirming the first payment was completed.
- Payment confirmation - EBANX updates the payment status from pending (PE) to confirmed (CO). If the payment is not completed within 2 hours, the status updates to cancelled (CA).
- Subsequent installments - Pagaleve automatically charges the remaining 3 installments on a biweekly schedule.
Steps:
- Customer requests payment to Merchant
- Merchant forward request to EBANX
- EBANX forward request to Pagaleve
- Pagaleve analyses credit and generate payment to Customer
- Customer approves payment
- Pagaleve Confirms payment and Transfers funds to EBANX/Merchant
The subsequent installments are automatic between customer and Pagaleve.
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/direct - Create a payment request
Once your customer selects Pagaleve at checkout, create a payment request using the /ws/direct endpoint.
Sample request
curl -X POST 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"operation": "request",
"mode": "full",
"payment": {
"amount_total": 100.00,
"currency_code": "BRL",
"merchant_payment_code": "order-12345",
"name": "João Silva",
"email": "joao.silva@example.com",
"birth_date": "12/04/1979",
"document": "85351346893",
"address": "Rua E",
"street_number": "1040",
"street_complement": "Sala 1",
"city": "Maracanaú",
"state": "CE",
"zipcode": "61919-230",
"country": "br",
"phone_number": "8522847035",
"payment_type_code": "pagaleve",
"notification_url": "https://your-webhook-url.com/notifications",
"redirect_url": "https://your-site.com/payment-complete"
}
}' - Handle the payment response
Each request returns a response similar to the example below.
{
"payment": {
"hash": "66f2f3b0c70e9c3a1b2d4e5f6a7b8c9d0e1f2a3b",
"country": "br",
"merchant_payment_code": "order-12345",
"order_number": null,
"status": "PE",
"status_date": null,
"open_date": "2025-10-23 10:30:00",
"confirm_date": null,
"transfer_date": null,
"amount_br": "100.00",
"amount_ext": "100.00",
"amount_iof": "0.00",
"currency_rate": "1.0000",
"currency_ext": "BRL",
"due_date": "2025-10-23",
"instalments": "1",
"payment_type_code": "pagaleve",
"redirect_url": "https://api.ebanx.com/ws/redirect/execute?hash=66f2f3b0c70e9c3a1b2d4e5f6a7b8c9d0e1f2a3b",
"pre_approved": false,
"capture_available": null
},
"status": "SUCCESS"
}At this stage, the payment will appear as pending (PE) in yourEBANX Dashboardchevron_right - Redirect customer to Pagaleve
Redirect the customer to the link provided in the response to complete the payment.
"redirect_url": "https://api.ebanx.com/ws/redirect/execute?hash=66f2f3b0c70e9c3a1b2d4e5f6a7b8c9d0e1f2a3b"The customer will be taken to Pagaleve's checkout page where they can review the installment plan and complete the first payment via PIX. The checkout expires after 2 hours if not completed.
- 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).
Refunds
-
Pagaleve payments can be refunded (full or partial) through the EBANX API.
-
- Congratulations!
You have successfully integrated Pagaleve.
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.