NICEPAY API
...
API Version 2 (V2)
Advance API
NICEPAY Service Status API - Advance API
8min
1<!-- <p>paste iframe code here</p> --> Please contact <a style="color:blue; text-decoration-line:underline" href="mailto:cs@nicepay.co.id">Marketing NICEPAY</a> for further information and assistance.
Sample Source
Request Parameter
Response Parameter - Positive Case
Response Parameter - Negative Case
1HashMap < String,Object >
2requestMap = new HashMap < String, Object > ();
3requestMap.put(“iMid”, ”nicePay.get(iMid)”);
4requestMap.put(“merchantToken”, nicePay, makeToken(nicePay.get(iMid))
5try { //Make json
6 ObjectMapper mapper = new ObjectMapper();
7 String contents = mapper.writeValueAsString(requestMap);
8 URL url = new URL(myDomain + "/nicepay/serviceStatus.do");
9 URLConnection conn = url.openConnection();
10 conn.setDoOutput(true);
11 conn.setUseCaches(false);
12 conn.setRequestProperty("Content-Type", "application/json");
13 DataOutputStream os = null;
14 try {
15 os = new DataOutputStream(conn.getOutputStream());
16 os.writeBytes(contents);
17 os.flush();
18 } finally {
19 if (out != null) os.close();
20 }
21 InputStreamReader isr = new InputStreamReader(conn.getInputStream(), "UTF-8");
22 BufferedReader br = new BufferedReader(isr);
23 String str = "";
24 resultData = "";
25 while ((str = br.readLine()) != null) {
26 resultData += str;
27 }
28 br.close();
29} catch(MalformedURLException e) {
30 System.out.println("The URL address is incorrect.");
31 e.printStackTrace();
32} catch(Exception e) {
33 System.out.println("It can't connect to the web page.");
34 e.printStackTrace();
35}
Updated 20 May 2025
Did this page help you?