Disbursement to Balance
Disbursement to Balance enables merchants to transfer balance to users' DANA balance. This API lets you validate account details, topup, and check topup statuses. It offers a secure, automated disbursement process that reduces manual work and improves efficiency.
Disbursement is also available for transfer to Bank Account. Check our Disbursement Overview for more details
Before you start
You will need to register your business in our Merchant Portal to obtain your testing credentials. After you have created your test account, make sure you have done the following:
- Finish your company registration and select XXX as your payment solution.
- Merchant Disbursement Account (MDA) will be automatically created for you to store your balance. For sandbox testing, contact the DANA team to top up your account. In production, simply top up via the Virtual Account (VA) displayed in Merchant Portal.
- Setup your webhooks & redirect URLs to receive payment outcomes & redirect user after payment.
- Obtain your testing credentials from the merchant portal.
User Experience
Below is a sample of the user experience for users paying using Disbursement to Balance. The checkout page is available using web browsers on mobile devices.
- Mobile

Top Up Amount
Merchant shows merchant page to user to input amount for top up transactions.

Notification from DANA
User receive top up notification from DANA.

Top up result
Merchant receive top up result.
Process Flow
The general flow of payment using the Disbursement to Balance is as follows:
Visit the Disbursement API Overview for edge cases and other scenarios.

