Skip to main content

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-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"
}
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.

Metadata

Release files for duitku-python 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for duitku-python 0.2.6
File Size Uploaded Provenance
duitku_python-0.2.6.tar.gz 4.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for duitku-python 0.2.6
File Interpreter ABI Platform
duitku_python-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / duitku_python-0.2.6.tar.gz

Download URL duitku_python-0.2.6.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
daa50906c3390c4404ff2ea57e5eb6cc306237e048857a2c95b20387436f3d68
BLAKE2b-256 checksum
How to use checksums
b8f00f89c96b6bfae83d788a8f957991f7c3bf16b819d74b74c951119b414dae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / duitku_python-0.2.6-py3-none-any.whl

Download URL duitku_python-0.2.6-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cc61c055b5e33467d88329b3ec420f22736bb5369c4042c0bfeca30b24f1e4c
BLAKE2b-256 checksum
How to use checksums
84f447ccf4f4432b512f640157b9b7ae742a39479eb9a537ce6037a781c29583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for duitku-python 0.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page