Skip to main content

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.9.1+

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dana_python-2.2.1.tar.gz (194.3 kB view details)

Uploaded Source

Built Distribution

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

dana_python-2.2.1-py3-none-any.whl (529.2 kB view details)

Uploaded Python 3

File details

Details for the file dana_python-2.2.1.tar.gz.

File metadata

  • Download URL: dana_python-2.2.1.tar.gz
  • Upload date:
  • Size: 194.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.15 Linux/5.10.134-19.2.al8.x86_64

File hashes

Hashes for dana_python-2.2.1.tar.gz
Algorithm Hash digest
SHA256 c755870c03b2e42334c527683f9a48e2cdde65699553ce156aa25ab6ff9dbd06
MD5 d7cff3bd430c1bcbb7c6d82250a8859f
BLAKE2b-256 1ee1be1fc430c800f5775e2f2840facbaa895fe28993c3ba30be26390547f44d

See more details on using hashes here.

File details

Details for the file dana_python-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: dana_python-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 529.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.15 Linux/5.10.134-19.2.al8.x86_64

File hashes

Hashes for dana_python-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ba43aa970a9116a5dbed1df5071fd6c0b2556f2da9352f6c02191d5df4ca158
MD5 3be39dec3400e3e4dd5b204026f8ece0
BLAKE2b-256 437d174b1a30a22e209676d4ed24f865bc888b3855f03795e4fa81903a4c7527

See more details on using hashes here.

Release history Release notifications | RSS feed

2.2.2

2 files

This release

2.2.1 This release

2 files

2.2.0

2 files

2.1.11

2 files

2.1.10

2 files

2.1.9

2 files

2.1.8

2 files

2.1.7

2 files

2.1.6

2 files

2.1.5

2 files

2.1.4

2 files

2.1.3

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.0

2 files

1.1.10

2 files

1.1.9

2 files

1.1.8

2 files

1.1.7

2 files

1.1.6

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

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