PHPackages                             danaid/dana-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. danaid/dana-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

danaid/dana-php
===============

API for doing operations in DANA Payment Gateway (Gapura), Widget, Merchant Management, and Disbursement

v2.1.2(1mo ago)51.2k↓28.3%3unlicensePHPPHP ^7.4 || ^8.0

Since Jun 11Pushed 1mo agoCompare

[ Source](https://github.com/dana-id/dana-php)[ Packagist](https://packagist.org/packages/danaid/dana-php)[ Docs](https://github.com/dana-id/dana-php)[ RSS](/packages/danaid-dana-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (44)Used By (0)

dana-php
========

[](#dana-php)

The official DANA PHP SDK provides a simple and convenient way to call DANA's REST API in applications written in PHP (based on )

⚠️ Run This First - Save Days of Debugging
------------------------------------------

[](#️-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: .

### Why This Matters

[](#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

[](#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.

.

.

Installation &amp; Usage
------------------------

[](#installation--usage)

### Requirements

[](#requirements)

PHP 7.4 and later. Should also work with PHP 8.0.

### Composer

[](#composer)

To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:

```
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/dana-id/dana-php.git"
    }
  ],
  "require": {
    "danaid/dana-php": "^1.0"
  }
}
```

Then run `composer install`

Environment Variables
---------------------

[](#environment-variables)

Before using the SDK, please make sure to set the following environment variables (In .env):

NameDescriptionExample 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.`CLIENT_SECRET`Assigned client secret during registration. Must be set for DisbursementApiyour\_client\_secret`X_DEBUG`Set to 'true' to enable debug mode (showing reason of failed request in additionalInfo.debugMessage in response)trueYou 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:

API Endpoints
-------------

[](#api-endpoints)

APIDocs*PaymentGatewayApi*[**PaymentGatewayApi Docs**](docs/PaymentGatewayAPI.md)*WidgetApi*[**WidgetApi Docs**](docs/WidgetAPI.md)*DisbursementApi*[**DisbursementApi Docs**](docs/DisbursementAPI.md)*MerchantManagementApi*[**MerchantManagementApi Docs**](docs/MerchantManagementAPI.md)

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance89

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

43

Last Release

59d ago

Major Versions

v0.1.12 → v1.0.02025-08-03

v1.0.25 → v2.0.02026-02-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d49b31b47c5dacac1d3f0e4875a8dde37578389d12fabd0dd73a3fe2bbc3b13?d=identicon)[danaid](/maintainers/danaid)

---

Top Contributors

[![sre-dana-id](https://avatars.githubusercontent.com/u/205132488?v=4)](https://github.com/sre-dana-id "sre-dana-id (1 commits)")

---

Tags

client-librarydanadisbursementpayment-gatewayphpsdksdk-phpphpapisdkrestopenapiopenapitoolsopenapi-generator

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/danaid-dana-php/health.svg)

```
[![Health](https://phpackages.com/badges/danaid-dana-php/health.svg)](https://phpackages.com/packages/danaid-dana-php)
```

###  Alternatives

[xendit/xendit-php

Xendit PHP SDK

189730.6k6](/packages/xendit-xendit-php)[ory/hydra-client

Documentation for all of Ory Hydra's APIs.

17435.9k](/packages/ory-hydra-client)[elasticemail/elasticemail-php

This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available &lt;a target='\_blank' href='https://app.elasticemail.com/marketing/settings/new/manage-api'&gt;here&lt;/a&gt;). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository &lt;a target='\_blank' href='https://github.com/ElasticEmail?tab=repositories&amp;q=%22rest+api%22+in%3Areadme'&gt;here&lt;/a&gt;

1595.0k2](/packages/elasticemail-elasticemail-php)[ory/kratos-client-php

This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.

1529.2k3](/packages/ory-kratos-client-php)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
