Login expired. Please log in again.

Feedback

0/300

Feedback

Submitted successfully

ok

Feedback

Network exception, please try again later

ok

开发指引

1. 接口规则

为了在保证支付安全的前提下,带给商户简单、一致且易用的开发体验,我们推出了全新的微信支付APIv3接口。该版本API的具体规则请参考“APIv3接口规则

2. 开发环境搭建

为了帮助开发者调用开放接口,我们提供了JavaPHPGO语言版本的开发库,封装了签名生成、签名验证、敏感信息加/解密、媒体文件上传等基础功能


3. 业务时序图

3.1. 业务时序图


机构提交子商户进件申请后,微信支付将对该子商户的资料进行系统审核,并返回进件是否成功或需要进一步人工审核的状态,所以机构需要关注接口返回结果:



{
	"sub_mchid": "20000100",
	"verification_status": "Approved"
}

{
  "code": "INVALID_REQUEST",
  "message": "Parameter format verification error",
  "detail": {
    "field": "#/properties/payer",
    "value": "1346177081915535577",
    "issue": "Does not match the ALLOF schema",
    "location": "body"
  }
}


{
  "sub_mchid": "20000100",
  "verification_status": "Under Review",
  "description": "This merchant takes effect only after being approved. Please check the verification status on WeChat Pay Merchant Platform."
}

注意:此时该子商户没有支付权限,无法发起交易。需等待该子商户审核通过后,方可发起交易。机构可通过子商户查询接口,查询子商户的状态。


查询子商户状态

机构提交子商户进件申请后,可通过查询接口,查询子商户的状态:

OPERATING:正常;子商户已通过审核,入驻流程结束。其支付权限正常,可发起交易;

DEACTIVATED:已停用;该子商户在入驻审核通过后被机构自主停用,无支付权限,不能发起交易;

CLOSED:已关闭;该子商户在入驻审核通过后,被微信支付关闭支付权限,不能发起交易;

INCOMPLETE_APPLICATION:未完成入驻;子商户入驻申请未完成,无支付权限,不能发起交易。请于application_status字段查看入驻申请状态;

PENDING:待处理;该子商户在入驻审核通过后,其商户资料未通过日常复核,需要机构登录微信支付商户平台查看和处理。子商户权限正常,可发起交易。


子商户未完成入驻审核的处理

若查询到子商户状态为INCOMPLETE_APPLICATION,需进一步于application_status字段查看入驻申请状态:

UNDER_REVIEW:审核中;微信支付的审核人员正在审核该子商户的入驻申请,请耐心等待,可在一天后再次查询。如果申请完成后7个工作日后,状态仍为UNDER_REVIEW,可联系微信支付工作人员咨询;

REJECTED:已驳回;该子商户的入驻申请被微信支付驳回,需机构登录微信支付商户平台修改资料后重新提交(请于application_rejected_detail字段查看驳回原因)

3.2. API接入示例

文档展示了如何使用微信支付服务端 SDK 快速接入扫码支付产品,完成与微信支付对接的部分。

注意

• 文档中的代码示例是用来阐述 API 基本使用方法,代码中的示例参数需替换成商户自己账号及请求参数才能跑通。

• 以下接入步骤仅提供参考,请商户结合自身业务需求进行评估、修改。

3.2.1 进件子商户

步骤说明:机构提交子商户资料,微信支付系统会为每个子商户创建子商户号。

敏感信息字段:对于包含了敏感信息的参数,如联系方式等,我们增加了“字段加密”的安全机制,保护敏感信息只能被数据的接收方看到。

加密方法

• 获取微信支付平台证书和对应的平台证书序列号,获取微信支付平台证书。 本接口请求http头的“Wechatpay-Serial”需要传平台证书序列号。

• 使用微信支付平台证书的公钥,对于需要加密的参数值进行RSA加密。Java语言的加密方法的填充方案使用 RSA/ECB/PKCS1Padding ;PHP填充方式为OPENSSL_PKCS1_PADDING。

• 加密后的密文,使用base64编码后,作为请求中相应参数的值。

