Skip to main content

This client library is designed to support the Swish API.

Installation

It’s easy! Just install it with pip:

$ pip install swish

Quick Start Example

import swish

swish_client = swish.SwishClient(
    environment=swish.Environment.MSS,
    merchant_swish_number='1231181189',
    cert=('/path/to/cert.pem', '/path/to/key.pem'),
    verify='/path/to/swish.pem'
)

payment = swish_client.create_payment(
    payee_payment_reference='0123456789',
    callback_url='https://example.com/api/swishcb/paymentrequests',
    payer_alias='46712345678',
    amount=100,
    currency='SEK',
    message='Kingston USB Flash Drive 8 GB'
)

# YOUR CODE: Save payment.id and other info in your database for later!

Metadata

Release files for swish 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swish 1.4
File Size Uploaded
swish-1.4.tar.gz 14.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swish 1.4
File Interpreter ABI Platform
swish-1.4-py3-none-any.whl Python 3 none any Details

Total release size: 30.3 kB

Release files / swish-1.4.tar.gz

Download URL swish-1.4.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4c97a12ae906a155be7a170b4de6779e5fab30fe0f9c8084140137cb90c82a67
BLAKE2b-256 checksum
How to use checksums
cb0848ac9ca3696bf2731b8fd2f6adbdcac8e5c3d5ec241deaa441f85063c971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / swish-1.4-py3-none-any.whl

Download URL swish-1.4-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4ca8e67f2f9edf4c82fa4922bd0cdaffcf4d660eecc4550f4c3f1c23c694cb6
BLAKE2b-256 checksum
How to use checksums
6f5a05f53f1451e623a881643a0a02649edfb593884214d50650cd29805f40e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release history Release notifications | RSS feed

1.6.1

2 release files

1.6

2 release files

1.5

2 release files

This release

1.4 This release

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page