Skip to main content

This client library is designed to support the Swish API. It was originally developed at Playing.

Installation

It’s easy! Just install it with pip:

$ pip install swish

Quick Start Example

import swish

swish_client = swish.SwishClient(
    environment=swish.Environment.Test,
    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.1

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.1
File Size Uploaded
swish-1.1.tar.gz 13.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swish 1.1
File Interpreter ABI Platform
swish-1.1-py2-none-any.whl Python 2 none any Details

Total release size: 26.8 kB

Release files / swish-1.1.tar.gz

Download URL swish-1.1.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bd9995ce18aa4ca35e510a4b7b46ada4f6b54cfbe0de1137b25aa59e4b1a4862
BLAKE2b-256 checksum
How to use checksums
6ecd5f4c4d5c76dccc03e06d2aee9e9b093ca7d9711dfb78070d7754c10ce78d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.13

Release files / swish-1.1-py2-none-any.whl

Download URL swish-1.1-py2-none-any.whl
Size 13.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
caf0b063ce357b7757f3ee51b29fe4ac518bc7add9d52a603d5be8e2d47a4679
BLAKE2b-256 checksum
How to use checksums
acc8dd049119e8555a10a04b4da8dbe4f1f357f3f7ff2d4d2f4c7c181a432ced
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.13

Release history Release notifications | RSS feed

1.6.1

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

This release

1.1 This release

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