Skip to main content

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


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.5.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

swish-1.5-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file swish-1.5.tar.gz.

File metadata

  • Download URL: swish-1.5.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for swish-1.5.tar.gz
Algorithm Hash digest
SHA256 e314a7cc118511dfed5c83a4b75bd597cbb2b2dbe613714f265d7b2b77cbe755
MD5 ed80433f849b36f3f7862dea4e29a4c5
BLAKE2b-256 7c4908b6a416541f83831670c6443dd27edf37823628a96bcd52210c51266154

See more details on using hashes here.

File details

Details for the file swish-1.5-py3-none-any.whl.

File metadata

  • Download URL: swish-1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for swish-1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 41b75f57b83b9639cd91857f7bbe875f7cdfb62ab4484aeefdf1976912001672
MD5 5b31d55c64104e6e9eb94a29d4b9a062
BLAKE2b-256 e68a4baa544173fc49d64cc20449acb83565be2c08de277bba8cb0ea6f8949fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page