文档中心 > API类目 > pos交易api

alibaba.pos.pay.account.ack (POS支付信息确认)

POS 支付信息确认

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
store_id Number 必须 110 门店ID
pay_account_detail_request PayAccountDetailRequest 必须 request
  • └ payer_id
  • Number
  • 必须
  • 110
  • 买家id
  • └ payee_id
  • Number
  • 可选
  • 110
  • 卖家id,冠超场景下需要使用, 同订单里的sellerId
  • └ channel_account
  • String
  • 必须
  • 110
  • 渠道账号,付款者帐号/卡号标识,建议填卡号,电子钱包应该是对应的用户id
  • └ channel_name
  • String
  • 必须
  • alipay
  • 对应支付的支付渠道名称,
  • └ attributes
  • String
  • 可选
  • {"key":"value"}
  • 非必选参数,不同的卡片根据协定给的值

响应参数

名称 类型 示例值 描述
result PosResult result result
  • model
  • PayAccountDetailResponse
  • model
  • model
  • └ biz_codes
  • String
  • 111,111
  • 业务编码,多个用","分割
  • └ result_code
  • String
  • resultCode
  • resultCode
  • └ result_message
  • String
  • resultMessage
  • resultMessage
  • └ balance
  • Number
  • 110
  • 卡的余额,单位 分
  • └ account_status
  • String
  • 正常
  • 卡的当前状态,正常、冻结、挂失等,展示给用户的
  • └ end_time
  • Date
  • date
  • 卡的有效期截止日期
  • └ is_valid
  • Boolean
  • true
  • 是否有效,如果false,就要有对应的status说明
  • └ start_time
  • Date
  • date
  • 发卡时间,或者有效期开始
  • └ account
  • String
  • 账号
  • 账号
  • └ attributes
  • String
  • {"key":"value"}
  • 扩展信息
  • └ success
  • Boolean
  • true
  • success
  • └ msg_code
  • String
  • 错误编码
  • 错误编码
  • └ msg_info
  • String
  • 错误信息
  • 错误信息
  • └ success
  • Boolean
  • true
  • 请求成功与否

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaPosPayAccountAckRequest req = new AlibabaPosPayAccountAckRequest();
req.setStoreId(110L);
AlibabaPosPayAccountAckRequest.PayAccountDetailRequest obj1 = new AlibabaPosPayAccountAckRequest.PayAccountDetailRequest();
obj1.setPayerId(110L);
obj1.setPayeeId(110L);
obj1.setChannelAccount("110");
obj1.setChannelName("alipay");
obj1.setAttributes("{\"key\":\"value\"}");
req.setPayAccountDetailRequest(obj1);
AlibabaPosPayAccountAckResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_pos_pay_account_ack_response>
    <result>
        <model>
            <biz_codes>111,111</biz_codes>
            <result_code>resultCode</result_code>
            <result_message>resultMessage</result_message>
            <balance>110</balance>
            <account_status>正常</account_status>
            <end_time>date</end_time>
            <is_valid>true</is_valid>
            <start_time>date</start_time>
            <account>账号</account>
            <attributes>{&quot;key&quot;:&quot;value&quot;}</attributes>
            <success>true</success>
        </model>
        <msg_code>错误编码</msg_code>
        <msg_info>错误信息</msg_info>
        <success>true</success>
    </result>
</alibaba_pos_pay_account_ack_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部