- Merchant calls DANA's Check Disbursement Account API to verify their current account balance before processing any disbursements.
- DANA processes the request and returns the merchant's current balance information, enabling them to confirm sufficient funds are available for disbursements.
- User initiates a top up request through the merchant by entering their DANA registered phone number, indicating their intention to add funds to their DANA account.
- Merchant calls Account Inquiry API to verify the user's DANA account details and ensure the account is valid and active for receiving funds.
- DANA processes the account inquiry request by validating information about the user and the merchant to determine their eligibility for top-up by checking limits, payer and risk scope to returns the user's account information to the merchant.
- Merchant displays the user to specify the desired top up amount they wish to add to their DANA account.
- User provides the top up amount to the merchant, confirming the transaction details.
- Merchant deducts the specified amount from the user's payment method or account balance within their platform.
- Merchant calls Customer Top Up API, sending the user's account details and the top up amount to initiate the disbursement.
- DANA processes the disbursement by deducting the specified amount from merchant's balance and crediting the amount to the user's DANA account.
- DANA returns a successful transaction result to merchant, confirming the top up has been completed.
- Merchant notifies user that their DANA account top up was successful.
- DANA sends a push notification directly to the user's mobile device, confirming the successful top up and updated account balance.
- NodeJS
- Go
- PHP
Step 1 : Library Installation
Visit our Libraries & Plugins guide for detailed information on our SDK.
DANA provides server-side API libraries for several programming languages, available through common package managers, for easier installation and version management. Follow the guide below to install our library:
Requirements
- Node.js version 18 or later
- Your testing credentials from the merchant portal.
Installation
Install using npm or visit our Githubnpm install dana-node@latest --save
Set up the env
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
Step 2 : Initialize the library
Visit our Authentication guide to learn about the authentication process when not using our Library.
Follow the guide below to initialize the library
import { Dana } from 'dana-node';
const danaClient = new Dana({
partnerId: "YOUR_PARTNER_ID", // process.env.X_PARTNER_ID
privateKey: "YOUR_PRIVATE_KEY", // process.env.X_PRIVATE_KEY
origin: "YOUR_ORIGIN", // process.env.ORIGIN
env: "sandbox", // process.env.DANA_ENV or process.env.ENV or "sandbox" or "production"
});
const { disbursementApi } = danaClient;
Step 3 : Check Your Merchant Balance
Before processing transfer funds, call DANA's Check Disbursement Account API to verify that your merchant deposit account has sufficient funds. DANA will return your current available balance so you can confirm you have enough money for the transfer amount. If your balance is insufficient, top up your account balance via the Virtual Account (VA) displayed in Merchant Portal.
import { Dana } from 'dana-node';
import { QueryMerchantResourceRequest, QueryMerchantResourceResponse } from 'dana-node/merchant_management/v1';
// .. initialize client with authentication
const request: QueryMerchantResourceRequest = {
// Fill in required fields here, refer to Check Disbursement Account API Detail
};
const response: QueryMerchantResourceResponse = await merchantManagementApi.queryMerchantResource(request);
Step 4 : Validate User’s Account
When you want to top up transaction to user's DANA account, you should call DANA's Account Inquiry API to verify the user's DANA account details and ensure the account is valid and active for receiving balance. You'll need to provide the amount, additionalInfo.fundType, customerNumber or customerName. DANA will process this inquiry and send the result to the merchant by providing the detail account information.
import { Dana } from 'dana-node';
import { DanaAccountInquiryRequest, DanaAccountInquiryResponse } from 'dana-node/disbursement/v1';
// .. initialize client with authentication
const request: DanaAccountInquiryRequest = {
// Fill in required fields here, refer to Account Inquiry API Detail
};
const response: DanaAccountInquiryResponse = await disbursementApi.danaAccountInquiry(request);
Step 5 : Execute the Customer Top Up
First, you provide top up amount page to user. After user puts the top up amount, call DANA's Customer Top Up API to process the top up from merchant to the user's DANA balance, this process starting by merchant deducts user’s account balance and requests of top up transaction to DANA. DANA will validate your request. After that, DANA deducts merchant’s deposit balance and at the same time, DANA credits user’s DANA Balance. You’ll receive an response result of top up process as success.
import { Dana } from 'dana-node';
import { TransferToDanaRequest, TransferToDanaResponse } from 'dana-node/disbursement/v1';
// .. initialize client with authentication
const request: TransferToDanaRequest = {
// Fill in required fields here, refer to Customer Top Up API Detail
};
const response: TransferToDanaResponse = await disbursementApi.transferToDana(request);
Step 6 : Receive Top Up Status Updates
If you don't receive result from Customer Top Up API and got the timeout after do retry for 5 times, use the Customer Top Up Inquiry Status API to manually check the top up status and get the latest transaction status and information.
import { Dana } from 'dana-node';
import { TransferToDanaInquiryStatusRequest, TransferToDanaInquiryStatusResponse } from 'dana-node/disbursement/v1';
// .. initialize client with authentication
const request: TransferToDanaInquiryStatusRequest = {
// Fill in required fields here, refer to Customer Top Up Inquiry Status API Detail
};
const response: TransferToDanaInquiryStatusResponse = await disbursementApi.transferToDanaInquiryStatus(request);
Step 7 : Automated UAT Testing Suite
To verify your integration, run our automated test suite. It takes under 2 minutes to tests your integration with mandated test scenarios. Check out the Github repo for more instructions
Step 8 : Apply for Live Payment
As part of regulatory compliance, merchants are required to submit UAT testing documents to meet Bank Indonesia's requirements. After completing sandbox testing, follow these steps to move to production:
Generate production keys
Create your production private and public keys, follow this instruction: Authentication - Production Credential.Confirm UAT testing logs
Confirm that you have completed all testing scenarios from our Merchant Portal.Fill go-live submission form
Follow the instructions inside our Merchant Portal to apply for production credentials. We will process your application in 1-2 days.Obtain production credentials
Once approved, you will receive your production credentials such as: Merchant ID, Client ID known as X-PARTNER-ID, and Client Secret.
Testing in production environment
Configure production environment
Switch your application settings from sandbox to production environment by updating the API endpoints and credentials.Test using production credentials
Conduct the same testing scenarios as sandbox testing, using your production credentials.UAT production sign-off
Once testing is complete, DANA will prepare the UAT Production Sign Off document in the Merchant Portal. Both merchant and DANA representatives must sign this document to formally approve the integration.Go-live
After receiving all approvals, your DANA integration will be activated and ready for live payments from your customers.
Ready to submit testing documents?
Access our merchant portal for detailed guide to start receiving live payments
Step 1 : Library Installation
Visit our Libraries & Plugins guide for detailed information on our SDK.
DANA provides server-side API libraries for several programming languages, available through common package managers, for easier installation and version management. Follow the guide below to install our library:
Requirements
- go.mod
- go.sum file
- Your testing credentials from the merchant portal.
Installation
Install or visit our Githubgo get github.com/dana-id/dana-go
Set up the env
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
Import Package
import (
disbursement "github.com/dana-id/dana-go/disbursement/v1"
)
Step 2 : Initialize the library
Visit our Authentication guide to learn about the authentication process when not using our Library.
Follow the guide below to initialize the library
package main
import (
"context"
"fmt"
"os"
dana "github.com/dana-id/dana-go"
"github.com/dana-id/dana-go/config"
disbursement "github.com/dana-id/dana-go/disbursement/v1"
)
func main() {
// Configuring api client
// Api client should be singleton, can reuse the apiClient for multiple requests in various operations
configuration := config.NewConfiguration()
configuration.APIKey = &config.APIKey{
DANA_ENV: config.ENV_SANDBOX, // use config.ENV_PRODUCTION for production
// ENV: config.ENV_SANDBOX, // use config.ENV_PRODUCTION for production. Can use DANA_ENV instead
X_PARTNER_ID: os.Getenv("X_PARTNER_ID"),
PRIVATE_KEY: os.Getenv("PRIVATE_KEY"), // Can provide the private key directly as a string or via a file path (PRIVATE_KEY_PATH). If both added, we will prioritize the path
ORIGIN: os.Getenv("ORIGIN"),
// PRIVATE_KEY_PATH: os.Getenv("PRIVATE_KEY_PATH"),
}
apiClient := dana.NewAPIClient(configuration)
Step 3 : Check Your Merchant Balance
Before processing transfer funds, call DANA's Check Disbursement Account API to verify that your merchant deposit account has sufficient funds. DANA will return your current available balance so you can confirm you have enough money for the transfer amount. If your balance is insufficient, top up your account balance via the Virtual Account (VA) displayed in Merchant Portal.
package main
import (
"context"
"fmt"
"os"
dana "github.com/dana-id/dana-go"
"github.com/dana-id/dana-go/config"
merchant_management "github.com/dana-id/dana-go/merchant_management/v1"
)
func main() {
// ... define authentication
request := payment_gateway.QueryMerchantResourceRequest{
// Fill in required fields here, refer to Check Disbursement Account API Detail
}
_, r, err := apiClient.PaymentGatewayAPI.QueryMerchantResource(context.Background()).QueryMerchantResourceRequest(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MerchantManagementAPI.QueryMerchantResource``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `QueryMerchantResource`: QueryMerchantResourceResponse
fmt.Fprintf(os.Stdout, "Response from `MerchantManagementAPI.QueryMerchantResource`: %v\n", r.Body)
}
Step 4 : Validate User’s Account
When you want to top up transaction to user's DANA account, you should call DANA's Account Inquiry API to verify the user's DANA account details and ensure the account is valid and active for receiving balance. You'll need to provide the amount, additionalInfo.fundType, customerNumber or customerName. DANA will process this inquiry and send the result to the merchant by providing the detail account information.
package main
import (
"context"
"fmt"
"os"
dana "github.com/dana-id/dana-go"
"github.com/dana-id/dana-go/config"
disbursement "github.com/dana-id/dana-go/disbursement/v1"
)
func main() {
// ... define authentication
request := disbursement.DanaAccountInquiryRequest{
// Fill in required fields here, refer to Account Inquiry API Detail
}
_, r, err := apiClient.DisbursementAPI.DanaAccountInquiry(context.Background()).DanaAccountInquiryRequest(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DisbursementAPI.DanaAccountInquiry`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DanaAccountInquiry`: DanaAccountInquiryResponse
fmt.Fprintf(os.Stdout, "Response from `DisbursementAPI.DanaAccountInquiry`: %v\n", r.Body)
}
Step 5 : Execute the Customer Top Up
First, you provide top up amount page to user. After user puts the top up amount, call DANA's Customer Top Up API to process the top up from merchant to the user's DANA balance, this process starting by merchant deducts user’s account balance and requests of top up transaction to DANA. DANA will validate your request. After that, DANA deducts merchant’s deposit balance and at the same time, DANA credits user’s DANA Balance. You’ll receive an response result of top up process as success.
package main
import (
"context"
"fmt"
"os"
dana "github.com/dana-id/dana-go"
"github.com/dana-id/dana-go/config"
disbursement "github.com/dana-id/dana-go/disbursement/v1"
)
func main() {
// ... define authentication
request := disbursement.TransferToDanaRequest{
// Fill in required fields here, refer to Customer Top Up API Detail
}
_, r, err := apiClient.DisbursementAPI.TransferToDana(context.Background()).TransferToDanaRequest(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DisbursementAPI.TransferToDana`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TransferToDana`: TransferToDanaResponse
fmt.Fprintf(os.Stdout, "Response from `DisbursementAPI.TransferToDana`: %v\n", r.Body)
}
Step 6 : Receive Top Up Status Updates
If you don't receive result from Customer Top Up API and got the timeout after do retry for 5 times, use the Customer Top Up Inquiry Status API to manually check the top up status and get the latest transaction status and information.
package main
import (
"context"
"fmt"
"os"
dana "github.com/dana-id/dana-go"
"github.com/dana-id/dana-go/config"
disbursement "github.com/dana-id/dana-go/disbursement/v1"
)
func main() {
// ... define authentication
request := disbursement.TransferToDanaInquiryStatusRequest{
// Fill in required fields here, refer to Customer Top Up Inquiry Status API Detail
}
_, r, err := apiClient.DisbursementAPI.TransferToDanaInquiryStatus(context.Background()).TransferToDanaInquiryStatusRequest(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DisbursementAPI.TransferToDanaInquiryStatus`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TransferToDanaInquiryStatus`: TransferToDanaInquiryStatusResponse
fmt.Fprintf(os.Stdout, "Response from `DisbursementAPI.TransferToDanaInquiryStatus`: %v\n", r.Body)
}
Step 7 : Automated UAT Testing Suite
To verify your integration, run our automated test suite. It takes under 2 minutes to tests your integration with mandated test scenarios. Check out the Github repo for more instructions
Step 8 : Apply for Live Payment
As part of regulatory compliance, merchants are required to submit UAT testing documents to meet Bank Indonesia's requirements. After completing sandbox testing, follow these steps to move to production:
Generate production keys
Create your production private and public keys, follow this instruction: Authentication - Production Credential.Confirm UAT testing logs
Confirm that you have completed all testing scenarios from our Merchant Portal.Fill go-live submission form
Follow the instructions inside our Merchant Portal to apply for production credentials. We will process your application in 1-2 days.Obtain production credentials
Once approved, you will receive your production credentials such as: Merchant ID, Client ID known as X-PARTNER-ID, and Client Secret.
Testing in production environment
Configure production environment
Switch your application settings from sandbox to production environment by updating the API endpoints and credentials.Test using production credentials
Conduct the same testing scenarios as sandbox testing, using your production credentials.UAT production sign-off
Once testing is complete, DANA will prepare the UAT Production Sign Off document in the Merchant Portal. Both merchant and DANA representatives must sign this document to formally approve the integration.Go-live
After receiving all approvals, your DANA integration will be activated and ready for live payments from your customers.
Ready to submit testing documents?
Access our merchant portal for detailed guide to start receiving live payments
Step 1 : Library Installation
Visit our Libraries & Plugins guide for detailed information on our SDK.
DANA provides server-side API libraries for several programming languages, available through common package managers, for easier installation and version management. Follow the guide below to install our library:
Requirements
- PHP 7.4+, compatible with PHP 8.0.
- Your testing credentials from the merchant portal.
Installation
Install using composer or visit our Github- Using Composer
- Add the following code to
composer.json
- Add the following code to
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
- Run
composer install
- Manual Installation
<?php
require_once('/path/to/DanaPhp/vendor/autoload.php');
Set up the env
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
Step 2 : Initialize the library
Visit our Authentication guide to learn about the authentication process when not using our Library.
Follow the guide below to initialize the library
import { Dana } from 'dana-node';
const danaClient = new Dana({
partnerId: "YOUR_PARTNER_ID", // process.env.X_PARTNER_ID
privateKey: "YOUR_PRIVATE_KEY", // process.env.X_PRIVATE_KEY
origin: "YOUR_ORIGIN", // process.env.ORIGIN
env: "sandbox", // process.env.DANA_ENV or process.env.ENV or "sandbox" or "production"
});
const { disbursementApi } = danaClient;
Step 3 : Check Your Merchant Balance
Before processing transfer funds, call DANA's Check Disbursement Account API to verify that your merchant deposit account has sufficient funds. DANA will return your current available balance so you can confirm you have enough money for the transfer amount. If your balance is insufficient, top up your account balance via the Virtual Account (VA) displayed in Merchant Portal.
import { Dana } from 'dana-node';
import { QueryMerchantResourceRequest, QueryMerchantResourceResponse } from 'dana-node/merchant_management/v1';
// .. initialize client with authentication
const request: QueryMerchantResourceRequest = {
// Fill in required fields here, refer to Check Disbursement Account API Detail
};
const response: QueryMerchantResourceResponse = await merchantManagementApi.queryMerchantResource(request);
Step 4 : Validate User’s Account
When you want to top up transaction to user's DANA account, you should call DANA's Account Inquiry API to verify the user's DANA account details and ensure the account is valid and active for receiving balance. You'll need to provide the amount, additionalInfo.fundType, customerNumber or customerName. DANA will process this inquiry and send the result to the merchant by providing the detail account information.
import { Dana } from 'dana-node';
import { DanaAccountInquiryRequest, DanaAccountInquiryResponse } from 'dana-node/disbursement/v1';
// .. initialize client with authentication
const request: DanaAccountInquiryRequest = {
// Fill in required fields here, refer to Account Inquiry API Detail
};
const response: DanaAccountInquiryResponse = await disbursementApi.danaAccountInquiry(request);
Step 5 : Execute the Customer Top Up
First, you provide top up amount page to user. After user puts the top up amount, call DANA's Customer Top Up API to process the top up from merchant to the user's DANA balance, this process starting by merchant deducts user’s account balance and requests of top up transaction to DANA. DANA will validate your request. After that, DANA deducts merchant’s deposit balance and at the same time, DANA credits user’s DANA Balance. You’ll receive an response result of top up process as success.
import { Dana } from 'dana-node';
import { TransferToDanaRequest, TransferToDanaResponse } from 'dana-node/disbursement/v1';
// .. initialize client with authentication
const request: TransferToDanaRequest = {
// Fill in required fields here, refer to Customer Top Up API Detail
};
const response: TransferToDanaResponse = await disbursementApi.transferToDana(request);
Step 6 : Receive Top Up Status Updates
If you don't receive result from Customer Top Up API and got the timeout after do retry for 5 times, use the Customer Top Up Inquiry Status API to manually check the top up status and get the latest transaction status and information.
import { Dana } from 'dana-node';
import { TransferToDanaInquiryStatusRequest, TransferToDanaInquiryStatusResponse } from 'dana-node/disbursement/v1';
// .. initialize client with authentication
const request: TransferToDanaInquiryStatusRequest = {
// Fill in required fields here, refer to Customer Top Up Inquiry Status API Detail
};
const response: TransferToDanaInquiryStatusResponse = await disbursementApi.transferToDanaInquiryStatus(request);
Step 7 : Automated UAT Testing Suite
To verify your integration, run our automated test suite. It takes under 2 minutes to tests your integration with mandated test scenarios. Check out the Github repo for more instructions
Step 8 : Apply for Live Payment
As part of regulatory compliance, merchants are required to submit UAT testing documents to meet Bank Indonesia's requirements. After completing sandbox testing, follow these steps to move to production:
Generate production keys
Create your production private and public keys, follow this instruction: Authentication - Production Credential.Confirm UAT testing logs
Confirm that you have completed all testing scenarios from our Merchant Portal.Fill go-live submission form
Follow the instructions inside our Merchant Portal to apply for production credentials. We will process your application in 1-2 days.Obtain production credentials
Once approved, you will receive your production credentials such as: Merchant ID, Client ID known as X-PARTNER-ID, and Client Secret.
Testing in production environment
Configure production environment
Switch your application settings from sandbox to production environment by updating the API endpoints and credentials.Test using production credentials
Conduct the same testing scenarios as sandbox testing, using your production credentials.UAT production sign-off
Once testing is complete, DANA will prepare the UAT Production Sign Off document in the Merchant Portal. Both merchant and DANA representatives must sign this document to formally approve the integration.Go-live
After receiving all approvals, your DANA integration will be activated and ready for live payments from your customers.
Ready to submit testing documents?
Access our merchant portal for detailed guide to start receiving live payments