Skip to main content

Division


Division (also referred to as Sub-Merchant) is a logical group under a merchant that organizes multiple shops. It enables merchants to manage business units, track performance, and process payments or settlements at the division level.

Merchant management is also available for shop. Check our Merchant Management 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 Division as your solution.
  • Obtain your testing credentials from the merchant portal.

Process Flow

The general flow of Division is as follows:

Visit the Division API Overview for other scenarios.

Division
  1. Merchant initiates the process by calling the Create Division API to DANA to create a new division.
  2. DANA receives the request and begins validating the division information provided by the merchant. After validation, DANA processes the request to create a new division in the system.
  3. DANA returns the result of the division creation process back to the merchant, indicating success or failure.
  4. Merchant initiates the process by calling the Update Division API to DANA to update division information.
  5. DANA receives the request and validates the update division information provided by the merchant.
  6. DANA returns the result of the division update process back to the merchant, confirming the updated division information.
  7. Merchant initiates the process by calling the Query Division API to DANA to got division information.
  8. DANA receives the request and processes the query to retrieve division information.
  9. DANA returns the result containing division information details back to the merchant.

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

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


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

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"
clientSecret: "YOUR_CLIENT_SECRET", // process.env.X_CLIENT_SECRET
});
const { merchantManagementApi } = danaClient;

Step 3 : Save your a new Division information

Use Create Division API to create a new division. Each division has a unique identifier (divisionId).
To create a new division, make a POST request to the Create Division API.

Create a New Division Information
import { Dana } from 'dana-node';
import { CreateDivisionRequest, CreateDivisionResponse } from 'dana-node/merchant_management/v1';

// .. initialize client with authentication

const request: CreateDivisionRequest = {
// Define the request parameters for the API call here
};

const response: CreateDivisionResponse = await merchantManagementApi.createDivision(request);

Step 4 : Maintain your division information by hitting Update Division API

Use this API to modify or update information of an existing division (e.g. name, contact details, address, settings).
To update a division, make a POST request to Update Division API.

Update Division
import { Dana } from 'dana-node';
import { UpdateDivisionRequest, UpdateDivisionResponse } from 'dana-node/merchant_management/v1';

// .. initialize client with authentication

const request: UpdateDivisionRequest = {
// Define the request parameters for the API call here
};

const response: UpdateDivisionResponse = await merchantManagementApi.updateDivision(request);

Step 5 : Inquire your division information

Use Query Division API to retrieve the latest division information, such as getting division details by ID or getting a list of all divisions under a merchant.

Query Division
import { Dana } from 'dana-node';
import { QueryDivisionRequest, QueryDivisionResponse } from 'dana-node/merchant_management/v1';

// .. initialize client with authentication

const request: QueryDivisionRequest = {
// Define the request parameters for the API call here
};

const response: QueryDivisionResponse = await merchantManagementApi.queryDivision(request);

Additional Enum Configuration

The library provides several enums (enumerations) to represent a fixed set of constant values, ensuring consistency and reducing errors during integration.

Example Usage
import { MobileNoInfoVerifiedEnum } from 'dana-node/merchant_management/v1';

// Use the enum value
const verified = MobileNoInfoVerifiedEnum.True;

The following enums are available in the Library Division:

  1. GOODS_SOLD_TYPE
  2. USER_PROFILING
  3. BusinessEntity
  4. DivisionIdType
  5. DivisionType
  6. DocType
  7. Loyalty
  8. OwnerIdType
  9. ParentRoleType
  10. PgDivisionFlag
  11. ResourceType
  12. ResultStatus
  13. ShopBizType
  14. ShopIdType
  15. ShopOwning
  16. ShopParentType
  17. SizeType
  18. Verified

Step 6 : Test using our automated test suite

Visit our Scenario Testing guide for detailed information on testing requirements.

We are required by local regulators to ensure your integration works correctly across all critical use cases. Use our sandbox environment and Merchant Portal to safely conduct UAT testing on a list of mandatory testing scenarios.

To complete our mandatory testing requirements, follow these steps:

  1. Access your Integration Checklist page inside the Merchant Portal
  2. Complete all the mandatory testing scenarios provided
  3. Download your verified API Logs using the Download Verification Proof button
  4. Complete your Go Live Submission checklist
  5. Submit your verified API logs on your Production Submission form

UAT Testing Script

Use our specialized UAT testing suite to save days of debugging.

To speed up your integration, we have provided an automated test suite. It takes under 15 minutes to run your integration against our test scenarios. Check out the Github repo for more instructions


Step 7 : Submit testing documents & apply for production

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:

  1. Generate production keys
    Create your production private and public keys, follow this instruction: Authentication - Production Credential.

  2. Complete your UAT testing checklist
    Confirm that you have completed all testing scenarios from our Merchant Portal.

  3. Fill out your Production Submission form
    Follow the instructions inside our Merchant Portal to apply for production credentials. We will process your application in 1-2 days.

  4. 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

  1. Configure production environment
    Switch your application settings from sandbox to production environment by updating the API endpoints and credentials.

  2. Test using production credentials
    Conduct the same testing scenarios as sandbox testing, using your production credentials.

  3. 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.

  4. Receive live payments
    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

ask AIAI Assistant
Need help with our documentation?
Start from our frequently asked questions or feel free to ask anything else.

AI generated responses may contain mistakes.