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.

- Merchant initiates the process by calling the Create Shop API to DANA to create a new shop.
- 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.
- DANA returns the result of the shop creation process back to the merchant, indicating success or failure.
- Merchant initiates the process by calling the Update Shop API to DANA to update shop information.
- DANA receives the request and validates the update shop information provided by the merchant.
- DANA returns the result of the shop update process back to the merchant, confirming the updated shop information.
- Merchant initiates the process by calling the Query Shop API to DANA to retrieve shop information.
- DANA receives the request and processes the query to retrieve shop information.
- DANA returns the result containing shop information details back to the merchant.
- 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 { 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.
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.
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.
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.
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:
- GOODS_SOLD_TYPE
- USER_PROFILING
- BusinessEntity
- DivisionIdType
- DivisionType
- DocType
- Loyalty
- OwnerIdType
- ParentRoleType
- PgDivisionFlag
- ResourceType
- ResultStatus
- ShopBizType
- ShopIdType
- ShopOwning
- ShopParentType
- SizeType
- 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:
- Access your Integration Checklist page inside the Merchant Portal
- Complete all the mandatory testing scenarios provided
- Download your verified API Logs using the Download Verification Proof button
- Complete your Go Live Submission checklist
- 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:
Generate production keys
Create your production private and public keys, follow this instruction: Authentication - Production Credential.Complete your UAT testing checklist
Confirm that you have completed all testing scenarios from our Merchant Portal.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.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.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
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 (
merchant_management "github.com/dana-id/dana-go/merchant_management/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"
merchant_management "github.com/dana-id/dana-go/merchant_management/v1"
)
func main() {
configuration := config.NewConfiguration()
// Set API keys
configuration.APIKey = &config.APIKey{
// ENV: config.ENV_SANDBOX, // use config.ENV_PRODUCTION for production. Can use DANA_ENV instead
DANA_ENV: config.ENV_SANDBOX, // use config.ENV_PRODUCTION for production
X_PARTNER_ID: os.Getenv("X_PARTNER_ID"),
PRIVATE_KEY: os.Getenv("PRIVATE_KEY"),
ORIGIN: os.Getenv("ORIGIN"),
// PRIVATE_KEY_PATH: os.Getenv("PRIVATE_KEY_PATH"),
}
apiClient := dana.NewAPIClient(configuration)
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.
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 := merchant_management.CreateShopRequest{
// Fill in required fields here, refer to Create Shop API Detail
}
_, r, err := apiClient.MerchantManagementAPI.CreateShop(context.Background()).CreateShopRequest(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MerchantManagementAPI.CreateShop``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateShop`: CreateShopResponse
fmt.Fprintf(os.Stdout, "Response from `MerchantManagementAPI.CreateShop`: %v\n", r.Body)
}
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.
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 := merchant_management.UpdateShopRequest{
// Fill in required fields here, refer to Update Shop API Detail
}
_, r, err := apiClient.MerchantManagementAPI.UpdateShop(context.Background()).UpdateShopRequest(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MerchantManagementAPI.UpdateShop``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateShop`: UpdateShopResponse
fmt.Fprintf(os.Stdout, "Response from `MerchantManagementAPI.UpdateShop`: %v\n", r.Body)
}
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.
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 := merchant_management.QueryShopRequest{
// Fill in required fields here, refer to Query Shop API Detail
}
_, r, err := apiClient.MerchantManagementAPI.QueryShop(context.Background()).QueryShopRequest(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MerchantManagementAPI.QueryShop``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `QueryShop`: QueryShopResponse
fmt.Fprintf(os.Stdout, "Response from `MerchantManagementAPI.QueryShop`: %v\n", r.Body)
}
Additional Enum Configuration
The library provides several enums (enumerations) to represent a fixed set of constant values, ensuring consistency and reducing errors during integration.
import merchant_management "github.com/dana-id/dana-go/merchant_management/v1"
value := string(merchant_management.SHOPPARENTTYPE_MERCHANT_)
The following enums are available in the Library Shop:
- GOODS_SOLD_TYPE
- USER_PROFILING
- BusinessEntity
- DivisionIdType
- DivisionType
- DocType
- Loyalty
- OwnerIdType
- ParentRoleType
- PgDivisionFlag
- ResourceType
- ResultStatus
- ShopBizType
- ShopIdType
- ShopOwning
- ShopParentType
- SizeType
- 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:
- Access your Integration Checklist page inside the Merchant Portal
- Complete all the mandatory testing scenarios provided
- Download your verified API Logs using the Download Verification Proof button
- Complete your Go Live Submission checklist
- 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:
Generate production keys
Create your production private and public keys, follow this instruction: Authentication - Production Credential.Complete your UAT testing checklist
Confirm that you have completed all testing scenarios from our Merchant Portal.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.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.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
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'
CHANNEL_ID # XXX
Obtaining merchant credentials: Authentication
Import Package
use Dana\MerchantManagement\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
<?php
use Dana\Configuration;
use Dana\Env;
use Dana\MerchantManagement\v1\Api\MerchantManagementApi;
use Dana\MerchantManagement\v1\Model\QueryShopRequest;
// Set up configuration with authentication settings
$configuration = new Configuration();
// The Configuration constructor automatically loads values from environment variables
// Choose one of PRIVATE_KEY or PRIVATE_KEY_PATH to set, if you set both, PRIVATE_KEY will be ignored
$configuration->setApiKey('PRIVATE_KEY', getenv('PRIVATE_KEY'));
// $configuration->setApiKey('PRIVATE_KEY_PATH', getenv('PRIVATE_KEY_PATH'));
$configuration->setApiKey('ORIGIN', getenv('ORIGIN'));
$configuration->setApiKey('X_PARTNER_ID', getenv('X_PARTNER_ID'));
$configuration->setApiKey('DANA_ENV', Env::SANDBOX);
// Choose one of ENV or DANA_ENV to set, if you set both, ENV will be ignored
// $configuration->setApiKey('ENV', Env::SANDBOX);
$apiInstance = new MerchantManagementApi(
null, // this also can be set to custom http client which implements `GuzzleHttp\ClientInterface`
$configuration
);
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.
<?php
use Dana\Configuration;
use Dana\Env;
use Dana\MerchantManagement\v1\Api\MerchantManagementApi;
use Dana\MerchantManagement\v1\Model\CreateShopRequest;
// ... define authentication
$createShopRequest = CreateShopRequest();
try {
$result = $apiInstance->queryMerchantResource($queryMerchantResourceRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MerchantManagementApi->queryMerchantResource: ', $e->getMessage(), PHP_EOL;
}
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.
<?php
use Dana\Configuration;
use Dana\Env;
use Dana\MerchantManagement\v1\Api\MerchantManagementApi;
use Dana\MerchantManagement\v1\Model\UpdateShopRequest;
// ... define authentication
$updateShopRequest = UpdateShopRequest();
try {
$result = $apiInstance->updateShop($updateShopRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MerchantManagementApi->updateShop: ', $e->getMessage(), PHP_EOL;
}
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.
<?php
use Dana\Configuration;
use Dana\Env;
use Dana\MerchantManagement\v1\Api\MerchantManagementApi;
use Dana\MerchantManagement\v1\Model\QueryShopRequest;
// ... define authentication
$queryShopRequest = QueryShopRequest();
try {
$result = $apiInstance->queryShop($queryShopRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MerchantManagementApi->queryShop: ', $e->getMessage(), PHP_EOL;
}
Additional Enum Configuration
The library provides several enums (enumerations) to represent a fixed set of constant values, ensuring consistency and reducing errors during integration.
// Importing an enum class
use Dana\MerchantManagement\v1\Enum\GoodsSoldType;
// Using enum constants
$model->setProperty(GoodsSoldType::DIGITAL);
// Using enum values directly as strings
$model->setProperty('DIGITAL');
The following enums are available in the Library Shop:
- GOODS_SOLD_TYPE
- USER_PROFILING
- BusinessEntity
- DivisionIdType
- DivisionType
- DocType
- Loyalty
- OwnerIdType
- ParentRoleType
- PgDivisionFlag
- ResourceType
- ResultStatus
- ShopBizType
- ShopIdType
- ShopOwning
- ShopParentType
- SizeType
- 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:
- Access your Integration Checklist page inside the Merchant Portal
- Complete all the mandatory testing scenarios provided
- Download your verified API Logs using the Download Verification Proof button
- Complete your Go Live Submission checklist
- 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:
Generate production keys
Create your production private and public keys, follow this instruction: Authentication - Production Credential.Complete your UAT testing checklist
Confirm that you have completed all testing scenarios from our Merchant Portal.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.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.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