Skip to main content

Duitku Python SDK

Project description

Duitku Python API Client Library

License: MIT

Duitku API Library for Python

Supported Feature

Feature Function HTTP Request Description
Get Payment Method client.payment.get_methods POST /merchant/paymentmethod/getpaymentmethod Get list of available payment methods
Craete New Invoice client.invoice.create POST /merchant/createInvoice Create Transaction via POP API

Requirements

Documentation

Installation

Get this library, add to your project

pip install duitku-python

Example Usage

import requests
import duitku

from http import HTTPStatus
from datetime import datetime

duitku = duitku.Duitku()

client = duitku.client
client.merchant_code = "YOUR MERCHANT CODE"
client.api_key = "YOUR API KEY"
client.environment = client.SandboxEnv

create_invoice_req = {
    "paymentAmount": 10001,
    "merchantOrderId": datetime.now().strfti("%Y%m%d%H%M%S"),
    "productDetails": "test invoice",
    "email": "test@duitku.com",
    "callbackUrl": "https://duitku.com/callback",
    "returnUrl": "https://duitku.com"
}
response = None
try:
    response = duitku.invoice.create(create_invoice_req):
except requests.exceptions.HTTPError as e:
    print(e)
print(response)

Support

If you have a feature request or spotted a bug or a techical problem, create an issue here. For other questions, please contact duitku through their live chat on your dashboard.

License

MIT license. For more information, see the LICENSE file.

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

duitku_python-0.2.2.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

duitku_python-0.2.2-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file duitku_python-0.2.2.tar.gz.

File metadata

  • Download URL: duitku_python-0.2.2.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for duitku_python-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e9ba0497561d0684c8471b2240e7f22864e85be3331f2d7fcd74aa48820e4040
MD5 dba8e4bdddabc91fc3887b2167be02fc
BLAKE2b-256 18d7d20bd5cc86dfc6d54ba7d96db4aaf155636f7b0722c6cf9cef88ec16532f

See more details on using hashes here.

File details

Details for the file duitku_python-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: duitku_python-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for duitku_python-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8a63191dcbe32cac9c98822d60ef2b956f5bfc18ae6723b3dd5cf45ee80b29ec
MD5 4b309fe83e5f19a4e9d35d930d4691be
BLAKE2b-256 2f517df55d9fcade19bffb27ef6831594d02c3fd6b70b3e62a5989c1671cc38b

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