Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Swish payments


Invite only

Swish payments Invite only

Checkout

Elements

Direct API

Mobile

Swish is a single-use payment method used in Sweden. It allows customers to authenticate and approve payments using the Swish mobile app and the Swedish BankID mobile app.

You get immediate notification on whether the payment succeeded or failed.

Use this guide to enable Swish on Checkout, our hosted checkout form, and learn the differences between accepting a card payment and a Swish payment.

Determine compatibility

A Checkout Session must satisfy all of the following conditions to support Swish payments:

  • Prices for all line items must be expressed in SEK.

Set up Stripe Server-side

First, you need a Stripe account. Register now.

Use our official libraries for access to the Stripe API from your application:

Command Line

Select a language

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

# Available as a gem
sudo gem install stripe

Gemfile

Select a language

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

# If you use bundler, you can add this line to your Gemfile
gem 'stripe'

Accept a payment

Note

This guide builds on the foundational accept a payment Checkout integration.

Enable Swish as a payment method

When creating a new Checkout Session, you need to:

  1. Enable Swish in your Dashboard. Stripe automatically displays Swish to eligible customers using dynamic payment methods . If you currently specify payment _ method _ types , see the migration guide .
  2. Make sure all your line _ items use the sek currency.

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Fulfill your orders

After accepting a payment, learn how to fulfill orders.

Optional Handle post-payment events

Optional Test the integration

Failed payments

Swish uses multiple data points to decide when to decline a transaction (for example, there aren’t enough funds in the customer’s bank account, or the customer has clicked Cancel in the app).

In these cases, the PaymentMethod is detached and the PaymentIntent object’s status automatically transitions to requires_payment_method.

Other than a payment being declined, for a Swish PaymentIntent with a status of requires_action, customers must complete the payment within 3 minutes. If no action is taken after 3 minutes, the PaymentMethod is detached and the PaymentIntent object’s status automatically transitions to requires_payment_method.

Decline codes

When a Swish payment is declined, the last_payment_error.network_decline_code on the PaymentIntent contains a raw decline code from Swish. The following table lists the possible values and their meanings.

network_decline_codedecline_codecodemessage
the related settingpayment_limit_exceededpayment_method_provider_declineThe customer has exceeded their self-configured Swish daily spending limit. The customer should raise their daily limit in their online bank or pay with a different payment method.
the related settinginvalid_amountpayment_method_provider_declineThe payment amount exceeds the customer’s self-configured Swish transaction limit. The customer should raise their transaction limit in their online bank or pay with a different payment method.
the related settingpartner_generic_declinepayment_method_provider_declineThe transaction was declined by Swish for an unknown reason.
the related settingpartner_generic_declinepayment_method_provider_declineThe customer canceled BankID signing.
the related setting, the related settinginvalid_customer_accountpayment_method_provider_declineThe customer isn’t enrolled to pay via Swish. The customer should enroll in Swish or pay with a different payment method.
the related settinginvalid_customer_accountpayment_method_provider_declineThe customer isn’t enrolled or not permitted to pay via Swish.
the related settingpartner_generic_declinepayment_method_provider_declineThe customer already has an active Swish payment in progress. The customer should terminate the existing Swish payment or pay with a different payment method.
the related settinginvalid_customer_accountpayment_method_provider_declineThe customer is enrolled in Swish but has not yet activated their Swish app. The customer should activate their Swish app or pay with a different payment method.
the related settingpayment_intent_payment_attempt_expiredpayment_intent_payment_attempt_failedThe latest payment attempt of this PaymentIntent has expired. You can provide payment_method_data or a new PaymentMethod to attempt to fulfill this PaymentIntent again.
the related settingprocessing_errorpayment_method_provider_declineThe processing bank returned an error. Try again in a little bit or try a different payment method.
the related setting, the related settingpartner_generic_declinepayment_method_provider_declineThe customer already has an ongoing operation with BankID. This could be another Swish payment, a bank login, or an e-government login, for example. The customer should terminate the ongoing BankID operation and try again.
the related setting, the related setting, the related setting, the related setting, the related setting, the related setting, the related setting, the related setting, the related setting, the related settingprocessing_errorpayment_intent_payment_attempt_failedSwish encountered an error while processing this transaction. Try again in a little bit or try a different payment method.

See also

Last verified 2026-09-24

Is this helpful?