Skip to main content

Create

Request address

POST

https://sandbox.j-pay.net/pay/merchant_person/create

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
id_numberStringYYIdentity number of the person.
first_nameStringYYFirst name of the person.
last_nameStringYYLast name of the person.
birthdayStringYYDate of birth of the person.
phoneStringYYPhone number of the person.
percent_ownershipStringYYPercentage of ownership of the company.
cert_issue_dateStringYYDate when the person’s identity document was issued.
cert_expire_dateStringNNDate when the person’s identity document expires.
addressArrayYNAddress of the person.
titleStringNNTitle of the person. Such as CEO.
documentArrayYNDocuments that may be submitted to satisfy various informational requests.
signStringYNPlease see the verification signature field format

Address

Parameter NameTypeRequiredSign(Y OR N)Parameter Description
countryStringYNCountry code.
stateStringYNState, county, province, or region(ISO 3166-2)
cityStringYNCity.
line1StringYNAddress line 1.
line2StringNNAddress line 2.
postal_codeStringYNZIP or postal code.

Documents

File ID collection, Upload files

Parameter NameTypeRequiredSign(Y OR N)Parameter Description
company_authorizationArrayYNOne or more documents that demonstrate proof that this person is authorized to represent the company.
passportArrayYNOne or more documents showing the person’s passport page with photo and personal data.
passport_handingArrayYNOne or more documents showing the person holding a passport photo

Response Parameters

Parameter NameTypeParameter Description
statusStringStatus of the request
success:Successful
error:Fail
msgStringMessage of the request
dataArrayResponse data
data.idIntegerMerchant Person ID

Demo

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

const KEY = "7e4nicn14nhyup146dfbi8hpnpus9juz";
const MEMBER_ID = "10010";
let query = {
memberid: '10304',
id_number: '000000000',
first_name: 'fred',
last_name: 'flintstone',
birthday: '1990-01-01',
phone: '1234567890',
cert_issue_date: '2020-01-01',
percent_ownership: '100',
};
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(),
address: {
country: 'US',
state: "CA",
city: "San Francisco",
line1: "123 Main St",
postal_code: "94102",
},
documents: {
company_authorization: [1,2,3],
passport: [3],
passport_handing: [3],
},
});

axios
.request({
url: "https://sandbox.j-pay.net/pay/merchant_person/create",
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);
});