TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest req = new AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest();
AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest.InstSyncPolicyPaymentRequest obj1 = new AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest.InstSyncPolicyPaymentRequest();
obj1.setAlipayUserOpenId("20887592340156");
obj1.setInstPolicyId("ZA42341");
obj1.setPayPattern("QUARTERLY");
obj1.setInstallmentPlan(4L);
obj1.setExtras("{}");
AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest.Bills obj2 = new AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest.Bills();
obj2.setPayOrderId("5243624");
obj2.setPremium(10000L);
obj2.setPayTime("20210512141509");
obj2.setInstallmentNo(1L);
obj1.setBills(obj2);
obj1.setFlowId("1800052345243");
req.setBizData(obj1);
AlibabaAlihealthInsuranceInstPolicyPaymentSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest req = new AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest();
AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest.InstSyncPolicyPaymentRequestDomain obj1 = new AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest.InstSyncPolicyPaymentRequestDomain();
obj1.AlipayUserOpenId = "20887592340156";
obj1.InstPolicyId = "ZA42341";
obj1.PayPattern = "QUARTERLY";
obj1.InstallmentPlan = 4L;
obj1.Extras = "{}";
AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest.BillsDomain obj2 = new AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest.BillsDomain();
obj2.PayOrderId = "5243624";
obj2.Premium = 10000L;
obj2.PayTime = "20210512141509";
obj2.InstallmentNo = 1L;
obj1.Bills= obj2;
obj1.FlowId = "1800052345243";
req.BizData_ = obj1;
AlibabaAlihealthInsuranceInstPolicyPaymentSyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest;
$biz_data = new InstSyncPolicyPaymentRequest;
$biz_data->alipay_user_open_id="20887592340156";
$biz_data->inst_policy_id="ZA42341";
$biz_data->pay_pattern="QUARTERLY";
$biz_data->installment_plan="4";
$biz_data->extras="{}";
$bills = new Bills;
$bills->pay_order_id="5243624";
$bills->premium="10000";
$bills->pay_time="20210512141509";
$bills->installment_no="1";
$biz_data->bills = $bills;
$biz_data->flow_id="1800052345243";
$req->setBizData(json_encode($biz_data));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.alihealth.insurance.inst.policy.payment.sync' \
-d 'partner_id=apidoc' \
-d 'sign=55CDFFAC1328950BDC7AB26F8A4C3C2F' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-20+00%3A58%3A02' \
-d 'v=2.0' \
-d 'biz_data=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAlihealthInsuranceInstPolicyPaymentSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.biz_data=""
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alibaba.alihealth.insurance.inst.policy.payment.sync");
add_param(pRequest,"biz_data","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.alihealth.insurance.inst.policy.payment.sync', {
'biz_data':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})