代码示例


    // Onboarding Sub-merchant API
    public void onboardingSubMerchant() throws IOException {
		String onboardingSubMerchantBody = """{
	"sp_appid": "wx82ec4jy334ner1",
    "sp_mchid": "2422128905",
    "name": "testname",
    "shortname": "shortname",
    "office_phone": "13680534111",
    "contact": {
        "email": "gP32/1QSaIpKlaFbWgP3hr8W3+YTtiavMRbOJJ6dATymJzxx/b4YPOTKdeRApW6Nt2ZZB9reZ1x45XhIEF/Ztb6mqfFVb6LxpJlHgDL/zpUG51551XQ3Ww+/kVCJcokiIiT1bSwEcCe6tPL2cmdsOEjlTikyrasLc1bG8vaG/i361r0vX9w56O2Mgv3OnJ4fr4xnmxNcVrJnk1f/gBSIiCUWA0163f3LM4KifQelEuz/WtroeKAzRDiI0/pOvXfwrYDK==",  // sensitive field, encryption content
        "name": "Vxjsrod2RT2aGxeI5i+Z2C4arXYGXZuwE8IrRf6uYu6S5dy4Igw7kjvYWYCNfsgcdXyfjdA4KVntbgSa3zic+ERsOd5u+SNKkaFSH3SwYtpcCyaUMvICTw/6AOY/qy+He9la/gxObgi4zkxvLJmZTJVualTVJWWCIvcuDArW8Kfqp8rBl+IxDEgCojoEmqE7ymVReslGBXWiaPS1UsZx1QJyez3/ijzBa4AKch3XuPx6d3qvM+J8iMx/b94LAfpTihU/j==",  // sensitive field, encryption content
        "phone": "l8JH2dAGLNJ8P5DENoMV0eW4JgIquV2ZO4conHnZp48g/eVpgvIfMj4Ge6LRVENW4eZksErJnYCQB+EOFEGR0lMhA1LexPLu0en08iM2ghkftYWAsOD4JPkvvc36SAfWal29eoZh4maO6kOGW7G4uBua6JoMsEjR6uuw5Gw5DC2eikcdkDBGk9vHSP/oxRs3Qu8a83GikhLgdpAPitXbZX/TEPG5SUg8Fx4BCMCKOfxy8uakq2/EeCtyBMjaiheUePoA=="   // sensitive field, encryption content
    }, 
    "business_category": 343,
    "merchant_country_code": "344",
    "merchant_type": "ENTERPRISE",
    "registration_certificate_number": "519723407213085723",
    "registration_certificate_date": "2022-06-03",
    "settlement_bank_number": "559304578245298347923856",
    "business": {
        "business_type": "ONLINE",
        "mcc": "5344",
        "mini_program": "flowerplus"
    },
    "director": {
        "name": "Tom",
        "number": "1234567890"
    }
}""";
        HttpPost httpPost = new HttpPost("https://apihk.mch.weixin.qq.com/v3/global/merchants");
        httpPost.addHeader("Accept", "application/json");
        httpPost.addHeader("Content-type", "application/json; charset=utf-8");
        httpPost.addHeader("Wechatpay-Serial", "0798ABFDCBXXXXXXXXXXXXXXXXXXXXXXX054A761");
        httpPost.setEntity(new StringEntity(verifyIdInfoBody));
        CloseableHttpResponse response = httpClient.execute(httpPost);
        //Process the response
    }

