Skip to main content

Query

Request address

Sandbox : https://sandbox.j-pay.net/pay/merchant/query

Request headers

Header NameRequired(Y or N)Description
Agent-Merchant-IdYAgent merchant ID

Request parameters

Parameter NameTypeRequired(Y or N)Sign(Y or N)Parameter Description
memberidStringYYMerchant ID
signStringYNSee MD5 signature example

Return parameters

Parameter NameTypeParameter Description
memberidStringMerchant ID
emailStringEmail
countryStringCountry
companyObjectCompany information
business_profileObjectBusiness profile
documentsObjectDocuments
bankArrayBank accounts
personsArrayPersons

company

Parameter NameTypeParameter Description
nameStringCompany name
tax_idStringTax ID
phoneStringPhone
cert_valid_dateStringCertificate valid date
cert_past_dateStringCertificate past date
stateStringState / Province
cityStringCity
postal_codeStringPostal code
line1StringAddress line 1
line2StringAddress line 2

business_profile

Parameter NameTypeParameter Description
mccStringMCC
urlStringWebsite URL

documents

Parameter NameTypeParameter Description
company_registrationArrayCompany registration files (URLs)
company_addressArrayCompany address proof files (URLs)
company_moaArrayMOA files (URLs)
bank_proofArrayBank proof files (URLs)

bank[]

Parameter NameTypeParameter Description
idStringBank record ID
typeStringchina or other
bank_nameStringBank name
swift_codeStringSwift code
subbranchStringSub-branch
accountStringAccount number
addressStringBank address
remarkStringRemark

persons[]

Parameter NameTypeParameter Description
idStringPerson ID
id_numberStringID number
first_nameStringFirst name
last_nameStringLast name
birthdayStringBirthday
phoneStringPhone
percent_ownershipStringPercent ownership
titleStringTitle
cert_issue_dateStringCertificate issue date
cert_expiration_dateStringCertificate expiration date
addressObjectAddress
documentsObjectDocuments

Example Request

import { md5 } from "js-md5";
import axios from "axios";

const KEY = "YOUR_AGENT_API_KEY";
const AGENT_MERCHANT_ID = "10010";

let query = {
memberid: "10130",
};

let signData = [];
Object.keys(query)
.sort()
.forEach((key) => signData.push(`${key}=${query[key]}`));
signData.push(`key=${KEY}`);
Object.assign(query, {
sign: md5(signData.join("&")).toUpperCase(),
});

axios
.request({
url: "https://sandbox.j-pay.net/pay/merchant/query",
method: "post",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"Agent-Merchant-Id": AGENT_MERCHANT_ID,
},
data: query,
})
.then(({ data }) => {
console.log("success", data);
})
.catch((error) => {
console.log("error", error);
});

Response example

{
"memberid": "10005",
"email": "[email protected]",
"country": "US",
"company": {
"name": "Company Name",
"tax_id": "",
"phone": "",
"cert_valid_date": "",
"cert_past_date": "",
"state": "",
"city": "",
"postal_code": "",
"line1": "",
"line2": ""
},
"business_profile": {
"mcc": "",
"url": ""
},
"documents": {
"company_registration": [],
"company_address": [],
"company_moa": [],
"bank_proof": []
},
"bank": [
{
"id": "uuid",
"type": "other",
"bank_name": "",
"swift_code": "",
"subbranch": "",
"account": "",
"address": "",
"remark": ""
}
],
"persons": [
{
"id": 1,
"id_number": "",
"first_name": "",
"last_name": "",
"birthday": "",
"phone": "",
"percent_ownership": "",
"title": "",
"cert_issue_date": "",
"cert_expiration_date": "",
"address": {
"country": "",
"state": "",
"city": "",
"postal_code": "",
"line1": "",
"line2": ""
},
"documents": {
"company_authorization": [],
"passport": [],
"passport_handing": []
}
}
]
}