Webpay
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/region | Order currency |
|---|---|
| 🇨🇱 CL | CLP |
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.
- 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, andpaymentMode=WEB. SetlpmsType=WebpayinlpmsInfo, encoded as a JSON string. - Supply the customer details prepared above in
billingInformation, and follow the API requirements forshippingInformation. Encode both as JSON strings. Include products, notification and return URLs, and merchant-collected end-user IP, browser, and device information intxnOrderMsg. Keep product and order currencies consistent, with product amounts, discounts, and shipping fees adding up toorderAmount.
Select the request example “Redirect local payment request (illustrative)”. It uses Bancontact / BE / EUR to show the shared structure. Replace the method withWebpay, 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. - Store the returned
paymentIdandtransactionId. Whenstatus=RandactionType=RedirectURL, redirect the customer’s browser toredirectUrl. 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. - 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 authentication for authentication.
Checkout
- On your server, call Create checkout payment with
productType=ALL,subProductType=DIRECT, andtxnType=SALE. To show only Webpay, setlpmsInfo.lpmsTypetoWebpay, sendinglpmsInfoas a JSON string. If you omitlpmsInfo, the customer chooses from the methods available for the order. - Supply the billing, shipping, product, return URL, and notification URL fields required by the API. Encode
billingInformationandshippingInformationas 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 toorderAmount.
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’slpmsInfoif you want to select only Webpay. Remove the example’scardInfoobject; the provider’s page collects card details for this flow. - Select the response example “Unified Checkout session created”. Store the returned
paymentIdandtransactionIdagainst your order, then redirect the customer's browser toredirectUrl. The initialstatus=Umeans that payment has not been completed. - 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 request authentication, 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:
- 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
redirectUrlopens Checkout and Webpay is available before proceeding to the payment page. - 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.
- 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.
- 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.