# Servipag

> Accept one-time Servipag payments through Checkout or the Web SDK, and confirm the final result on your server.

## Basic information

Servipag lets customers in Chile pay using the instructions provided on the payment page.

- Integration paths: [Checkout](/payments/versions/v2/online-payments/checkout), [Web SDK](/payments/versions/v2/online-payments/sdk), [Direct API](/payments/versions/v2/online-payments/api) (only after Onerway confirms availability)
- Transaction type: One-time payment
- `lpmsInfo.lpmsType`: `Servipag`
- Web SDK `config.paymentMethod`: `['Servipag']`

| 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. The Direct API instructions apply only after Onerway confirms that this path is currently available for your merchant application, and cover customers whose actual billing country is CL, with customer details supplied in advance.

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](/payments/versions/v2/api-reference/endpoints/list-available-payment-methods) to check the current order.

## Before you begin

Complete [Setup](/payments/versions/v2/get-started/setup) and confirm with Onerway that Servipag 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](/payments/versions/v2/get-started/currency-and-amount).

Collect accurate customer billing details and submit them in `billingInformation` when creating the payment. Use the customer’s actual billing country. Configure your server notification URL and customer return URL, and store the mapping between your order and `paymentId`.

## 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 or the Web SDK as described below.

For this Direct API path, collect the customer’s billing name, email, phone, actual country, and full address before creating the payment. Also collect the customer’s identity identifier; confirm its accepted type and format for your enabled configuration 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 Direct API path. Supply the identity identifier in `identityNumber`, using the type and format confirmed for your enabled configuration. 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 Direct API path 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 Direct API path; do not change it to select a payment route.

1. Check [List available payment methods](/payments/versions/v2/api-reference/endpoints/list-available-payment-methods) for the current order. After the customer selects this method, call [Create direct transaction](/payments/versions/v2/api-reference/endpoints/direct-create-transaction) from your server with `productType=LPMS`, `subProductType=DIRECT`, `txnType=SALE`, and `paymentMode=WEB`. Set `lpmsType=Servipag` in [`lpmsInfo`](/payments/versions/v2/api-reference/endpoints/direct-create-transaction#request-lpmsInfo), encoded as a JSON string.
2. Supply the customer details listed for this Direct API path 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`](/payments/versions/v2/api-reference/endpoints/direct-create-transaction#request-txnOrderMsg). Keep product and order currencies consistent, with product amounts, discounts, and shipping fees adding up to `orderAmount`.<br />Select the request example “Redirect local payment request (illustrative)”. It uses Bancontact / BE / EUR to show the shared structure. Replace the method with `Servipag`, use CLP for this flow, and supply the actual order and all billing details listed above, including the customer’s actual billing country (CL) and the identity identifier described above. 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](/payments/versions/v2/online-payments/payment-methods/local-payment-methods#handle-the-customer-action). 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 authentication](/payments/versions/v2/get-started/authentication) for authentication.

### Checkout

When locking Checkout to this method, first check [List available payment methods](/payments/versions/v2/api-reference/endpoints/list-available-payment-methods) for the current order. When Checkout displays all available methods, Onerway performs this filtering.

1. On your server, call [Create checkout payment](/payments/versions/v2/api-reference/endpoints/create-checkout-payment) with `productType=ALL`, `subProductType=DIRECT`, and `txnType=SALE`. To show only Servipag, set [`lpmsInfo.lpmsType`](/payments/versions/v2/api-reference/endpoints/create-checkout-payment#request-lpmsInfo) to `Servipag`, 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`.<br />Select the request example “Unified Checkout with all available payment methods”, replace the order and customer details, and add this method's `lpmsInfo` if you want to select only this method. Use CLP for this flow and remove the example’s `cardInfo` object.
For this flow, also include the collected `firstName`, `lastName`, and [`identityNumber`](/payments/versions/v2/api-reference/endpoints/create-checkout-payment#request-billingInformation-identityNumber) in `billingInformation`, along with the customer’s `email` and `country`.
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](/payments/versions/v2/api-reference/endpoints/query-transactions). For request authentication, redirects, and return handling, see [Checkout integration](/payments/versions/v2/online-payments/checkout).

### Web SDK

Keep the SDK payment-method interface and provide the customer details for this flow when creating the transaction. Submit `firstName`, `lastName`, `email`, `country`, and `identityNumber` in [`billingInformation`](/payments/versions/v2/api-reference/endpoints/sdk-create-transaction#request-billingInformation), encoded as a JSON string. Follow the API conditions for other fields. The linked “One-time SDK payment” example omits these billing details; add them when implementing this flow.

1. On your server, call [Create SDK transaction](/payments/versions/v2/api-reference/endpoints/sdk-create-transaction) with `productType=ALL`, `subProductType=DIRECT`, and `txnType=SALE`. Select the request example “One-time SDK payment” and the response example “One-time SDK transaction created”. These examples show the shared creation flow before a payment method is selected. Replace the amount, currency, and product details with the actual order, keeping the product and order currencies consistent.
2. Initialize Checkout with the returned `paymentId`, following [Web SDK integration](/payments/versions/v2/online-payments/sdk). To display only this method, set `config.paymentMethod` to `['Servipag']` in the initialization options. Then subscribe to events and mount the Payment Element. This configuration only filters methods returned by the server; it does not enable Servipag.
3. In the `ready` event, check that `availablePaymentMethods` contains `Servipag`.
4. After the customer selects Servipag and completes the form, call `confirmPayment()` from your payment button. Handle the actual `paymentStatus` and `nextAction` returned. For the complete event and error handling flow, see [Web SDK integration](/payments/versions/v2/online-payments/sdk).

With the Web SDK, `paymentStatus=R` means that customer interaction must continue. Handle the actual `nextAction.type` returned:

- `PresentToShopper`: keep the current SDK Checkout instance and leave its Payment Element mounted while the SDK presents the payment interface, wait for `payment_result`, and do not call `confirmPayment()` again.
- `RedirectShopper`: wait for the customer to reach the `returnUrl` supplied when creating the order, then query the order on your server. Initially show that the result is being confirmed.

## Customer actions and final result

Customers open the Servipag payment voucher and check its payment reference, amount, and any payment deadline. They follow the payment options and instructions shown for that voucher. Your application does not construct the voucher or its payment reference.

Generating the voucher or returning to your site does not establish payment success. Keep the order awaiting payment until your server confirms the result. Confirm the applicable validity period and notification timing with Onerway before going live; do not promise immediate confirmation after the customer pays.

Process the order on your server using a signature-verified [payment result webhook](/payments/versions/v2/api-reference/webhooks/payment-result). If the notification has not arrived or you need to check the result, call [Query payments](/payments/versions/v2/api-reference/endpoints/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](/payments/versions/v2/get-started/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](/payments/versions/v2/online-payments/scenarios/refunds).

## Testing and go-live

Confirm the test environment, available Servipag test procedure, and customer test data with Onerway, then follow [Sandbox testing](/payments/versions/v2/get-started/testing):

1. Create an order using an enabled country, CLP, and your test amount, supplying the customer billing details for this flow. For Checkout, confirm that it opens `redirectUrl` and displays `Servipag`. When using the Web SDK, check that `ready.availablePaymentMethods` contains `Servipag`. For the Direct API, use the details listed in its section, including the actual CL billing country, and confirm that `R + RedirectURL` opens the payment page.
2. Open the Servipag voucher, verify the amount and payment instructions, and complete the agreed voucher-payment test. 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. Test an unpaid voucher and a return to your site before payment. If the voucher has a payment deadline, also test the agreed expiry handling. 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.
