Skip to main content

Swish Python Client Library

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.7.0

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.7.0
File Size Uploaded Provenance
swish-1.7.0.tar.gz 8.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 14.1 kB

Release files / swish-1.7.0.tar.gz

Download URL swish-1.7.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a576bbed578874b4742db9a628ef11e81e36cb79cf3fbbce54744a9bb23b1d92
BLAKE2b-256 checksum
How to use checksums
d2b0abc39c0b29ebc5ccca63b893c7cb99de2c8bcb4db873d4d0b4152e258438
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.7.0-py3-none-any.whl

Download URL swish-1.7.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6841bfbdf67f24956edfed378c00059541a3a5cad29e94b50c32aa086998b882
BLAKE2b-256 checksum
How to use checksums
b3d7cd6a46f8f91c283049302e50990620b603615162199d26e460a52df8a56a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for swish 1.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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