// Onboarding Sub-merchant API
func onboardingSubMerchant() {
   onboardingSubMerchantBody := `{
	"sp_appid": "wx82ec4jy334ner1",
    "sp_mchid": "2422128905",
    "name": "testname",
    "shortname": "shortname",
    "office_phone": "13680534111",
    "contact": {
        "email": "gP32/1QSaIpKlaFbWgP3hr8W3+YTtiavMRbOJJ6dATymJzxx/b4YPOTKdeRApW6Nt2ZZB9reZ1x45XhIEF/Ztb6mqfFVb6LxpJlHgDL/zpUG51551XQ3Ww+/kVCJcokiIiT1bSwEcCe6tPL2cmdsOEjlTikyrasLc1bG8vaG/i361r0vX9w56O2Mgv3OnJ4fr4xnmxNcVrJnk1f/gBSIiCUWA0163f3LM4KifQelEuz/WtroeKAzRDiI0/pOvXfwrYDK==",
        "name": "Vxjsrod2RT2aGxeI5i+Z2C4arXYGXZuwE8IrRf6uYu6S5dy4Igw7kjvYWYCNfsgcdXyfjdA4KVntbgSa3zic+ERsOd5u+SNKkaFSH3SwYtpcCyaUMvICTw/6AOY/qy+He9la/gxObgi4zkxvLJmZTJVualTVJWWCIvcuDArW8Kfqp8rBl+IxDEgCojoEmqE7ymVReslGBXWiaPS1UsZx1QJyez3/ijzBa4AKch3XuPx6d3qvM+J8iMx/b94LAfpTihU/j==",
        "phone": "l8JH2dAGLNJ8P5DENoMV0eW4JgIquV2ZO4conHnZp48g/eVpgvIfMj4Ge6LRVENW4eZksErJnYCQB+EOFEGR0lMhA1LexPLu0en08iM2ghkftYWAsOD4JPkvvc36SAfWal29eoZh4maO6kOGW7G4uBua6JoMsEjR6uuw5Gw5DC2eikcdkDBGk9vHSP/oxRs3Qu8a83GikhLgdpAPitXbZX/TEPG5SUg8Fx4BCMCKOfxy8uakq2/EeCtyBMjaiheUePoA=="
    }, 
    "business_category": 343,
    "merchant_country_code": "344",
    "merchant_type": "ENTERPRISE",
    "registration_certificate_number": "519723407213085723",
    "registration_certificate_date": "2022-06-03",
    "settlement_bank_number": "559304578245298347923856",
    "business": {
        "business_type": "ONLINE",
        "mcc": "5344",
        "mini_program": "flowerplus"
    },
    "director": {
        "name": "Tom",
        "number": "1234567890"
    }
}`
   header.Add("Wechatpay-Serial", "")
   header.Add("Idempotency-Key", "20220518-001")
   result, err := client.Post(ctx, "https://apihk.mch.weixin.qq.com/v3/global/merchants", header, nil, idVerificationBody, "application/json")
   if err != nil {
      // Process error
   }
   log.Printf("%s", result.Response.Body)
}

// Onboarding Sub-merchant API
public function onboardingSubMerchant($instance, $platformPublicKeyInstance, $platformCertificateSerial){
    $encryptor = static function(string $msg) use ($platformPublicKeyInstance): string {
        return Rsa::encrypt($msg, $platformPublicKeyInstance, OPENSSL_PKCS1_PADDING);
    };
    try {
        $resp = $instance
            ->chain('/v3/global/merchants')
            ->post([
                'json' => [
                    'sp_appid' => 'wx82ec4jy334ner1',
                    'sp_mchid' => '2422128905',
                    'name' => 'testname',
                    'shortname' => 'shortname',
                    'office_phone' => '13680534111',
                    'contact' => [
                        'email' => 'gP32/1QSaIpKlaFbWgP3hr8W3+YTtiavMRbOJJ6dATymJzxx/b4YPOTKdeRApW6Nt2ZZB9reZ1x45XhIEF/Ztb6mqfFVb6LxpJlHgDL/zpUG51551XQ3Ww+/kVCJcokiIiT1bSwEcCe6tPL2cmdsOEjlTikyrasLc1bG8vaG/i361r0vX9w56O2Mgv3OnJ4fr4xnmxNcVrJnk1f/gBSIiCUWA0163f3LM4KifQelEuz/WtroeKAzRDiI0/pOvXfwrYDK==',
                        'name' => 'Vxjsrod2RT2aGxeI5i+Z2C4arXYGXZuwE8IrRf6uYu6S5dy4Igw7kjvYWYCNfsgcdXyfjdA4KVntbgSa3zic+ERsOd5u+SNKkaFSH3SwYtpcCyaUMvICTw/6AOY/qy+He9la/gxObgi4zkxvLJmZTJVualTVJWWCIvcuDArW8Kfqp8rBl+IxDEgCojoEmqE7ymVReslGBXWiaPS1UsZx1QJyez3/ijzBa4AKch3XuPx6d3qvM+J8iMx/b94LAfpTihU/j==',
                        'phone' => 'l8JH2dAGLNJ8P5DENoMV0eW4JgIquV2ZO4conHnZp48g/eVpgvIfMj4Ge6LRVENW4eZksErJnYCQB+EOFEGR0lMhA1LexPLu0en08iM2ghkftYWAsOD4JPkvvc36SAfWal29eoZh4maO6kOGW7G4uBua6JoMsEjR6uuw5Gw5DC2eikcdkDBGk9vHSP/oxRs3Qu8a83GikhLgdpAPitXbZX/TEPG5SUg8Fx4BCMCKOfxy8uakq2/EeCtyBMjaiheUePoA=='
                    ],
                    'business_category' => 343,
                    'merchant_country_code' => '344',
                    'merchant_type' => 'ENTERPRISE',
                    'registration_certificate_number' => '519723407213085723',
                    'registration_certificate_date' => '2022-06-03',
                    'settlement_bank_number' => '559304578245298347923856',
                    'business' => [
                        'business_type' => 'ONLINE',
                        'mcc' => '5344',
                        'mini_program' => 'flowerplus'
                    ],
                    'director' => [
                        'name' => 'Tom',
                        'number' => '1234567890'
                    ]
                ],
                'headers' => [
                    'Wechatpay-Serial' => $platformCertificateSerial
                ]
            ]);
        echo $resp->getStatusCode(), PHP_EOL;
        echo $resp->getBody(), PHP_EOL;
    } catch (\Exception $e) {
        // Exception handling
    }
}

									{
										"stock_id": "Python",
										"stock_creator_mchid": "123456",
										"limit": 10,
									}

