Skip to main content

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:

  1. Customer requests payment to Merchant
  2. Merchant forward request to EBANX
  3. EBANX forward request to Pagaleve
  4. Pagaleve analyses credit and generate payment to Customer
  5. Customer approves payment
  6. Pagaleve Confirms payment and Transfers funds to EBANX/Merchant

The subsequent installments are automatic between customer and Pagaleve.

Instructions

Follow the steps below.

  1. 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
  2. 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"
    }
    }'
  3. 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 your
    EBANX Dashboardchevron_right
  4. 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.

  5. Monitor payment for status changes

    Notifications

    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

  6. Congratulations!

    You have successfully integrated Pagaleve.

    For more information, refer to the
    Direct API reference guidechevron_right

Resources

Use the following resources when testing in your sandbox environment.

Still need help?

Help Image

We hope this article was helpful. If you still have questions, you can explore the following options: