Skip to main content

Python bindings for the Dintero API

Project description

Dintero Python SDK

Build Status

With the Dintero Python SDK you can easily interact with the Dintero API to create and manage payments through the Checkout API, and in the future also use the many other APIs we've got.

Installation

Install from pip by using:

pip install --upgrade dintero

Requirements

  • Python 3.9+

Using the SDK

Create an account through https://onboarding.dintero.com.

Get client credentials from the Dintero Backoffice, see guide.

Create a payment profile by going to Dintero Backoffice --> Settings --> Payment Profiles

Use your newly created credentials to create a session:

from dintero import Dintero

account_id = 'T12345678'
client_id = '72e023b1-aeda-498e-b141-4669528c44b9'
client_secret = '125f9f0a-e240-4bfd-be57-0086343bf0e4'

profile_id = 'T12345678.46dP6T4F1mUXYPeYKYc5Gj'

dintero = Dintero(
    account_id,
    client_id,
    client_secret)
checkout = dintero.checkout()
session_info = checkout.create_session({
    "url": {
        "return_url": "https://example.com/accept",
        "callback_url": "https://example.com/callback"
    },
    "order": {
        "amount": 29990,
        "currency": "NOK",
        "merchant_reference": "string",
        "items": [
            {
                "id": "chair-1",
                "line_id": "1",
                "description": "Stablestol",
                "quantity": 1,
                "amount": 29990,
                "vat_amount": 6000,
                "vat": 25
            }
        ]
    },
    "profile_id": profile_id
})

print(session_info)

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

dintero-0.0.9.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dintero-0.0.9-py2.py3-none-any.whl (7.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file dintero-0.0.9.tar.gz.

File metadata

  • Download URL: dintero-0.0.9.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dintero-0.0.9.tar.gz
Algorithm Hash digest
SHA256 f2dff9a1ecaec08036e04b304fa1393e85e47b714f66731a0d200c11b36757d2
MD5 7e7c0d3223da5c1c7810bd356cd53bee
BLAKE2b-256 14c4fb81e5b97881940e02108176bc952354aae7d7c9dfe4ecdc75cbacd7ad13

See more details on using hashes here.

File details

Details for the file dintero-0.0.9-py2.py3-none-any.whl.

File metadata

  • Download URL: dintero-0.0.9-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dintero-0.0.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 70c08843525703ff75815fdfcd4f9694bf3ef83a7e56b8bad68e3cde556eab13
MD5 3ebb45bb55bf825e191d7e081563121e
BLAKE2b-256 cf9a35e4d8e60a73a934428580bd78adabb0936e054f91e22b70ebb0b9a0f3fc

See more details on using hashes here.

Supported by

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