# Swish

> Accept one-time Swish payments in Sweden, handle customer actions, and confirm the server-side result.

## Basic information

Customers confirm Swish payments in the Swish app.

- Integration paths: [Checkout](/payments/versions/v2/online-payments/checkout), [Direct API](/payments/versions/v2/online-payments/api)
- Transaction type: One-time web payment
- `lpmsInfo.lpmsType`: `SWISH`

| Customer country/region | Transaction currency |
| --- | --- |
| 🇸🇪 SE — Sweden | SEK |

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

## Before you begin

Complete [Setup](/payments/versions/v2/get-started/setup), confirm that Swish is enabled for your merchant application, and prepare a server endpoint to receive payment notifications. When building your own method list or restricting payment to one method, [query available payment methods](/payments/versions/v2/api-reference/endpoints/list-available-payment-methods) for the order context.

The currency listed here is the transaction currency. Confirm your account's transaction limits, settlement currencies, and settlement arrangements with Onerway. See [Currency and amount validation](/payments/versions/v2/get-started/currency-and-amount) for amount formatting.

## Create a payment

For Checkout, call [Create Checkout Payment](/payments/versions/v2/api-reference/endpoints/create-checkout-payment) with `productType=ALL`, `subProductType=DIRECT`, `txnType=SALE`, and `orderCurrency=SEK`. To show only Swish, set `lpmsInfo.lpmsType` to `SWISH`, sending `lpmsInfo` as a JSON string. If you omit `lpmsInfo`, the customer chooses from the methods available for the order. Supply the customer's billing and shipping details according to the API conditions.

Select the request example **Unified Checkout with all available payment methods**, replace its order and customer details, add `lpmsInfo` when preselecting Swish, and remove `cardInfo` for this flow. Save the returned `paymentId` and `transactionId`, then redirect the customer's browser to `redirectUrl`. The response example **Unified Checkout session created** shows this structure; the initial `status=U` means the payment is unpaid. See [Checkout integration](/payments/versions/v2/online-payments/checkout) for request authentication and return handling.

For the Direct API, call [Create direct transaction](/payments/versions/v2/api-reference/endpoints/direct-create-transaction) with `productType=LPMS`, `subProductType=DIRECT`, `txnType=SALE`, `paymentMode=WEB`, `lpmsInfo.lpmsType=SWISH`, and `orderCurrency=SEK`. Follow the API reference for the complete required fields and authentication requirements.

For the Direct API, select the request example **Redirect local payment request (illustrative)**. Replace `Bancontact` with `SWISH`, set `orderCurrency=SEK`, and supply the customer's actual country and the other required order and billing details. Encode `lpmsInfo`, `billingInformation`, and `shippingInformation` as JSON strings. Include the merchant-collected end-user IP, browser, and device information in `txnOrderMsg`. Keep product and order currencies consistent, with amounts, discounts, and shipping fees adding up to `orderAmount`.

## Customer action and final result

Save the Direct API response’s `paymentId` and `transactionId`. When `status=R` and `actionType=RedirectURL`, send the customer to `data.redirectUrl`; select **Redirect local payment response (illustrative)** for the response structure. See [Local payment integration](/payments/versions/v2/online-payments/payment-methods/local-payment-methods) for response fields and other actions. Use the returned URL without constructing a payment page URL yourself.

For desktop web payments, the customer scans the QR code on the hosted payment page with the Swish app. On the same phone, the customer can continue using the hosted page’s button to open Swish. The customer confirms the payment in the app.

Creating a transaction or returning to the merchant page does not confirm payment success. Read the transaction `status` from a verified [payment result webhook](/payments/versions/v2/api-reference/webhooks/payment-result), or use [Query transactions](/payments/versions/v2/api-reference/endpoints/query-transactions) to reconcile the result. See [Webhooks](/payments/versions/v2/get-started/webhooks) for verification, acknowledgement, and duplicate handling.

Only `status=S` confirms payment success; `status=F` indicates failure. Handle other states according to the API reference.

## Refunds and disputes

Confirm refund availability, restrictions, and the applicable dispute process with Onerway for your account. When refunds are enabled, follow [Refunds](/payments/versions/v2/online-payments/scenarios/refunds).

## Testing and go-live

Confirm the test environment, method enablement, and available test steps with Onerway before following [Testing](/payments/versions/v2/get-started/testing).

Use the Swish sandbox to check page redirection and handling of incomplete payments. Confirm the app and account requirements for successful payment testing with Onerway. Opening a QR code or the app alone does not verify a successful payment.

1. Create an order in SEK using an enabled test configuration, and check the method code and returned page.
2. Follow the approved test steps for a successful payment. Confirm that the order becomes paid only after a verified notification or server query reports `status=S`.
3. Test abandonment, incomplete payment, and a missing notification. Confirm that returning to the merchant page does not mark the order paid and that queries can reconcile the state.
4. Before launch, confirm production enablement, currency, limits, and the notification endpoint. Test refunds if enabled.
