Swish for Payment Setup API
Last updated: April 30, 2026
To accept Swish payments, you must:
- Create a payment setup.
- Confirm the payment.
- Redirect the customer to Swish.
Call the Create a payment setup endpoint.
Information
Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see API endpoints.
post
https://{prefix}.api.checkout.com/payments/setups
1{2"amount": 1000,3"currency": "SEK",4"processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4",5"customer": {6"country": "SE"7},8"payment_methods": {9"swish": {10"billing_descriptor": "Swish payment",11"account_holder": {12"first_name": "Hannah",13"last_name": "Bret"14}15}16}17}
In the request body, provide the following:
| Field | Description |
|---|---|
number | The payment amount, in the minor currency unit. |
string | Three-letter ISO 4217 currency code. Must be |
object | The customer's details. |
string | The two-letter ISO 3166 country code of the customer. Must be |
string | A description that appears on the customer's billing statement. |
object | Required |
string | The account holder's first name. |
string | The account holder's last name. |
string | The processing channel's unique identifier. |
string | A description of the payment. |
string | A reference you can use to identify the payment. For example, an order number. |
1{2"id": "set_rcmepwrchqab2wsergcafvijfy",3"processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4",4"amount": 1000,5"currency": "SEK",6"payment_type": "Regular",7"reference": "ORDER_01234",8"description": "Swish payment",9"payment_methods": {10"swish": {11"status": "ready",12"flags": []13}14},15"available_payment_methods": [16"swish"17]18}
The response returns a payment_methods object, which contains the payment methods enabled on your account.
Providing all required fields sets the payment_methods.swish object to a ready status.
Confirm the payment by calling the Confirm a payment setup endpoint and provide:
- The payment setup
idas the{id}path parameter. swishas the{payment_method_name}path parameter.
post
https://{prefix}.api.checkout.com/payments/setups/{id}/confirm/swish
If you receive a 202 Success response with a payment id and a status field set to Pending, your request was successful.
1{2"id": "pay_3j4564ofxydevmruz6amur7djq",3"status": "Pending",4"reference": "ORDER_01234",5"payment_type": "Regular",6"_links": {7"self": {8"href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_3j4564ofxydevmruz6amur7djq"9},10"redirect": {11"href": "https://authman.sandbox.lp-pl.ppro.com/v0/pages/?redirection_token=eyJhbGciOiJIUzUxMiJ9...",12"qr_code": {13"text": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAsNklEQVR4Xu2d..."14},15"mobile": {16"android": {17"href": "swish://paymentrequest?token=AAAAAAAAAAAAABUCIDZXYpP3hM2Mx1Le&callbackurl=..."18},19"ios": {20"href": "swish://paymentrequest?token=AAAAAAAAAAAAABUCIDZXYpP3hM2Mx1Le&callbackurl=..."21}22}23}24}25}
The redirection step varies depending on whether you request the payment from a desktop browser or a mobile app.
To request a payment from a desktop browser:
- Ensure that the Swish app is installed on your customer's phone.
- Redirect your customer to the
_links.redirect.hrefURL provided in the response. The URL displays a QR code. - Your customer must scan the code using their Swish app and authorize the payment on their device.
- After authorizing the payment, the customer is redirected to either your success or failure URL.
To request a payment from a mobile app:
- Ensure that the Swish app is installed on your customer's phone. If the application is not installed, instruct the customer to install it.
- Get the necessary token from the
redirect.mobileobject in the response:- For Android – Pass the deeplink provided in
redirect.mobile.androidto open the Swish app on your customer's phone. - For iOS – Pass the deeplink provided in
redirect.mobile.iosto open the Swish app on your customer's phone.
- For Android – Pass the deeplink provided in
- The Swish app launches on your customer's phone, where they can authorize the payment.