其他重要参数请前往进件子商户API文档页面参考。

3.2.2 查询子商户

步骤说明:用于机构查询子商户创建是否成功,接口只提供单个子商户信息查询。

代码示例


    // Query Sub-merchant API
    public void querySubMerchant() throws IOException {
        HttpGet httpGet = new HttpGet("https://apihk.mch.weixin.qq.com/v3/global/merchants/{$sub_mchid}?sp_appid=wx8888888888888888&sp_mchid=1900000100");
        httpGet.addHeader("Accept", "application/json");
        httpGet.addHeader("Content-type", "application/json; charset=utf-8");
        CloseableHttpResponse response = httpClient.execute(httpGet);
        //Process the response 
    }

// Query Sub-merchant API
func querySubMerchant() {
   result, err := client.Get(ctx, "https://apihk.mch.weixin.qq.com/v3/global/merchants/{$sub_mchid}?sp_appid=wx8888888888888888&sp_mchid=1900000100")
   if err != nil {
      // Process error
   }
   log.Printf("%s", result.Response.Body)
}

// Query Sub-merchant API
public function querySubMerchant($instance){
    try {
        $resp = $instance
            ->chain('/v3/global/merchants/{$sub_mchid}')
            ->get([
                'query' => [
                    'sp_appid' => 'wx8888888888888888',
                    'sp_mchid' => '1900000100',
                ]
            ]);
        echo $resp->getStatusCode(), PHP_EOL;
        echo $resp->getBody(), PHP_EOL;
    } catch (\Exception $e) {
        // Exception handling
    }
}

									{
										"stock_id": "Python",
										"stock_creator_mchid": "123456",
										"limit": 10,
									}

其他重要参数请前往查询子商户API文档页面参考。

3.2.3 修改子商户

步骤说明:用于机构子商户创建成功后,接口提供子商户信息修改

敏感信息字段:对于包含了敏感信息的参数,如联系方式等,我们增加了“字段加密”的安全机制,保护敏感信息只能被数据的接收方看到。

加密方法

• 获取微信支付平台证书和对应的平台证书序列号,获取微信支付平台证书。 本接口请求http头的“Wechatpay-Serial”需要传平台证书序列号。

• 使用微信支付平台证书的公钥,对于需要加密的参数值进行RSA加密。Java语言的加密方法的填充方案使用 RSA/ECB/PKCS1Padding ;PHP填充方式为OPENSSL_PKCS1_PADDING。

