thanakan-oauth
Thai bank OAuth API clients for SCB and KBank.
Installation
pip install thanakan-oauth
Usage
SCB API
from thanakan_oauth import SCBAPI, SCBBaseURL
api = SCBAPI(
app_key="your_app_key",
app_secret="your_app_secret",
cert="/path/to/cert.pem",
base_url=SCBBaseURL.PRODUCTION
)
# Verify slip
result = await api.verify_slip(
sending_bank_id="014",
transaction_ref_id="2024010112345678901234"
)
if result.data:
print(f"Amount: {result.data.amount}")
print(f"Sender: {result.data.sender.name}")
KBank API
from thanakan_oauth import KBankAPI
api = KBankAPI(
consumer_id="your_consumer_id",
consumer_secret="your_consumer_secret",
cert="/path/to/cert.pem"
)
# Verify slip (async)
result = await api.verify_slip(
sending_bank_id="014",
transaction_ref_id="2024010112345678901234"
)
# Verify slip (sync)
result = api.verify_slip_sync(
sending_bank_id="014",
transaction_ref_id="2024010112345678901234"
)
SCB API Methods
verify_slip(sending_bank_id, transaction_ref_id)- Verify transfer slipcreate_qr30(amount, ref1, ref2, ref3)- Generate QR30 payment codequery_transaction(biller_id, reference1, transaction_date)- Query transactioncreate_deeplink(amount, ref1, ref2, ref3)- Create SCB Easy deeplinkget_deeplink(transaction_id)- Get deeplink details
KBank API Methods
verify_slip(sending_bank_id, transaction_ref_id)- Verify transfer slip (async)verify_slip_sync(sending_bank_id, transaction_ref_id)- Verify transfer slip (sync)
mTLS Certificate
Both APIs require mTLS certificates for production:
# Single file (cert + key combined)
api = SCBAPI(..., cert="/path/to/combined.pem")
# Separate cert and key
api = SCBAPI(..., cert=("/path/to/cert.pem", "/path/to/key.pem"))
Documentation
Full documentation: https://ninyawee.github.io/thanakan/libraries/thanakan-oauth/
Metadata
Release files for thanakan-oauth 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| thanakan_oauth-0.2.0.tar.gz | 8.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| thanakan_oauth-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.4 kB
Release files / thanakan_oauth-0.2.0.tar.gz
| Download URL | thanakan_oauth-0.2.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20d9a5aab9ac0d09ee99e15be800c6416ecd08cbe8358393068e164b3cbdb6d5
|
|
BLAKE2b-256 checksum How to use checksums |
813d89e586ba9bb3dc8ecd135b4f9417147f94ce476f7ba0349e937e9ab17429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / thanakan_oauth-0.2.0-py3-none-any.whl
| Download URL | thanakan_oauth-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
791a5fe33bc6dd1d1218643c332ac50604ae91acb4fa3da09ae9ba235f7c9a38
|
|
BLAKE2b-256 checksum How to use checksums |
763b43e22255579b9dfc1c3bf21d0239f760ce1fa2cd8481d91da0868dcf3c9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for thanakan-oauth 0.2.0
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.