创建先用后付订单 
| 请求参数 | 类型 | 描述 | 
|---|---|---|
| json | object | 声明请求的 JSON数据结构 | 
| out_order_no | string | 商户服务订单号 | 
| appid | string | 公众账号ID | 
| service_id | string | 服务ID | 
| service_introduction | string | 服务信息 | 
| post_payments | object[] | 后付费项目 | 
| name | string | 付费项目名称 | 
| amount | integer | 金额 | 
| description | string | 计费说明 | 
| count | integer | 付费数量 | 
| post_discounts | object[] | 后付费商户优惠 | 
| name | string | 优惠名称 | 
| description | string | 优惠说明 | 
| amount | integer | 优惠金额 | 
| count | integer | 优惠数量 | 
| time_range | object | 服务时间段 | 
| start_time | string | 服务开始时间 | 
| start_time_remark | string | 服务开始时间备注 | 
| end_time | string | 服务结束时间 | 
| end_time_remark | string | 服务结束时间备注 | 
| location | object | 服务位置 | 
| start_location | string | 服务开始地点 | 
| end_location | string | 服务结束地点 | 
| risk_fund | object | 订单风险金 | 
| name | string | 风险金名称 DEPOSIT|ADVANCE|CASH_DEPOSIT|ESTIMATE_ORDER_COST枚举值之一 | 
| amount | integer | 风险金额 | 
| description | string | 风险说明 | 
| attach | string | 商户数据包 | 
| notify_url | string | 商户回调地址 | 
| openid | string | 用户标识 | 
| need_user_confirm | boolean | 是否需要用户确认 | 
| mchid | string | 商户号 | 
| shopping_info | object | 先用后付购物详情 | 
| real_merchant_appid | string | 实际购物商家公众号ID | 
| jump_link | object | 单详跳转链接 | 
| jump_link_type | string | 跳转链接类型 JUMP_LINK_MINI_PROGRAM枚举值 | 
| appid | string | 小程序跳转AppID | 
| path | string | 小程序跳转path | 
| goods | object[] | 商品列表 | 
| name | string | 商品名称 | 
| picture | string | 商品图片链接 | 
| amount | integer | 商品单价金额 | 
| count | integer | 商品数量 | 
| category_id | string[] | 商品品类ID | 
php
$instance->v3->payscore->servicepayondeliveryorder->postAsync([
  'json' => [
    'out_order_no'         => '1234323JKHDFE1243252',
    'appid'                => 'wxd678efh567hg6787',
    'service_id'           => '500001',
    'service_introduction' => '某某酒店',
    'post_payments'        => [[
      'name'        => '就餐费用, 服务费',
      'amount'      => 40000,
      'description' => '就餐人均100元,服务费:100/小时',
      'count'       => 4,
    ],],
    'post_discounts'       => [[
      'name'        => '满20减1元',
      'description' => '不与其他优惠叠加',
      'amount'      => 100,
      'count'       => 2,
    ],],
    'time_range'           => [
      'start_time'        => '20091225091010',
      'start_time_remark' => '备注1',
      'end_time'          => '20091225121010',
      'end_time_remark'   => '备注2',
    ],
    'location'             => [
      'start_location' => '嗨客时尚主题展餐厅',
      'end_location'   => '嗨客时尚主题展餐厅',
    ],
    'risk_fund'            => [
      'name'        => 'DEPOSIT',
      'amount'      => 10000,
      'description' => '就餐的预估费用',
    ],
    'attach'               => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
    'notify_url'           => 'https://api.test.com',
    'openid'               => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'need_user_confirm'    => true,
    'mchid'                => '1230000109',
    'shopping_info'        => [
      'real_merchant_appid' => 'wxd678efh567hg6787',
      'jump_link'           => [
        'jump_link_type' => 'JUMP_LINK_MINI_PROGRAM',
        'appid'          => '',
        'path'           => '',
      ],
      'goods'               => [[
        'name'        => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture'     => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount'      => 40000,
        'count'       => 4,
        'category_id' => ['string'],
      ],],
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/payscore/servicepayondeliveryorder')->postAsync([
  'json' => [
    'out_order_no'         => '1234323JKHDFE1243252',
    'appid'                => 'wxd678efh567hg6787',
    'service_id'           => '500001',
    'service_introduction' => '某某酒店',
    'post_payments'        => [[
      'name'        => '就餐费用, 服务费',
      'amount'      => 40000,
      'description' => '就餐人均100元,服务费:100/小时',
      'count'       => 4,
    ],],
    'post_discounts'       => [[
      'name'        => '满20减1元',
      'description' => '不与其他优惠叠加',
      'amount'      => 100,
      'count'       => 2,
    ],],
    'time_range'           => [
      'start_time'        => '20091225091010',
      'start_time_remark' => '备注1',
      'end_time'          => '20091225121010',
      'end_time_remark'   => '备注2',
    ],
    'location'             => [
      'start_location' => '嗨客时尚主题展餐厅',
      'end_location'   => '嗨客时尚主题展餐厅',
    ],
    'risk_fund'            => [
      'name'        => 'DEPOSIT',
      'amount'      => 10000,
      'description' => '就餐的预估费用',
    ],
    'attach'               => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
    'notify_url'           => 'https://api.test.com',
    'openid'               => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'need_user_confirm'    => true,
    'mchid'                => '1230000109',
    'shopping_info'        => [
      'real_merchant_appid' => 'wxd678efh567hg6787',
      'jump_link'           => [
        'jump_link_type' => 'JUMP_LINK_MINI_PROGRAM',
        'appid'          => '',
        'path'           => '',
      ],
      'goods'               => [[
        'name'        => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture'     => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount'      => 40000,
        'count'       => 4,
        'category_id' => ['string'],
      ],],
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/payscore/servicepayondeliveryorder']->postAsync([
  'json' => [
    'out_order_no'         => '1234323JKHDFE1243252',
    'appid'                => 'wxd678efh567hg6787',
    'service_id'           => '500001',
    'service_introduction' => '某某酒店',
    'post_payments'        => [[
      'name'        => '就餐费用, 服务费',
      'amount'      => 40000,
      'description' => '就餐人均100元,服务费:100/小时',
      'count'       => 4,
    ],],
    'post_discounts'       => [[
      'name'        => '满20减1元',
      'description' => '不与其他优惠叠加',
      'amount'      => 100,
      'count'       => 2,
    ],],
    'time_range'           => [
      'start_time'        => '20091225091010',
      'start_time_remark' => '备注1',
      'end_time'          => '20091225121010',
      'end_time_remark'   => '备注2',
    ],
    'location'             => [
      'start_location' => '嗨客时尚主题展餐厅',
      'end_location'   => '嗨客时尚主题展餐厅',
    ],
    'risk_fund'            => [
      'name'        => 'DEPOSIT',
      'amount'      => 10000,
      'description' => '就餐的预估费用',
    ],
    'attach'               => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
    'notify_url'           => 'https://api.test.com',
    'openid'               => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'need_user_confirm'    => true,
    'mchid'                => '1230000109',
    'shopping_info'        => [
      'real_merchant_appid' => 'wxd678efh567hg6787',
      'jump_link'           => [
        'jump_link_type' => 'JUMP_LINK_MINI_PROGRAM',
        'appid'          => '',
        'path'           => '',
      ],
      'goods'               => [[
        'name'        => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture'     => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount'      => 40000,
        'count'       => 4,
        'category_id' => ['string'],
      ],],
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->payscore->servicepayondeliveryorder->post([
  'json' => [
    'out_order_no'         => '1234323JKHDFE1243252',
    'appid'                => 'wxd678efh567hg6787',
    'service_id'           => '500001',
    'service_introduction' => '某某酒店',
    'post_payments'        => [[
      'name'        => '就餐费用, 服务费',
      'amount'      => 40000,
      'description' => '就餐人均100元,服务费:100/小时',
      'count'       => 4,
    ],],
    'post_discounts'       => [[
      'name'        => '满20减1元',
      'description' => '不与其他优惠叠加',
      'amount'      => 100,
      'count'       => 2,
    ],],
    'time_range'           => [
      'start_time'        => '20091225091010',
      'start_time_remark' => '备注1',
      'end_time'          => '20091225121010',
      'end_time_remark'   => '备注2',
    ],
    'location'             => [
      'start_location' => '嗨客时尚主题展餐厅',
      'end_location'   => '嗨客时尚主题展餐厅',
    ],
    'risk_fund'            => [
      'name'        => 'DEPOSIT',
      'amount'      => 10000,
      'description' => '就餐的预估费用',
    ],
    'attach'               => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
    'notify_url'           => 'https://api.test.com',
    'openid'               => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'need_user_confirm'    => true,
    'mchid'                => '1230000109',
    'shopping_info'        => [
      'real_merchant_appid' => 'wxd678efh567hg6787',
      'jump_link'           => [
        'jump_link_type' => 'JUMP_LINK_MINI_PROGRAM',
        'appid'          => '',
        'path'           => '',
      ],
      'goods'               => [[
        'name'        => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture'     => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount'      => 40000,
        'count'       => 4,
        'category_id' => ['string'],
      ],],
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/payscore/servicepayondeliveryorder')->post([
  'json' => [
    'out_order_no'         => '1234323JKHDFE1243252',
    'appid'                => 'wxd678efh567hg6787',
    'service_id'           => '500001',
    'service_introduction' => '某某酒店',
    'post_payments'        => [[
      'name'        => '就餐费用, 服务费',
      'amount'      => 40000,
      'description' => '就餐人均100元,服务费:100/小时',
      'count'       => 4,
    ],],
    'post_discounts'       => [[
      'name'        => '满20减1元',
      'description' => '不与其他优惠叠加',
      'amount'      => 100,
      'count'       => 2,
    ],],
    'time_range'           => [
      'start_time'        => '20091225091010',
      'start_time_remark' => '备注1',
      'end_time'          => '20091225121010',
      'end_time_remark'   => '备注2',
    ],
    'location'             => [
      'start_location' => '嗨客时尚主题展餐厅',
      'end_location'   => '嗨客时尚主题展餐厅',
    ],
    'risk_fund'            => [
      'name'        => 'DEPOSIT',
      'amount'      => 10000,
      'description' => '就餐的预估费用',
    ],
    'attach'               => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
    'notify_url'           => 'https://api.test.com',
    'openid'               => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'need_user_confirm'    => true,
    'mchid'                => '1230000109',
    'shopping_info'        => [
      'real_merchant_appid' => 'wxd678efh567hg6787',
      'jump_link'           => [
        'jump_link_type' => 'JUMP_LINK_MINI_PROGRAM',
        'appid'          => '',
        'path'           => '',
      ],
      'goods'               => [[
        'name'        => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture'     => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount'      => 40000,
        'count'       => 4,
        'category_id' => ['string'],
      ],],
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/payscore/servicepayondeliveryorder']->post([
  'json' => [
    'out_order_no'         => '1234323JKHDFE1243252',
    'appid'                => 'wxd678efh567hg6787',
    'service_id'           => '500001',
    'service_introduction' => '某某酒店',
    'post_payments'        => [[
      'name'        => '就餐费用, 服务费',
      'amount'      => 40000,
      'description' => '就餐人均100元,服务费:100/小时',
      'count'       => 4,
    ],],
    'post_discounts'       => [[
      'name'        => '满20减1元',
      'description' => '不与其他优惠叠加',
      'amount'      => 100,
      'count'       => 2,
    ],],
    'time_range'           => [
      'start_time'        => '20091225091010',
      'start_time_remark' => '备注1',
      'end_time'          => '20091225121010',
      'end_time_remark'   => '备注2',
    ],
    'location'             => [
      'start_location' => '嗨客时尚主题展餐厅',
      'end_location'   => '嗨客时尚主题展餐厅',
    ],
    'risk_fund'            => [
      'name'        => 'DEPOSIT',
      'amount'      => 10000,
      'description' => '就餐的预估费用',
    ],
    'attach'               => 'Easdfowealsdkjfnlaksjdlfkwqoi&wl3l2sald',
    'notify_url'           => 'https://api.test.com',
    'openid'               => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'need_user_confirm'    => true,
    'mchid'                => '1230000109',
    'shopping_info'        => [
      'real_merchant_appid' => 'wxd678efh567hg6787',
      'jump_link'           => [
        'jump_link_type' => 'JUMP_LINK_MINI_PROGRAM',
        'appid'          => '',
        'path'           => '',
      ],
      'goods'               => [[
        'name'        => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture'     => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount'      => 40000,
        'count'       => 4,
        'category_id' => ['string'],
      ],],
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 | 
|---|---|---|
| appid | string | 公众账号ID | 
| mchid | string | 商户号 | 
| out_order_no | string | 商户服务订单号 | 
| service_id | string | 服务ID | 
| service_introduction | string | 服务信息 | 
| state | string | 服务订单状态 | 
| state_description | string | 订单状态说明 | 
| post_payments | object[] | 后付费项目 | 
| name | string | 付费名称 | 
| amount | number | 付费金额 | 
| description | string | 付费说明 | 
| count | number | 付费数量 | 
| post_discounts | object[] | 后付费商户优惠 | 
| name | string | 优惠名称 | 
| description | string | 优惠说明 | 
| amount | number | 优惠金额 | 
| count | number | 优惠数量 | 
| risk_fund | object | 服务风险金 | 
| name | string | 风险名称 | 
| amount | number | 风险金额 | 
| description | string | 风险说明 | 
| time_range | object | 服务时间段 | 
| start_time | string | 服务开始时间 | 
| end_time | string | 服务结束时间 | 
| start_time_remark | string | 服务开始时间备注 | 
| end_time_remark | string | 服务结束时间备注 | 
| location | object | 服务位置 | 
| start_location | string | 服务开始地点 | 
| end_location | string | 服务结束地点 | 
| attach | string | 商户数据包 | 
| notify_url | string | 商户回调地址 | 
| order_id | string | 微信支付服务订单号 | 
| package | string | 跳转微信侧小程序订单数据 | 
| shopping_info | object | 先用后付购物详情 | 
| real_merchant_appid | string | 实际购物商家公众号ID | 
| jump_link | object | 单详跳转链接 | 
| jump_link_type | string | 跳转链接类型 | 
| appid | string | 小程序跳转AppID | 
| path | string | 小程序跳转path | 
| goods | object[] | 商品列表 | 
| name | string | 商品名称 | 
| picture | string | 商品图片链接 | 
| amount | number | 商品单价金额 | 
| count | number | 商品数量 | 
| category_id | string[] | 商品品类ID | 
参阅 官方文档