• 加密后的密文,使用base64编码后,作为请求中相应参数的值。

代码示例


// Sub Merchant Modifying API
    public void modifySubMerchant() throws IOException {
		String modifySubMerchantBody = """{
	"sub_mchid": "20000100",
	"sp_appid": "wx82ec4jy334ner1",
    "sp_mchid": "2422128905",
    "name": "testname",
    "shortname": "shortname",
    "office_phone": "13680534111",
    "contact": {
        "email": "gP32/1QSaIpKlaFbWgP3hr8W3+YTtiavMRbOJJ6dATymJzxx/b4YPOTKdeRApW6Nt2ZZB9reZ1x45XhIEF/Ztb6mqfFVb6LxpJlHgDL/zpUG51551XQ3Ww+/kVCJcokiIiT1bSwEcCe6tPL2cmdsOEjlTikyrasLc1bG8vaG/i361r0vX9w56O2Mgv3OnJ4fr4xnmxNcVrJnk1f/gBSIiCUWA0163f3LM4KifQelEuz/WtroeKAzRDiI0/pOvXfwrYDK==",  // sensitive field, encryption content
        "name": "Vxjsrod2RT2aGxeI5i+Z2C4arXYGXZuwE8IrRf6uYu6S5dy4Igw7kjvYWYCNfsgcdXyfjdA4KVntbgSa3zic+ERsOd5u+SNKkaFSH3SwYtpcCyaUMvICTw/6AOY/qy+He9la/gxObgi4zkxvLJmZTJVualTVJWWCIvcuDArW8Kfqp8rBl+IxDEgCojoEmqE7ymVReslGBXWiaPS1UsZx1QJyez3/ijzBa4AKch3XuPx6d3qvM+J8iMx/b94LAfpTihU/j==",  // sensitive field, encryption content
        "phone": "l8JH2dAGLNJ8P5DENoMV0eW4JgIquV2ZO4conHnZp48g/eVpgvIfMj4Ge6LRVENW4eZksErJnYCQB+EOFEGR0lMhA1LexPLu0en08iM2ghkftYWAsOD4JPkvvc36SAfWal29eoZh4maO6kOGW7G4uBua6JoMsEjR6uuw5Gw5DC2eikcdkDBGk9vHSP/oxRs3Qu8a83GikhLgdpAPitXbZX/TEPG5SUg8Fx4BCMCKOfxy8uakq2/EeCtyBMjaiheUePoA=="   // sensitive field, encryption content
    }, 
    "business_category": 343,
    "merchant_country_code": "344",
    "merchant_type": "ENTERPRISE",
    "registration_certificate_number": "519723407213085723",
    "registration_certificate_date": "2022-06-03",
    "settlement_bank_number": "559304578245298347923856",
    "business": {
        "business_type": "ONLINE",
        "mcc": "5344",
        "mini_program": "flowerplus"
    },
    "director": {
        "name": "Tom",
        "number": "1234567890"
    }
}""";
        httpPut httpPut = new httpPut("https://apihk.mch.weixin.qq.com/v3/global/merchants");
        httpPut.addHeader("Accept", "application/json");
        httpPut.addHeader("Content-type", "application/json; charset=utf-8");
        httpPut.addHeader("Wechatpay-Serial", "0798ABFDCBXXXXXXXXXXXXXXXXXXXXXXX054A761");
        httpPut.setEntity(new StringEntity(verifyIdInfoBody));
        CloseableHttpResponse response = httpClient.execute(httpPut);
        //Process the response
    }

