Skip to main content

Swish Payment Integration

Swish is a mobile payment app used widely across Sweden. Customers approve the payment in the Swish app. This guide explains how to accept Swish payments with the Netvalve Payment Gateway.

Availability
Customer countryCurrencypaymentOption
Sweden (SE)SEKapm_swish

The order currency must be SEK for Swish to be offered.

For the shared redirect flow, webhook handling, and Checkout SDK notes, see the European Payment Methods overview.


How to offer Swish​

Contact the Netvalve team to enable Swish on your account before going live.


Step 1 — Create the order​

Send a POST request to the Create Order endpoint with paymentOption set to "apm_swish" and the order currency set to SEK.

POST /order — request body
{
"amount": 449.00,
"currency": "SEK",
"siteId": "f76fb7ed-3312-4791-a216-45918f899271",
"clientOrderId": "{{clientOrderId}}",
"orderDesc": "Order #12345",
"successUrl": "https://merchantsite.com/success.html",
"cancelUrl": "https://merchantsite.com/cancel.html",
"failedUrl": "https://merchantsite.com/failed.html",
"pendingUrl": "https://merchantsite.com/pending.html",
"paymentOption": "apm_swish",
"customerDetails": {
"customerAddress": "1 Test Street",
"customerCity": "Stockholm",
"customerCountryCode": "SE",
"customerEmail": "customer@example.com",
"customerIp": "123.123.123.123",
"customerName": "Erik",
"customerLastName": "Andersson",
"customerPhone": "800-1234567",
"customerZipCode": "11122"
}
}
tip

paymentOption accepts a comma-separated list. For example, "card,apm_swish" shows both card and Swish on the hosted page.


Step 2 — Redirect and handle the outcome​

On success the response contains a redirectUrl (verify responseCode === "GTW_1000" first). Send the customer there; Netvalve takes them to Swish to authorise, then returns them to one of your URLs:

OutcomeRedirect target
Payment succeededsuccessUrl
Customer cancelledcancelUrl
Payment failedfailedUrl
Payment pendingpendingUrl

Treat the webhook or an Inquiry poll as the source of truth for the final result.


Sandbox testing​

Swish has no shared, self-service test credentials: its sandbox requires a test account plus the Swish and BankID test apps on a mobile device. Contact the Netvalve team to request Swish sandbox test credentials before you start testing.

Once you have them, the integration itself is unchanged — create the order against the Sandbox / UAT base URL, follow the redirectUrl, approve the payment in the Swish test app, and confirm the customer lands on the matching return URL and your webhook records the same result.

See Testing in sandbox for the shared setup, amount limits, and how to test the pending path.


ResourceLink
European Payment Methods overviewOverview
Hosted Payment Page guideHosted Payment Page
Swagger API referenceAPI Reference
Webhook Message guideWebhook Message
Error Codes referenceError Codes