Metadata-Version: 2.1
Name: dintero
Version: 0.0.1
Summary: Python bindings for the Dintero API
Home-page: https://github.com/dinter/dintero-python
Author: Dintero
Author-email: integration@dintero.com
License: MIT
Project-URL: Bug Tracker, https://github.com/dintero/dintero-python/issues
Project-URL: Documentation, https://docs.dintero.com
Project-URL: Source Code, https://github.com/dintero/dintero-python
Keywords: dintero api payments
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Description-Content-Type: text/markdown
License-File: LICENSE

# Dintero Python SDK

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.4+

## Using the SDK

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

Get client credentials from the Dintero Backoffice, see [guide](https://docs.dintero.com/docs/checkout-client/).

Create a payment profile by going to [Dintero Backoffice](https://backoffice.dintero.com) --> Settings --> Payment
Profiles

Use your newly created credentials to create a session:

```python
from dintero import Dintero

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

profile_id = 'P12345678.46dP6T4F1mUXYPeYKYc5Gj'

dintero = Dintero(
    account_id,
    client_id,
    client_secret)
checkout = dintero.checkout()
session_info = checkout.post_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
})
```


