文档中心 > API类目 > 火车票API

taobao.train.purchase.order.payurl (火车票采购商接口-获取支付链接)

火车票采购商接口-获取支付链接

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
pay_type Number 必须 1 支付类型(1-app,0-pc),暂时只支持app
main_biz_order_id Number 必须 123333333345 主订单id
pay_channel String 必须 union 支付渠道(alipay-支付宝、union-银联、cmb-中国招商银行)
business_type Number 必须 1 订单业务类型(1-正向,2-改签)
change_apply_id Number 可选 532585123123 改签id,取自mtop.trip.train.createChangeOrder的响应{"headers":{},"httpStatusCode":200,"model":{"applyId":532585123123,"occupyChannelType":1,"occupyType":0},"success":true}

响应参数

名称 类型 示例值 描述
is_success Boolean true 是否成功
result_code String isv.invalid-parameter 失败code
inner_msg String 支付类型不能为空 失败msg补充
url String 支付链接地址,暂不提供示例 支付链接地址
result_msg String 参数异常,请重试 失败msg

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TrainPurchaseOrderPayurlRequest req = new TrainPurchaseOrderPayurlRequest();
req.setPayType(1L);
req.setMainBizOrderId(123333333345L);
req.setPayChannel("union");
req.setBusinessType(1L);
req.setChangeApplyId(532585123123L);
TrainPurchaseOrderPayurlResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<train_purchase_order_payurl_response>
    <is_success>true</is_success>
    <result_code>isv.invalid-parameter</result_code>
    <inner_msg>支付类型不能为空</inner_msg>
    <url>支付链接地址,暂不提供示例</url>
    <result_msg>参数异常,请重试</result_msg>
</train_purchase_order_payurl_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

返回
顶部