更新商户信息
请求地址
POST
https://sandbox.j-pay.net/pay/merchant/create
测试账号
商户ID:10010
ApiKey: 7e4nicn14nhyup146dfbi8hpnpus9juz
请求头
| 请求头名称 | 请求头值 |
|---|---|
| Agent-Merchant-Id | 10010 |
请求参数
| 参数名称 | 类型 | 是否必填 | 参与签名 | 参数说明 |
|---|---|---|---|---|
| memberid | String | Y | Y | 商户ID |
| company | Array | Y | N | 公司或业务的相关信息。 |
| business_profile | Array | N | N | 账户的业务信息。 |
| documents | Array | N | N | 可能提交以满足各种信息请求的文件。 |
Company
| 参数名称 | 类型 | 是否必填 | 参与签名 | 参数说明 |
|---|---|---|---|---|
| name | String | Y | N | 公司名称. |
| tax_id | String | N | N | 公司的业务ID号,根据公司的国家适当。 |
| phone | String | N | N | 公司的电话号码。 |
| state | String | N | N | 国家的州、县、省或区域(ISO 3166-2) |
| city | String | N | N | 城市. |
| line1 | String | N | N | 地址行1. |
| line2 | String | N | N | 地址行2. |
| postal_code | String | N | N | ZIP或邮政编码。 |
Business Profile
| 参数名称 | 类型 | 是否必填 | 参与签名 | 参数说明 |
|---|---|---|---|---|
| mcc | String | Y | N | 商户分类代码。根据提供的商品或服务对业务进行分类。例如:5812表示在线支付。 |
| url | String | Y | N | 业务的公开可用网站。例如:google.com |
Documents
File ID collection, Upload files
| Parameter Name | Type | Required | Sign(Y OR N) | Parameter Description |
|---|---|---|---|---|
| company_registration | Array | Y | N | 一份或多份文件,证明公司已在相关地方当局注册。(公司注册证书) |
| company_address | Array | Y | N | 一份或多份文件,证明公司地址。(经营地址证明) |
| company_moa | Array | Y | N | 一份或多份文件,证明公司的协会声明。(公司章程) |
| bank_proof | Array | Y | N | 一份或多份文件,证明公司的银行账户。(比如水电账单、银行流水之类的) |
返回参数
| 参数名称 | 类型 | 参数说明 |
|---|---|---|
| code | String | 请求状态 1:成功 0:失败 |
| info | String | 请求消息 |
| data | Integer | 商户ID |
Demo
- Javascript
- Php
- Python
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);
});
Continuously updating...
Continuously updating...