Authentication
Authentication Process
Authentication is an API security procedure to recognize the identity of a foreign request. If the identity is recognized by the system, then the request can access the API.
In this case, NICEPAY first requires an API Key identity called merchantKey from your request. So you can connect with NICEPAY without any obstacles. Apart from merchantKey, you are also required to send the mandatory parameter, namely merchantToken.
Merchant Key
Merchant Keys are divided into two types, namely Sandbox Credentials and Production Credentials.
Sandbox Credentials
If you want to test our API first before carrying out the integration process with NICEPAY, please use the following credentials provided below using iMid IONPAYTEST.
iMid is an identity or your ID as a Merchant on NICEPAY. iMid that is only devoted to your business usage will be given after you officially register as our Merchant. To perform testing, please use iMid IONPAYTEST and the specific Merchant key in Sandbox Credentials.
iMid (Merchant ID) | IONPAYTEST (AutoPaid) |
|---|---|
merchantKey | 33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A== |
The credentials above are provided for testing purposes only and the payment process will be made successful automatically (AutoPaid).
Production/Live Credentials
If you are already registered as a NICEPAY Merchant and want to perform the integration stage with real transactions, you can view the merchantKey that we specifically created with your iMid in the portal Merchant Back Office.
Here are the steps to get merchantKey:
- Access your Merchant Back Office dashboard.
- Select a menu Profile.
- Select a sub-menu Merchant Data.
- Select tab Other.
- Scroll down to get your merchantKey.

Don't forget to include the iMid parameter according to the registered iMid for your business when integrating with us.
Merchant Token
MerchantToken uses by the Merchant to proceed the security authentication process with the NICEPAY system. This parameter was created using the SHA-256 hashing method that includes parameters iMid, merchantKey along with the other variables needed. Here are the details of Merchant Token:
//Generate merchantToken//
merchantData = timeStamp + iMid + refNo + amount + merchantKey;
merTok = CryptoJS.SHA256(merchantData).toString(CryptoJS.enc.Hex);
Sample:
merchantData = 20221202101271 + IONPAYTEST + OrdNo-20221202101271 + 100000 + 33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A==
merTok = d7c10cfccd64fdb21836f4330bb23f9ed357bc4b02420399d48b4661b89a55a0Parameter | Type | Size | Description |
|---|---|---|---|
timeStamp | N | 14 | Transaction Timestamp (YYYYMMDDHHMMSS) |
iMid | AN | 10 | Merchant ID |
refNo | ANS | 40 | Merchant's Reference Number |
amount | N | 12 | Amount |
merchantKey | ANS | 88 | Merchant Key |
NICEPAY API URL
Here's the NICEPAY API URL you can use according to your needs. This URL must be requested via the HTTPS protocol to connect with us.
Environment | Protocol | Base URL |
|---|---|---|
Development | https | https://dev.nicepay.co.id/ |
Staging | https | https://staging.nicepay.co.id/ |
Production | https | https://www.nicepay.co.id/ |
Payment Method Testing
After you got all the authentication requirements that can interact with our API, please visit the page below to test with our services.
Payment Method | Credential |
|---|---|
Credit Card | |
Convenience Store | |
Direct Debit | |
Paylater | |
GPN |