Swish Python Client Library
Project description
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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
swish-1.6.1.tar.gz
(15.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
swish-1.6.1-py3-none-any.whl
(15.9 kB
view details)
File details
Details for the file swish-1.6.1.tar.gz.
File metadata
- Download URL: swish-1.6.1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d80032b65627cc621da89adb669e12d1553b6782dcdeb5dadc2be4103e134777
|
|
| MD5 |
e7e03aee9a31b3c1052839e628e07b5a
|
|
| BLAKE2b-256 |
a46997d9a10f39ffb2ffcb1c178b58c4eba66265571c52a278f917e224ef8b24
|
File details
Details for the file swish-1.6.1-py3-none-any.whl.
File metadata
- Download URL: swish-1.6.1-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46266834f8da2c993a1736c6181b68488ede92c918480e2b241d3ad68f47a61f
|
|
| MD5 |
f8b40e47153d23e2451e71837e1d87d9
|
|
| BLAKE2b-256 |
b70939a84ae6515683365dc9d0251a58a4ea7c901e3ab16106417ce9cd6b8210
|