Skip to main content

Duitku Python SDK

Project description

Duitku Python API Client Library

pypi Build Status License: MIT

Duitku API Library for Python

Supported Feature

Feature Function HTTP Request Description
Get Payment Method duitku.payment.get_methods POST /merchant/paymentmethod/getpaymentmethod Get list of available payment methods
Craete New Invoice duitku.invoice.create POST /merchant/createInvoice Create Transaction via POP API
Create New Transaction duitku.transaction.create POST /merchant/v2/inquiry Create Transaction via V2 API
Get Transaction duitku.transaction.get_status POST /merchant/transactionStatus Get Transaction via V2 API

Requirements

Documentation

Installation

Get this library, add to your project

pip install Duitku

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"
}
result = self.duitku.invoice.create(create_invoice_req)
print(result)

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

Uploaded Source

Built Distribution

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

duitku-0.2.8-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file duitku-0.2.8.tar.gz.

File metadata

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

File hashes

Hashes for duitku-0.2.8.tar.gz
Algorithm Hash digest
SHA256 212d1d9bbe16e260e5c4ae91902f4dad7925dbbf653a4a5730e4eb2d3e29000e
MD5 49a0c3fd5b23bf3ee4ed56b1ac4f0c24
BLAKE2b-256 5a9848af435e9f21e285becd555205525bb966d62ebd9e90d1d9e7d8a69f421b

See more details on using hashes here.

File details

Details for the file duitku-0.2.8-py3-none-any.whl.

File metadata

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

File hashes

Hashes for duitku-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b00f14256af26330b69e6cc293e5d6210e846d23f1e0b0e968ac325c9778fef8
MD5 e7dd08942e70b8acce7a3ae6a5e77a32
BLAKE2b-256 acdc366545833cba3a58af564362785bb0892065dee43955909919bfa56e091d

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