// Sub Merchant Modifying API
func modifySubMerchant() {
   modifySubMerchantBody := `{
	"sub_mchid": "20000100",
	"sp_appid": "wx82ec4jy334ner1",
    "sp_mchid": "2422128905",
    "name": "testname",
    "shortname": "shortname",
    "office_phone": "13680534111",
    "contact": {
        "email": "gP32/1QSaIpKlaFbWgP3hr8W3+YTtiavMRbOJJ6dATymJzxx/b4YPOTKdeRApW6Nt2ZZB9reZ1x45XhIEF/Ztb6mqfFVb6LxpJlHgDL/zpUG51551XQ3Ww+/kVCJcokiIiT1bSwEcCe6tPL2cmdsOEjlTikyrasLc1bG8vaG/i361r0vX9w56O2Mgv3OnJ4fr4xnmxNcVrJnk1f/gBSIiCUWA0163f3LM4KifQelEuz/WtroeKAzRDiI0/pOvXfwrYDK==",
        "name": "Vxjsrod2RT2aGxeI5i+Z2C4arXYGXZuwE8IrRf6uYu6S5dy4Igw7kjvYWYCNfsgcdXyfjdA4KVntbgSa3zic+ERsOd5u+SNKkaFSH3SwYtpcCyaUMvICTw/6AOY/qy+He9la/gxObgi4zkxvLJmZTJVualTVJWWCIvcuDArW8Kfqp8rBl+IxDEgCojoEmqE7ymVReslGBXWiaPS1UsZx1QJyez3/ijzBa4AKch3XuPx6d3qvM+J8iMx/b94LAfpTihU/j==",
        "phone": "l8JH2dAGLNJ8P5DENoMV0eW4JgIquV2ZO4conHnZp48g/eVpgvIfMj4Ge6LRVENW4eZksErJnYCQB+EOFEGR0lMhA1LexPLu0en08iM2ghkftYWAsOD4JPkvvc36SAfWal29eoZh4maO6kOGW7G4uBua6JoMsEjR6uuw5Gw5DC2eikcdkDBGk9vHSP/oxRs3Qu8a83GikhLgdpAPitXbZX/TEPG5SUg8Fx4BCMCKOfxy8uakq2/EeCtyBMjaiheUePoA=="
    }, 
    "business_category": 343,
    "merchant_country_code": "344",
    "merchant_type": "ENTERPRISE",
    "registration_certificate_number": "519723407213085723",
    "registration_certificate_date": "2022-06-03",
    "settlement_bank_number": "559304578245298347923856",
    "business": {
        "business_type": "ONLINE",
        "mcc": "5344",
        "mini_program": "flowerplus"
    },
    "director": {
        "name": "Tom",
        "number": "1234567890"
    }
}`
   header.Add("Wechatpay-Serial", "")
   header.Add("Idempotency-Key", "20220518-001")
   result, err := client.Put(ctx, "https://apihk.mch.weixin.qq.com/v3/global/merchants", header, nil, idVerificationBody, "application/json")
   if err != nil {
      // Process error
   }
   log.Printf("%s", result.Response.Body)
}

