文档中心 > API类目 > 云游戏API

alibaba.cloudgame.tradeplatform.payorder (支付发起)

支付发起

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
request_param PayOrderRequest 必须 请求入参
  • └ charge_item_code
  • String
  • 必须
  • 1
  • 计费项编码
  • └ order_id
  • String
  • 必须
  • 1
  • 订单ID
  • └ category_code
  • String
  • 必须
  • 1
  • 类目编码
  • refund_subscribe_list
  • RefundSubscribeRequest []
  • 可选
  • 1
  • 退订的订购集合
  • └ subscribe_id
  • String
  • 可选
  • 1
  • 订购ID
  • └ refund_amount
  • Number
  • 可选
  • 1
  • 订购退款金额
  • └ user_country
  • String
  • 必须
  • CHINA
  • 国家
  • └ balance_pay_amount
  • Number
  • 必须
  • 1
  • 余额支付金额
  • └ pay_amount
  • Number
  • 可选
  • 1
  • 应付金额(废弃)
  • └ tenant_id
  • Number
  • 必须
  • 1
  • 租户ID
  • └ commodity_code
  • String
  • 必须
  • 1
  • 商品Code
  • └ pay_start_time
  • Number
  • 必须
  • 1
  • 支付开始时间
  • └ currency
  • String
  • 必须
  • CNY
  • 币种
  • └ pay_idempotent_code
  • String
  • 必须
  • 1
  • 支付幂等号
  • └ huijin_account_id
  • Number
  • 可选
  • 1
  • 汇金账户ID
  • └ pay_serial_id
  • String
  • 必须
  • 1
  • 支付流水号
  • └ credit_pay_amount
  • Number
  • 可选
  • 1
  • 信控支付金额
  • └ credit_account_id
  • Number
  • 可选
  • 1
  • 信控账户ID

响应参数

名称 类型 示例值 描述
result_success Boolean true 是否成功
error CommonError 错误
  • error_code
  • ErrorCode
  • 错误码
  • └ code
  • String
  • 1
  • 编码
  • └ prefix
  • String
  • HP
  • 错误码前缀
  • └ location
  • String
  • 1
  • 系统名
  • └ message
  • String
  • 1
  • 说明
value PayOrderResponse 返回结果
  • └ pay_status
  • String
  • PAY_SUCCESS
  • 支付状态
  • └ pay_url
  • String
  • 111
  • 支付链接

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCloudgameTradeplatformPayorderRequest req = new AlibabaCloudgameTradeplatformPayorderRequest();
AlibabaCloudgameTradeplatformPayorderRequest.PayOrderRequest obj1 = new AlibabaCloudgameTradeplatformPayorderRequest.PayOrderRequest();
obj1.setChargeItemCode("1");
obj1.setOrderId("1");
obj1.setCategoryCode("1");
List<AlibabaCloudgameTradeplatformPayorderRequest.RefundSubscribeRequest> list3 = new ArrayList<AlibabaCloudgameTradeplatformPayorderRequest.RefundSubscribeRequest>();
AlibabaCloudgameTradeplatformPayorderRequest.RefundSubscribeRequest obj4 = new AlibabaCloudgameTradeplatformPayorderRequest.RefundSubscribeRequest();
list3.add(obj4);
obj4.setSubscribeId("1");
obj4.setRefundAmount(1L);
obj1.setRefundSubscribeList(list3);
obj1.setUserCountry("CHINA");
obj1.setBalancePayAmount(1L);
obj1.setPayAmount(1L);
obj1.setTenantId(1L);
obj1.setCommodityCode("1");
obj1.setPayStartTime(1L);
obj1.setCurrency("CNY");
obj1.setPayIdempotentCode("1");
obj1.setHuijinAccountId(1L);
obj1.setPaySerialId("1");
obj1.setCreditPayAmount(1L);
obj1.setCreditAccountId(1L);
req.setRequestParam(obj1);
AlibabaCloudgameTradeplatformPayorderResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_cloudgame_tradeplatform_payorder_response>
    <result_success>true</result_success>
    <error>
        <error_code>
            <code>1</code>
            <prefix>HP</prefix>
        </error_code>
        <location>1</location>
        <message>1</message>
    </error>
    <value>
        <pay_status>PAY_SUCCESS</pay_status>
        <pay_url>111</pay_url>
    </value>
</alibaba_cloudgame_tradeplatform_payorder_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

返回
顶部