Merchant Detail
Merchant Detail
Service ini digunakan untuk meilhat detail data dari merchant
Service Info
HTTP Method | POST |
---|---|
Service Code | 22 |
Http Method | POST |
Path | .../v1.0/merchant/detail |
Authentication | OAuth 2.0 |
Header
Header Name | Tipe Data | Wajib | Deskripsi |
---|---|---|---|
Content-Type | String | Y | application/json |
X-TIMESTAMP | String | Y | Waktu lokal klien saat ini yyyy-MM-ddTHH:mm:ss.SSSTZD format |
X-PARTNER-ID | String | Y | Client’s client_id (diberikan pada saat onboarding ) |
X-CHANNEL-ID | String | Y | ID channel merchant |
X-SIGNATURE | String | Y | Dibuat dengan algoritma asymmetric with token : Signature Generation |
X-EXTERNAL-ID | String | Y | ID external merchant (tidak boleh sama di hari yang sama) |
Body
Nama Field | Tipe Data | Wajib | Deskripsi |
---|---|---|---|
merchantId | String | Y | Kode Unik Setiap Merchant |
- JSON
- CURL
- PHP
- NODE JS
- GO
{
"merchantId" : "121xxxx"
};
curl --location --request POST '.../v1.0/merchant/detail' \
--header 'x-client-key: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc' \
--header 'x-timestamp: 2024-01-16T10:54:21+07:00' \
--header 'x-signature: qrQQSSkvCXxYE3MWJpsn+loHuh4+1xlNWEF6oKmqJgbBJHYqnYoBAYgsv/+DXC7dMeGgdu2dkbXBuMQUD/cGZQ==' \
--header 'x-partner-id: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc' \
--header 'channel-id: 23412' \
--header 'x-external-id: 2024-05-15T06:56:02.642Z' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5' \
--data-raw '{
"merchantId" : "121xxxx"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '../v1.0/merchant/detail',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"merchantId" : "121xxxx"
}',
CURLOPT_HTTPHEADER => array(
'x-client-key: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'x-timestamp: 2024-01-16T10:54:21+07:00',
'x-signature: qrQQSSkvCXxYE3MWJpsn+loHuh4+1xlNWEF6oKmqJgbBJHYqnYoBAYgsv/+DXC7dMeGgdu2dkbXBuMQUD/cGZQ==',
'x-partner-id: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'channel-id: 23412',
'x-external-id: 2024-05-15T06:56:18.301Z',
'Content-Type: application/json',
'Authorization: Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var request = require('request');
var options = {
'method': 'POST',
'url': '../v1.0/merchant/detail',
'headers': {
'x-client-key': '6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'x-timestamp': '2024-01-16T10:54:21+07:00',
'x-signature': 'qrQQSSkvCXxYE3MWJpsn+loHuh4+1xlNWEF6oKmqJgbBJHYqnYoBAYgsv/+DXC7dMeGgdu2dkbXBuMQUD/cGZQ==',
'x-partner-id': '6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'channel-id': ' 23412',
'x-external-id': '2024-05-15T06:56:45.081Z',
'Content-Type': ' application/json',
'Authorization': 'Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5'
},
body: '{
"merchantId" : "121xxxx"
}'
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "../v1.0/merchant/detail"
method := "POST"
payload := strings.NewReader(`{
"merchantId" : "121xxxx"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("x-client-key", "6c57db4e-9e11-4951-9bcf-d6f177dafbcc")
req.Header.Add("x-timestamp", "2024-01-16T10:54:21+07:00")
req.Header.Add("x-signature", "qrQQSSkvCXxYE3MWJpsn+loHuh4+1xlNWEF6oKmqJgbBJHYqnYoBAYgsv/+DXC7dMeGgdu2dkbXBuMQUD/cGZQ==")
req.Header.Add("x-partner-id", "6c57db4e-9e11-4951-9bcf-d6f177dafbcc")
req.Header.Add("channel-id", " 23412")
req.Header.Add("x-external-id", "2024-05-15T06:57:04.004Z")
req.Header.Add("Content-Type", " application/json")
req.Header.Add("Authorization", "Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
Parameter | Tipe Data | Deskripsi |
---|---|---|
responseCode | String | Kode response |
responseMessage | String | Pesan response |
additionalInfo | Object | Informasi tambahan. |
merchantId | String | Kode Unik setiap merchant |
nama_pemilik | String | Nama Pemilik Merchant |
alamat_pemilik | String | Alamat Pemilik Merchant |
notelp_pemilik | String | Nomor Telepon Pemilik Merchant |
alamat_outlet | String | Alamat Merchant |
email_pemilik | String | Email Pemilik |
email_outlet | String | Email Merchant |
kode_pos_pemilik | String | Kode Pos Pemilik |
nmid | String | National Merchant Id |
mid | String | Merchant unique id |
mpan | String | Merchant Presented Mode |
kategori_usaha_merchant | String | Kategori dari usaha merchant |
merchant_type | String | tipe dari merchant 0 - Individu 1 - Badan Usaha |
tipe_qr | String | tipe qr merchant |
nama_merchant | String | Nama merchant |
mcc | String | Merchant category code |
jumlah_terminal_pten | String | Jumlah Terminal merchant pada pten |
npwp | String | Nomor Pokok Wajib Pajak |
no_ktp_merchant | String | nomor ktp merchant |
kode_pos_pten | String | Kode pos yang terdaftar di PTEN |
is_onlishop | Integer | Platfrom usaha merchant 0 - offline 1 - online |
provinsi_pemilik | String | Provinsi Dari Pemilik |
kota_pemilik | String | Kota Dari Pemilik |
kecamatan_pemilik | String | Kecamatan Dari Pemilik |
kelurahan_pemilik | String | Kelurahan Dari Pemilik |
provinsi_outlet | String | Provinsi Dari outlet |
kota_outlet | String | Kota Dari outlet |
kecamatan_outlet | String | Kecamatan Dari outlet |
kelurahan_outlet | String | Kelurahan Dari outlet |
{
"responseCode": "2002200",
"responseMessage": "Successful",
"additionalInfo": {
"merchantId": "121xxxx",
"nama_pemilik": "Cidro",
"alamat_pemilik": "Jl. Mayjend Prof. Dr. Moestopo No. 6, Surabaya, Jawa Timur",
"notelp_pemilik": "6281220066001",
"alamat_outlet": "Jl. Mayjend Prof. Dr. Moestopo No. 6, Surabaya, Jawa Timur",
"email_pemilik": "rosididragon@gmail.com",
"email_outlet": "rosididragon@gmail.com",
"kode_pos_pemilik": "61271",
"nmid": "ID234657392",
"mid": "ID82735482134",
"mpan": "93600815300121xxxxx",
"kategori_usaha_merchant": "URE",
"merchant_type": 1,
"tipe_qr": "B",
"nama_merchant": "Toko kita",
"mcc": "5812",
"jumlah_terminal_pten": 1,
"npwp": "102938472618xxxx",
"no_ktp_merchant": "63191864816xxxx",
"kode_pos_pten": "61271",
"is_onlineshop": 0,
"provinsi_pemilik": "Bengkulu",
"kota_pemilik": "Kabupaten Ogan Komering Ulu Selatan",
"kecamatan_pemilik": "Batik Nau",
"kelurahan_pemilik": "Pagar Ruyung",
"provinsi_outlet": "Bengkulu",
"kota_outlet": "Kabupaten Ogan Komering Ulu Selatan",
"kecamatan_outlet": "Batik Nau",
"kelurahan_outlet": "Pagar Ruyung"
}
}
List Response Code
Response Code | Response Message | Description |
---|---|---|
2002200 | Success | |
4002201 | Invalid field format { field name } | |
4012200 | Unauthorized. Invalid Signature | X-Signature salah |
4092200 | Cannot use same X-EXTERNAL-ID in same day | X-External-ID sudah pernah digunakan di hari yang sama |
4042201 | Bad Request | Request header ada yang salah / kurang |
4042200 | Unauthorized. Client Forbidden Access API | Partner tidak dapat mengakses api terkait |
4002201 | Request Failed | Terjadi kesalahan |