// Sub Merchant Modifying API
public function modifySubMerchant($instance, $platformPublicKeyInstance, $platformCertificateSerial){
    $encryptor = static function(string $msg) use ($platformPublicKeyInstance): string {
        return Rsa::encrypt($msg, $platformPublicKeyInstance, OPENSSL_PKCS1_PADDING);
    };
    try {
        $resp = $instance
            ->chain('/v3/global/merchants')
            ->put([
                'json' => [
					'sub_mchid': '20000100',
                    'sp_appid' => 'wx82ec4jy334ner1',
                    'sp_mchid' => '2422128905',
                    'name' => 'testname',
                    'shortname' => 'shortname',
                    'office_phone' => '13680534111',
                    'contact' => [
                        'email' => 'gP32/1QSaIpKlaFbWgP3hr8W3+YTtiavMRbOJJ6dATymJzxx/b4YPOTKdeRApW6Nt2ZZB9reZ1x45XhIEF/Ztb6mqfFVb6LxpJlHgDL/zpUG51551XQ3Ww+/kVCJcokiIiT1bSwEcCe6tPL2cmdsOEjlTikyrasLc1bG8vaG/i361r0vX9w56O2Mgv3OnJ4fr4xnmxNcVrJnk1f/gBSIiCUWA0163f3LM4KifQelEuz/WtroeKAzRDiI0/pOvXfwrYDK==',
                        'name' => 'Vxjsrod2RT2aGxeI5i+Z2C4arXYGXZuwE8IrRf6uYu6S5dy4Igw7kjvYWYCNfsgcdXyfjdA4KVntbgSa3zic+ERsOd5u+SNKkaFSH3SwYtpcCyaUMvICTw/6AOY/qy+He9la/gxObgi4zkxvLJmZTJVualTVJWWCIvcuDArW8Kfqp8rBl+IxDEgCojoEmqE7ymVReslGBXWiaPS1UsZx1QJyez3/ijzBa4AKch3XuPx6d3qvM+J8iMx/b94LAfpTihU/j==',
                        'phone' => 'l8JH2dAGLNJ8P5DENoMV0eW4JgIquV2ZO4conHnZp48g/eVpgvIfMj4Ge6LRVENW4eZksErJnYCQB+EOFEGR0lMhA1LexPLu0en08iM2ghkftYWAsOD4JPkvvc36SAfWal29eoZh4maO6kOGW7G4uBua6JoMsEjR6uuw5Gw5DC2eikcdkDBGk9vHSP/oxRs3Qu8a83GikhLgdpAPitXbZX/TEPG5SUg8Fx4BCMCKOfxy8uakq2/EeCtyBMjaiheUePoA=='
                    ],
                    'business_category' => 343,
                    'merchant_country_code' => '344',
                    'merchant_type' => 'ENTERPRISE',
                    'registration_certificate_number' => '519723407213085723',
                    'registration_certificate_date' => '2022-06-03',
                    'settlement_bank_number' => '559304578245298347923856',
                    'business' => [
                        'business_type' => 'ONLINE',
                        'mcc' => '5344',
                        'mini_program' => 'flowerplus'
                    ],
                    'director' => [
                        'name' => 'Tom',
                        'number' => '1234567890'
                    ]
                ],
                'headers' => [
                    'Wechatpay-Serial' => $platformCertificateSerial
                ]
            ]);
        echo $resp->getStatusCode(), PHP_EOL;
        echo $resp->getBody(), PHP_EOL;
    } catch (\Exception $e) {
        // Exception handling
    }
}

									{
										"stock_id": "Python",
										"stock_creator_mchid": "123456",
										"limit": 10,
									}

其他重要参数请前往修改子商户API文档页面参考。

4. 通过子商户进件接口为子商户申请H5支付权限

对于H5支付的产品介绍,请阅读H5支付权限申请 / 产品介绍

为方便机构在申请子商户时为子商户申请H5支付权限,我们在子商户进件/修改/查询API接口内融合了H5权限申请能力。

4.1. H5支付权限状态定义及状态转移

子商户进件/修改/查询API接口的回包中,使用 h5_authorization_state 表示子商户的H5支付权限状态;该状态会决定您应当对子商户进行何种操作:

● UNAUTHORIZED 未授权:子商户未在微信支付系统开通支付权限,请通过修改子商户接口填写H5申请资料为子商户申请H5支付权限;或者您也可以直接通过 进件子商户接口 填写H5申请资料,直接获得H5支付权限状态为UNDER_REVIEW的子商户;

● UNDER_REVIEW 审核中:您的H5支付权限申请单已受理,微信支付的审核人员将在3~5个工作日左右完成申请单审核;请通过 查询子商户接口 查询审核结果;

● REJECETED 已驳回:您的H5支付权限申请单被驳回,请通过 查询子商户接口 查询具体驳回原因后,通过 修改子商户接口 更新H5申请资料;

● APPROVED 已通过:您的H5支付权限申请已通过,H5支付权限已开通。如果您需要修改H5支付域名,请通过 修改子商户接口 更新域名(注意:域名会根据您的输入全量更新)

● UNDER_PUNISHMENT 处罚中:子商户违反微信支付条例,处于被处罚阶段,请联系BD处理;

● APPLICATION_FAILED 申请失败:您的H5支付申请失败,请通过 查询子商户接口 查询失败原因后,通过 修改子商户接口 重新申请H5支付权限。

4.2. 子商户进件申请H5权限业务序列图


    页面导航

About  WeChat  Pay

Powered By Tencent & Tenpay Copyright©

2005-2024 Tenpay All Rights Reserved.

Contact Us
Wechat Pay Global

WeChat Pay Global

置顶