dana-python
The official DANA Python SDK provides a simple and convenient way to call DANA's REST API in applications written in Python (based on https://dashboard.dana.id/api-docs-v2/)
⚠️ Run This First - Save Days of Debugging
Before writing any integration code, run our automated test suite. It takes under 2 minutes and shows you how the full flow works — with your own credentials.
Here is the link: https://github.com/dana-id/uat-script.
Why This Matters
- 🧪 Validates your setup instantly
- 👀 See exactly how each scenario flows
- 🧾 Gives us logs to help you faster
- 🚫 Skipping this = guaranteed delays
What It Does
✅ Runs full scenario checks for DANA Sandbox
✅ Installs and executes automatically
✅ Shows real-time results in your terminal
✅ Runs in a safe, simulation-only environment
Don't fly blind. Run the test first. See the flow. Build with confidence.
.
.
Getting Started
Requirements.
Python 3.10+ (patched releases: 3.11.17, 3.12.15, 3.13.17, 3.14.9, 3.15.1 or later)
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install dana-python
(you may need to run pip with root permission: sudo pip install dana-python)
Then import the package, ex:
import dana.payment_gateway.v1
Environment Variables
Before using the SDK, please make sure to set the following environment variables (In .env):
| Name | Description | Example Value |
|---|---|---|
ENV or DANA_ENV |
Defines which environment the SDK will use. Possible values: SANDBOX or PRODUCTION. |
SANDBOX |
X_PARTNER_ID |
Unique identifier for partner, provided by DANA, also known as clientId. |
1970010100000000000000 |
PRIVATE_KEY |
Your private key string. | |
PRIVATE_KEY_PATH |
Path to your private key file. If both are set, PRIVATE_KEY_PATH is used. |
/path/to/your_private_key.pem |
DANA_PUBLIC_KEY |
DANA public key string for parsing webhook. | -----BEGIN PUBLIC KEY-----MIIBIjANBgkq...Do/QIDAQAB-----END PUBLIC KEY----- |
DANA_PUBLIC_KEY_PATH |
Path to DANA public key file for parsing webhook. If both set, `DANA_PUBLIC_KEY_PATH is used. | /path/to/dana_public_key.pem |
ORIGIN |
Origin domain. | https://yourdomain.com |
CLIENT_SECRET |
Assigned client secret during registration. Must be set for DisbursementApi | your_client_secret |
X_DEBUG |
Set to 'true' to activate debug mode (showing reason of failed request in additionalInfo.debugMessage in response) | true |
You can see these variables in .env.example, fill it, and change the file name to .env (remove the .example extension)
Then you can choose these following APIs based on the business solution you want to integrate:
Documentation for API Endpoints
| API | Description |
|---|---|
| PaymentGatewayApi | API for doing operations in DANA Payment Gateway (Gapura) |
| WidgetApi | API for enabling the user to make payment from merchant’s platform with redirecting to DANA’s platform |
| DisbursementApi | API for doing operations in DANA Disbursement |
| MerchantManagementApi | API for doing operations in DANA Merchant Management |
Metadata
Release files for dana-python 3.0.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 | Actions |
|---|---|---|---|---|
| dana_python-3.0.0.tar.gz | 197.0 kB | Without provenance | Details for dana_python-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dana_python-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for dana_python-3.0.0-py3-none-any.whl |
Total release size: 726.7 kB
Release files / dana_python-3.0.0.tar.gz
| Download URL | dana_python-3.0.0.tar.gz |
|---|---|
| Size | 197.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
694bdb90d249500555c2aa6838326a9a7b2eb1d6495be780efe9b15ce0945270
|
|
BLAKE2b-256 checksum How to use checksums |
1d01a194e08d44268fc64ebbbee682354d6c189ff20e85ad5885c336c1907695
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.11.18 Linux/6.6.102-8.alnx4.x86_64
|
Release files / dana_python-3.0.0-py3-none-any.whl
| Download URL | dana_python-3.0.0-py3-none-any.whl |
|---|---|
| Size | 529.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59bf35c9c3b8596cface7cd2eb0b59426deaeae7c0971180daa0ccc41408a455
|
|
BLAKE2b-256 checksum How to use checksums |
caa18a41c46a891458ce5038b96b92d5347c26cfd3667c6cfdb157d1a35958a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.11.18 Linux/6.6.102-8.alnx4.x86_64
|
Security for dana-python 3.0.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.