Skip to main content

Shop


Shop refers to a merchant’s actual store or outlet within each division or category. It represents the operational unit where transactions take place and can be managed individually using the DANA API.

Merchant management is also available for division. 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 Shop as your solution.
  • Obtain your testing credentials from the merchant portal.

Process Flow

The general flow using Shop is as follows:

Visit the Shop API Overview for other scenarios.

Shop
  1. Merchant initiates the process by calling the Create Shop API to DANA to create a new shop.
  2. DANA receives the request and begins validating the shop information provided by the merchant. After validation, DANA processes the request to create a new shop in the system.
  3. DANA returns the result of the shop creation process back to the merchant, indicating success or failure.
  4. Merchant initiates the process by calling the Update Shop API to DANA to update shop information.
  5. DANA receives the request and validates the update shop information provided by the merchant.
  6. DANA returns the result of the shop update process back to the merchant, confirming the updated shop information.
  7. Merchant initiates the process by calling the Query Shop API to DANA to retrieve shop information.
  8. DANA receives the request and processes the query to retrieve shop information.
  9. DANA returns the result containing shop 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"
});
const { merchantManagementApi } = danaClient;

Step 3 : Save your a new shop information

Use Create Shop API to create a new shop. Each shop has a unique identifier (shopId).
To create a new shop, make a POST request to the Create Shop API.

Create a New Shop
import { Dana } from 'dana-node';
import { CreateShopRequest, CreateShopResponse } from 'dana-node/merchant_management/v1';

// .. initialize client with authentication

const request: CreateShopRequest = {
// Fill in required fields here, refer to Create Shop API Detail
};

const response: CreateShopResponse = await merchantManagementApi.createShop(request);

Step 4 : Maintain your shop information by hitting Update Shop API

Use this API to update information about an existing shop. You can modify existing shop information such as name, address, phone number, etc.
To update a shop, make a POST request to Update Shop API.

Update Shop
import { Dana } from 'dana-node';
import { UpdateShopRequest, UpdateShopResponse } from 'dana-node/merchant_management/v1';

// .. initialize client with authentication

const request: UpdateShopRequest = {
// Fill in required fields here, refer to Update Shop API Detail
};

const response: UpdateShopResponse = await merchantManagementApi.updateShop(request);

Step 5 : Inquire your shop information

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

Query Shop
import { Dana } from 'dana-node';
import { QueryShopRequest, QueryShopResponse } from 'dana-node/merchant_management/v1';

// .. initialize client with authentication

const request: QueryShopRequest = {
// Fill in required fields here, refer to Query Shop API Detail
};

const response: QueryShopResponse = await merchantManagementApi.queryShop(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 Shop:

  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.