Onerway
Payment methods

Webpay

Accept one-time Webpay payments with Checkout using customer billing details collected in advance, and confirm the result on your server.

Basic information

Webpay lets customers in Chile pay through a hosted card payment page.

  • Integration paths: Checkout, Direct API (only after Onerway confirms availability)
  • Transaction type: One-time payment
  • lpmsInfo.lpmsType: Webpay
Customer country/regionOrder currency
🇨🇱 CLCLP

The customer country/region is the billingInformation.country value in the payment request.

This guide covers enabled configurations and applies when you have collected the customer’s billing name, email, country, and government-issued identity identifier before creating the payment, as described in Before you begin. Before integrating another market or using another order currency, confirm the enabled scope for your merchant account and application with Onerway, then use List available payment methods to check the current order.

Before you begin

Complete Setup and confirm with Onerway that Webpay is enabled. Also confirm the customer identity requirements, applicable transaction limits, payment validity period, and settlement arrangements. For amount formatting, see Currency and amount validation.

For this flow, collect the customer’s billing name, email, phone, actual country, and full address before creating the payment. Confirm the accepted identity document type and format with Onerway. Supply shipping details according to the API conditions. Configure your server notification URL and customer return URL, and store the mapping between your order and the Onerway identifiers.

Supply the collected firstName, lastName, email, country, phoneCountryCode, phone, address, city, province, street, number, and postalCode in billingInformation. Supply the full billing address in address; the separate address fields do not replace it in this flow. For this flow, also supply the customer’s identity number in identityNumber as a string in the agreed format. Follow the public API format: phoneCountryCode contains digits without +, and phone contains the local number without its country code. Use street for the street name, number for the house or building number, and province for the ISO 3166-2 subdivision code. This guide supplies these details in advance; it does not rely on the payment page collecting missing information. The billing and shipping objects must still satisfy the API field conditions. The customer’s actual billing country must be CL for this flow; do not change it to select a payment route.

Start the payment

Direct API

Use this path only after Onerway has explicitly confirmed Direct API availability for your merchant application. Method enablement or availability in Checkout does not establish Direct API availability. Until this is confirmed, use Checkout as described below.

  1. Check List available payment methods for the current order. After the customer selects this method, call Create direct transaction from your server with productType=LPMS, subProductType=DIRECT, txnType=SALE, and paymentMode=WEB. Set lpmsType=Webpay in lpmsInfo, encoded as a JSON string.
  2. Supply the customer details prepared above in billingInformation, and follow the API requirements for shippingInformation. Encode both as JSON strings. Include products, notification and return URLs, and merchant-collected end-user IP, browser, and device information in txnOrderMsg. Keep product and order currencies consistent, with product amounts, discounts, and shipping fees adding up to orderAmount.
    Select the request example “Redirect local payment request (illustrative)”. It uses Bancontact / BE / EUR to show the shared structure. Replace the method with Webpay, use CLP for this flow, and supply the actual order and all billing details listed above, including the actual CL country and the agreed identity number. The example amount does not establish a transaction limit.
  3. Store the returned paymentId and transactionId. When status=R and actionType=RedirectURL, redirect the customer’s browser to redirectUrl. The response example “Redirect local payment response (illustrative)” shows this shape. For other actions or states, follow Local payment integration. Do not repeatedly create the same order while waiting.
  4. The provider’s page guides the customer through payment. When the customer returns to your site, display the result retrieved from your server. See Request signing for authentication.

Checkout

  1. On your server, call Create checkout payment with productType=ALL, subProductType=DIRECT, and txnType=SALE. To show only Webpay, set lpmsInfo.lpmsType to Webpay, sending lpmsInfo as a JSON string. If you omit lpmsInfo, the customer chooses from the methods available for the order.
  2. Supply the billing, shipping, product, return URL, and notification URL fields required by the API. Encode billingInformation and shippingInformation as JSON strings, including the required email and country for each. Keep product and order currencies consistent and ensure that product amounts, discount entries, and shipping fees add up to orderAmount.
    Select the request example “Unified Checkout with all available payment methods”. Replace the order and customer details, use CLP, and supply all billing details listed above. Add this method’s lpmsInfo if you want to select only Webpay. Remove the example’s cardInfo object; the provider’s page collects card details for this flow.
  3. Select the response example “Unified Checkout session created”. Store the returned paymentId and transactionId against your order, then redirect the customer's browser to redirectUrl. The initial status=U means that payment has not been completed.
  4. Onerway Checkout handles the payment page and customer payment interaction. When the customer reaches returnUrl, retrieve the order result from your server. If no notification has arrived, use the stored transaction identifier to Query transactions. For signing, redirects, and return handling, see Checkout integration.

Customer actions and final result

Customers select a card payment option offered on the Webpay page, review the payment, and follow the issuer’s authentication and authorization steps. The payment page collects card details and handles authentication; your application does not collect the customer’s card details or authentication credentials for either flow described here.

When customers return to your site, show that the result is being confirmed and retrieve the order result from your server. Closing the payment page or canceling the interaction does not by itself determine the final order status.

Process the order on your server using a signature-verified payment result webhook. If the notification has not arrived or you need to check the result, call Query payments with the stored paymentId. Fulfill the order only after your server confirms a successful payment. For verification, acknowledgement, idempotency, and query fallback, see Webhooks.

Refunds and disputes

Before integration, confirm the refund capabilities, restrictions, and dispute process applicable to your merchant with Onerway. If refunds are enabled, follow Refunds.

Testing and go-live

Confirm the test environment, available Webpay test procedure, and customer test data with Onerway, then follow Sandbox testing:

  1. Test each path you use with CLP, the customer’s actual CL billing country, and the details described above. For the Direct API, check that the returned redirect opens the payment page. For Checkout, check that the first redirectUrl opens Checkout and Webpay is available before proceeding to the payment page.
  2. Select Webpay and complete the agreed card-payment test, including issuer authentication and authorization where the test environment supports them. Confirm the result on your server before updating the order; merely opening the payment page does not pass the successful-payment check. For go-live acceptance, retain the notification and acknowledgement for the same order, then make an active query to verify that the results agree.
  3. Cancel or close the payment page before completing payment and test the return to your site. Confirm that a return to your site alone never marks the order as paid, and test query fallback when no notification has arrived.
  4. Verify idempotent handling of duplicate notifications. Before going live, check production enablement, notification and return URLs, limits, and validity periods. Test refunds separately if they are enabled.