Skip to main content

Update

Request address

POST

https://sandbox.j-pay.net/pay/merchant/update

Test account

Merchant ID:10010

ApiKey: 7e4nicn14nhyup146dfbi8hpnpus9juz

Request headers

Header NameHeader Value
Agent-Merchant-Id10010

Request parameters

Parameter NameTypeRequiredSign(Y OR N)Parameter Description
memberidStringYYMerchant ID
companyArrayYNInformation about the company or business.
business_profileArrayNNBusiness information about the account.
documentsArrayNNDocuments that may be submitted to satisfy various informational requests.
bankArrayNNBank account information.
personsArrayNNPerson information.
signStringYNPlease see the verification signature field format

Company

Parameter NameTypeRequiredSign(Y OR N)Parameter Description
nameStringYNCompany name.
tax_idStringNNThe business ID number of the company, as appropriate for the company’s country.
phoneStringNNThe company’s phone number.
stateStringNNState, county, province, or region(ISO 3166-2)
cityStringNNCity.
line1StringNNAddress line 1.
line2StringNNAddress line 2.
postal_codeStringNNZIP or postal code.

Business Profile

Parameter NameTypeRequiredSign(Y OR N)Parameter Description
mccStringYNThe merchant category code for the account. MCCs are used to classify businesses based on the goods or services they provide.
urlStringYNThe business’s publicly available website. such as google.com

Documents

File ID collection, Upload files

Parameter NameTypeRequiredSign(Y OR N)Parameter Description
company_registrationArrayYNOne or more documents that demonstrate proof of a company’s registration with the appropriate local authorities.
company_addressArrayYNOne or more documents that demonstrate proof of address.
company_moaArrayYNOne or more documents showing the company’s Memorandum of Association.
bank_proofArrayYNOne or more documents showing the company’s bank proof.

Bank Account

Parameter NameTypeRequiredSign(Y OR N)Parameter Description
idStringNNBank account ID
typeEnumNNType of bank account:
china: CNY only
other: Including Hong Kong, Macao and Taiwan
bank_nameStringNNBank name
accountStringNNAccount number(Do not add a licensed receiving account)
subbranchStringNNSub-Branch name
addressStringNNBank address
swift_codeStringNNSWIFT code, required for other bank accounts.
remarkStringNNRemark

Persons

Parameter NameTypeRequiredSign(Y OR N)Parameter Description
person_idStringNNPerson ID
id_numberStringNNIdentity number of the person.
first_nameStringNNFirst name of the person.
last_nameStringNNLast name of the person.
birthdayStringNNDate of birth of the person.
phoneStringNNPhone number of the person.
percent_ownershipStringNNPercentage of ownership of the company.
cert_issue_dateStringNNDate when the person’s identity document was issued.
cert_expire_dateStringNNDate when the person’s identity document expires.
addressArrayNNAddress of the person. Please see the address format
titleStringNNTitle of the person. Such as CEO.
documentArrayNNDocuments that may be submitted to satisfy various informational requests. Please see the document format

Response Parameters

Parameter NameTypeParameter Description
codeStringStatus of the request
1:Successful
0:Fail
infoStringMessage of the request
dataArrayResponse data
data.idIntegerMerchant ID
data.bank_idStringBank account ID
data.person_idsArrayPerson ID List

Demo

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

const KEY = "7e4nicn14nhyup146dfbi8hpnpus9juz";
const MEMBER_ID = "10010";
let query = {
memberid: '10304',
};
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(),
company: {
name: Date.now().valueOf(),
phone: "1234567890",
tax_id: "000000000",
city: "San Francisco",
state: "CA",
line1: "123 Main St",
postal_code: "94102",
},
business_profile: {
mcc: "7372",
url: "nimiya.shop"
},
documents: {
company_registration: [1,2,3],
company_address: [3],
company_moa: [3],
bank_proof: [3],
},
});

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