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!
Release files for swish 1.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| swish-1.6.1.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swish-1.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.7 kB
Release files / swish-1.6.1.tar.gz
| Download URL | swish-1.6.1.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d80032b65627cc621da89adb669e12d1553b6782dcdeb5dadc2be4103e134777
|
|
BLAKE2b-256 checksum How to use checksums |
a46997d9a10f39ffb2ffcb1c178b58c4eba66265571c52a278f917e224ef8b24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / swish-1.6.1-py3-none-any.whl
| Download URL | swish-1.6.1-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
46266834f8da2c993a1736c6181b68488ede92c918480e2b241d3ad68f47a61f
|
|
BLAKE2b-256 checksum How to use checksums |
b70939a84ae6515683365dc9d0251a58a4ea7c901e3ab16106417ce9cd6b8210
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|