# PagosNet

> Onerway does not currently support the payment-method code Pagosnet. Do not use it for new payments.

## Current support status

<warning>

Onerway currently does not support the payment-method code `Pagosnet`. Do not use it for new payments. All integration instructions below are historical reference for existing records and do not indicate current availability.

</warning>

When reviewing an existing record, retain its original payment-method code, Onerway `paymentId` and `transactionId`, and your order reference. To select another method, check [available payment methods](/payments/versions/v2/api-reference/endpoints/list-available-payment-methods) for the order.

## Basic information

This guide covers enabled one-time PagosNet payments through the Direct API or [Checkout](/payments/versions/v2/online-payments/checkout), for customers whose actual billing country is 🇧🇴 BO and orders in BOB. You supply customer details before creating the payment. The customer opens a payment voucher page and follows its instructions to pay.

The `lpmsInfo.lpmsType` value is `Pagosnet`. PagosNet includes cash and bank-payment options; the options available for a payment depend on its voucher page. Do not assume that every payment offers both. Before using another market or order currency, confirm the enabled scope for your merchant account and application with Onerway, then check the current order with [List available payment methods](/payments/versions/v2/api-reference/endpoints/list-available-payment-methods).

## Before you begin

Complete [Setup](/payments/versions/v2/get-started/setup) and confirm that PagosNet is enabled. Also confirm transaction limits, the applicable payment validity period, settlement arrangements, and the test procedure. For amount formatting, see [Currency and amount validation](/payments/versions/v2/get-started/currency-and-amount).

For this flow, collect the customer’s billing name, email, phone number, and complete address before creating the payment. If your enabled configuration requires an identity identifier, confirm its accepted type and format with Onerway and supply it in `identityNumber`. Configure your server notification URL and customer return URL, and store the mapping between your order and the Onerway identifiers.

Supply `firstName`, `lastName`, `email`, `phoneCountryCode`, `phone`, `country`, `address`, `street`, `number`, `postalCode`, `province`, and `city` in `billingInformation`. This flow requires the customer’s actual billing country to be BO; do not change a customer’s country to select a payment route. Put the full billing address in `address`; the separate address fields do not replace it. Use `street` for the street name, `number` for the house or building number, and `province` for the ISO 3166-2 subdivision code. Follow the public API phone format: `phoneCountryCode` contains digits without `+`, and `phone` contains the local number without its country code.

This guide supplies these details in advance and does not rely on the payment page collecting missing information. Billing, shipping, and product details must still meet the API field conditions.

## Start the payment

### Direct API

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=Pagosnet` in [`lpmsInfo`](/payments/versions/v2/api-reference/endpoints/direct-create-transaction#request-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`](/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 `Pagosnet`, use BOB for this flow, and supply the actual order and all billing details listed above, with the actual BO country and any identity details required by your configuration. 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 call [List available payment methods](/payments/versions/v2/api-reference/endpoints/list-available-payment-methods) for the current order and confirm that the method is returned. 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 PagosNet, set [`lpmsInfo.lpmsType`](/payments/versions/v2/api-reference/endpoints/create-checkout-payment#request-lpmsInfo) to `Pagosnet`, sending `lpmsInfo` as a JSON string. If you omit `lpmsInfo`, the customer chooses from the methods available for the order.
2. Supply the customer details prepared above, along with the required shipping, product, return URL, and notification URL fields. Encode [`billingInformation`](/payments/versions/v2/api-reference/endpoints/create-checkout-payment#request-billingInformation) and `shippingInformation` as JSON strings. 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 details and supply all billing details listed above, with the actual BO country and any identity details required by your configuration. Use BOB for this flow, and add this method’s `lpmsInfo` if you want to select only PagosNet. Remove `cardInfo` from the example for this flow. The example shows the shared Checkout request structure.
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. Checkout handles the payment page and subsequent customer interaction. When the customer reaches `returnUrl`, display the result retrieved from your server. For request authentication, redirects, and return handling, see [Checkout integration](/payments/versions/v2/online-payments/checkout).

## Customer actions and final result

When a redirect is required, send the customer to the returned `redirectUrl`. The customer opens the payment voucher page, checks the payment details and amount, and follows the payment instructions shown there. The available payment options, any payment reference, and any displayed deadline apply to that payment. Your application does not generate the voucher or retrieve payment-reference fields from the API response.

Opening a voucher, initiating payment, or returning to your site does not establish that payment succeeded. Keep the order pending until your server obtains the result. Your application should not collect the customer’s banking credentials or verification codes.

Process the order using a signature-verified [payment result webhook](/payments/versions/v2/api-reference/webhooks/payment-result). If no notification has 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

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 and available PagosNet test procedure with Onerway, then follow [Sandbox testing](/payments/versions/v2/get-started/testing):

1. Test each path you use with BOB, the customer’s actual BO billing country, and the customer details prepared above. For the Direct API, confirm that the returned redirect opens the payment voucher page. For Checkout, confirm that the first `redirectUrl` opens Checkout and that PagosNet is available before proceeding to the provider’s page.
2. Check the payment instructions, order amount, and any displayed deadline on the provider’s page. Complete the agreed PagosNet payment test and verify the result on your server. Merely obtaining payment details does not pass the successful-payment check.
3. Test an order for which the customer has not completed payment and a return to your site before payment. If a deadline is displayed, also test the agreed expiry handling. Verify query fallback when no notification has arrived and idempotent handling of duplicate notifications.
4. For go-live acceptance, retain the notification and acknowledgement for the same order. Query the payment status and check that it matches the notification. Check production enablement, notification and return URLs, limits, and validity periods. Test refunds separately if they are enabled.
