创建员工
请求地址
POST
https://sandbox.j-pay.net/pay/merchant_person/create
测试账号
Merchant ID:10010
ApiKey: 7e4nicn14nhyup146dfbi8hpnpus9juz
请求Header
| 参数名称 | 参数值 |
|---|---|
| Agent-Merchant-Id | 10010 |
请求参数
| 参数名称 | 类型 | 是否必填 | 参与签名 | 参数说明 |
|---|---|---|---|---|
| memberid | String | Y | Y | 商户ID |
| id_number | String | Y | Y | 个人证件号码 |
| first_name | String | Y | Y | 个人名 |
| last_name | String | Y | Y | 个人姓 |
| birthday | String | Y | Y | 个人出生日期 |
| phone | String | Y | Y | 个人手机号 |
| percent_ownership | String | Y | Y | 公司资产占比,取值范围0-100,单位% |
| cert_issue_date | String | Y | Y | 个人证件Issue日期 |
| cert_expire_date | String | N | N | 个人证件过期日期,不传或为空则为长期有效 |
| address | Array | Y | N | 个人地址 |
| title | String | N | N | 个人职务, 例如CEO |
| document | Array | Y | N | 个人证件, 例如公司授权书, 护照等, 请参考上传文件 |
| sign | String | Y | N | 请参考签名算法 |
Address
| 参数名称 | 类型 | 是否必填 | 参与签名 | 参数说明 |
|---|---|---|---|---|
| country | String | Y | N | 国家代码, 例如US(ISO 3166-1 alpha-2) |
| state | String | Y | N | 省份或者州, 例如CA(ISO 3166-2) |
| city | String | Y | N | 城市, 例如San Francisco |
| line1 | String | Y | N | 地址行1, 例如123 Main St |
| line2 | String | N | N | 地址行2, 例如Apartment 4B |
| postal_code | String | Y | N | 邮政编码, 例如94102 |
Documents
File ID 集合, Upload files
| 参数名称 | 类型 | 是否必填 | 参与签名 | 参数说明 | |
|---|---|---|---|---|---|
| company_authorization | Array | Y | N | 一份或多份股权结构证明文件 | |
| passport | Array | Y | N | 一份或多份法人护照或者身份证件 | |
| passport_handing | Array | Y | N | 一份或多份法人手持护照或身份证照片 |
返回参数
| 参数名称 | 类型 | 参数说明 |
|---|---|---|
| code | Integer | 请求状态 1:成功 0:失败 |
| msg | String | 请求消息 |
| data | Integer | 返回数据 |
| data.id | Integer | 用户ID |
示例
- Javascript
- Php
- Python
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);
});
Continuously updating...
Continuously updating...