Skip to main content

Libraries

DANA libraries and testing tools provide merchants with a comprehensive integration solution that streamlines development and ensures quality. Our integrated package eliminates the need to build complex API requests from scratch while providing robust testing capabilities.

The solution handles essential DANA features including authentication, request formatting, and response parsing, with support for multiple programming languages and automated testing scenarios to validate your integration.

Supported programming languages

Library

Simple, efficient, and reliable - Start integrating with DANA APIs in minutes instead of hours.

DANA libraries provide a powerful toolkit that simplifies integration with DANA payment solutions. Built and maintained by our engineering team, these libraries eliminate the complexity of building API integrations from scratch.

Why you should use it

Our library simplifies your integration process by providing:

Ready-to-use API client - No need to build API requests from scratch

Built-in authentication handling - Secure API access out of the box

Automatic request formatting - Properly structured API calls every time

Response parsing - Clean, typed responses ready for your code

Requirements

Installation

Install using npm or visit our Github

Install the API Library using npm
npm install dana-node@latest --save

Set up the env

Required Credentials
PRIVATE_KEY or PRIVATE_KEY_PATH        # Your private key 
ORIGIN # Your application's origin URL
X_PARTNER_ID # clientId provided during onboarding
ENV # DANA's environment either 'sandbox' or 'production'

Obtaining merchant credentials: Authentication


Mandatory UAT Testing

Thorough testing is critical for ensuring your integration works correctly across all scenarios and edge cases before going live. Our standardized testing package eliminates manual configuration and significantly accelerates your integration process.

What the script does

  • Install the latest version of our library from Repo.
  • Run a complete suite of predefined test scenarios.
  • Display real-time test results in your terminal.

Why you should use it

Simple, automated, and reliable - get your integration tested and validated without manual effort.

Our testing package streamlines your integration process by automatically handling installation and testing. Simply clone our test suite, configure your credentials, and run the automated test script, the library will install itself and validate your integration in under 2 minutes.

The automated testing provides:

Automated test scenario checklist for DANA Sandbox.

Auto-installation of the latest library version.

Self-running test scenarios that validate your setup.

Real-time test results in your terminal.

Safe testing environment - No real transactions.

Usage & Installation

Prerequisites

Step 1: Clone the Test Package

Clone the test package from the provided link.

git clone git@github.com:dana-id/self_testing_scenario.git
cd self_testing_scenario

Step 2: Configure your environment file

Change the .env-example file name to .env and fill in your credentials. Ensure you have obtained these credentials during the onboarding process.

# Required Credentials
MERCHANT_ID=your_merchant_id # Your unique merchant identifier
X_PARTNER_ID=your_partner_id # Partner ID provided during onboarding
CHANNEL_ID=your_channel_id # Channel identifier for your integration
PRIVATE_KEY=your_private_key # Your authentication private key
ORIGIN=your_origin # Your application's origin URL

Step 3: Run the Automated Test Script

In your terminal, run this script your preferred programming language.

sh run-test.sh python

What You Get After Running the Test

🟢 Clear pass/fail status for each scenario.

🟢 Easy reruns for retesting or regression.

🟢 Testing without any real transaction, safe and isolated.

Mandatory test scenarios

By running the automated test scenario, you can execute all test scenarios simultaneously without having to run them one by one. This saves significant time since the entire test suite completes in just 2 minutes. To see the complete list of test scenarios covered in the automated testing, please refer to the section below.


Gapura Payment Gateway
Gapura Payment Gateway
Start accepting payments using a hosted checkout page or a custom API solution
Disbursement
Disbursement
Automate disbursement to any bank & e-wallets across Indonesia using our tailor-made APIs
Integrated Payment
Integrated Payment
Gain access to millions of DANA users by using DANA accounts & payment for your business solution
Submerchants
Submerchants
Manage payment & settlement of multiple stores/entities by registering them as your submerchant