Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.0a1

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.0a1
File Size Uploaded
swish-1.0a1.zip 18.9 kB Details

Release files / swish-1.0a1.zip

Download URL swish-1.0a1.zip
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9621e58531dc9d26315d4951e986c1d0b03e2103de219b8a45797b58f578bb30
BLAKE2b-256 checksum
How to use checksums
68a3380e50f75976d9b385a471a5b1fe5412695447699412c01fa76ac0b4c4e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

1.1

2 release files

This release

1.0a1 This release

1 release file

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