Skip to main content
Webpay

Webpay is one of the most popular payment gateways in Chile, and allows customers to make secure online payments using credit or debit cards. Webpay integrates directly with local banks and financial institutions, ensuring a seamless payment experience for Chilean customers. It is a trusted, widely adopted payment method in Chile, offering secure card payments for a variety of online purchases. By integrating Webpay through EBANX, you can tap into the Chilean market with a payment option that local consumers trust.

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.

How it works

  • Customer selects Webpay - At checkout, your customer chooses Webpay as their payment method.
  • Enter card details - Your customer is redirected to Webpay’s secure payment page, where they enter their credit or debit card information.
  • Transaction processing - Webpay processes the payment through its network of local banks and financial institutions in real time. Users must enter their homebanking and accept the payment using their bank credential. Every Bank has their own user authentication method.
  • Payment confirmation - Once the transaction is approved, Webpay confirms the payment, and EBANX updates the transaction status.
  • Merchant notified - EBANX notifies you of the successful payment, allowing you to fulfill your order.

This process ensures secure and seamless card payments for customers in Chile.

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. Define your parameters

    With Webpay, customers are redirected to a secure third-party website to complete the payment quickly and safely. To obtain this redirection link, call the ws/direct endpoint with the required parameters.


    Defining API parameters

    You must provide required parameters for payment requests. These parameters ensure successful completion of transactions.

    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 the
    API Reference Guide chevron_right

    At the API Reference Guide, select Chile and Webpay from the dropdown menues.

  3. 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": "josechile@example.com",
    "country": "cl",
    "payment_type_code": "webpay",
    "merchant_payment_code": "0x0W28D03-CL-T07",
    "currency_code": "PEN",
    "amount_total": "500"
    }
    }'
  4. Sample response

    A successful request returns a response like the example below, with the third-party website link provided in the payment.redirect_url parameter.

    {
    "payment": {
    "hash": "5efded178fb076acee48b51822375075a7a8f5850241de57",
    "country": "cl",
    "merchant_payment_code": "0x0W28D03-CL-T07",
    "order_number": null,
    "status": "PE",
    "status_date": null,
    "open_date": "2020-07-02 14:20:07",
    "confirm_date": null,
    "transfer_date": null,
    "amount_br": "500.00",
    "amount_ext": "500.00",
    "amount_iof": "0.00",
    "amount_ext_requested": "500.00",
    "currency_rate": "1.0000",
    "currency_ext": "CLP",
    "due_date": "2020-07-05",
    "instalments": "1",
    "payment_type_code": "webpay",
    "redirect_url": "https://sandbox.ebanx.com/ws/redirect/execute?hash=5efded178fb076acee48b51822375075a7a8f5850241de57",
    "pre_approved": false,
    "capture_available": null
    },
    "status": "SUCCESS",
    "redirect_url": "https://sandbox.ebanx.com/ws/redirect/execute?hash=5efded178fb076acee48b51822375075a7a8f5850241de57"
    }

    At this stage, the payment will appear as pending (PE) in your
    EBANX Dashboardchevron_right
  5. Redirect customer to the returned URL

    Redirect your customer to the URL returned in the parameter redirect_url. After the redirection, your customer will be at a third-party website with all the necessary purchase details to finalize their payment securely and easily.

    Testing Webpay in a sandbox environment

    In our Sandbox environment, we provide a Webpay simulation interface to test bank transfer payments. This mock interface allows you to simulate different payment outcomes:

    • Simulate Authorized = YES: Confirms the payment as successful.
    • Simulate Authorized = NO: Denies the payment.
    • Leave Pending: Leaves the payment in a pending state.

    This simulation mimics the real production flow, where users are redirected to their Internet Banking to complete transactions, enabling you to thoroughly test authorized and unauthorized payments.

    Webpay
  6. Monitor payment for status changes

    Notifications

    Status

    • After receiving a notification that status has changed, 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 eventually change to cancelled (CA).

  7. Congratulations!

    You have succesfully integrated Webpay.

    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: