Skip to main content

Update

Request address

POST

https://sandbox.j-pay.net/pay/merchant_person/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
person_idStringYYPerson 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.
titleStringNNTitle of the person. Such as CEO.
documentArrayNNDocuments 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
dataIntegerResponse data
data.idIntegerMerchant Person ID

Demo

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

const KEY = "7e4nicn14nhyup146dfbi8hpnpus9juz";
const MEMBER_ID = "10010";
let query = {
person_id: 3,
};
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(),
id_number: '000000000',
first_name: 'fred',
last_name: 'flintstone',
birthday: '1990-01-01',
phone: '1234567890',
cert_issue_date: '2020-01-01',
percent_ownership: '100',
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/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);
});