Payment

友好速搭

开放 API
使用说明 获取授权 全部 API 特殊 API 开放功能

Payment

Payment

#Payment Payment 是 Order 的支付记录,同个 Order 中仅允许有一条记录有效(payment.is_available = true)。

Payment 对象支持 Webhook

Payment 相关API

GET /orders/#{id}/payments获取 Order 所有 PaymentGET /orders/#{id}/payments/count获取 Order 所有 Payment 的数量GET /orders/#{id}/payments/#{id}获取 Order 的单个 Payment

Payment 相关属性

    • amount
    •   {  "amount": 0.01 }
      
      Price 类型,Payment 的支付金额。
    • bank_code
    •   { "bank_code" : "" }
      
      String 类型,Payment 的网银支付编码,当且仅当payment_method.pay_type为网银支付时不为空。
    • created_at
    •   { "created_at": "2014-09-01T00:00:01.987+08:00" }
      
      Datetime 类型,Payment 的创建时间。
    • exipired_at
    •   { "exipired_at": "2014-09-01T00:00:01.987+08:00" }
      
      Datetime 类型,Payment 的支付过期时间。当且仅当payment_method.payment_method_typeonline时存在,为 Payment 创建时会设定为创建时间的两天后支付过期。
    • gateway_payment_no
    •   { "gateway_payment_no" : "" }
      
      String 类型,Payment 的第三方支付网关支付编号,当且仅当payment_method.payment_method_typeonlinestatuspaid时存在,用于与第三方支付网关对账。
    • id
    •   { "id": 326 }
      
      Number 类型,Payment 的唯一整型标识。
    • is_available
    •   { "is_available" : true }
      
      Bool 类型,标识 Payment 是否为有效支付。
    • payment_method
    • {
      "payment_method": {
                  "gateway": "alipay",
                  "id": 22,
                  "name": "支付宝(担保交易) - 自主配置",
                  "pay_type": "alipay_partner",
                  "payment_method_type": "online"
              }
      }
      
      Object 类型, Payment 的支付方式,可参考PaymentMethod
    • status
    •   { status": "pending" }
      
      String 类型,Payment 的支付状态,包括:
      • pending:等待支付
      • paid:支付完成
      • expired:支付超时
    • pay_by_other
    •   { pay_by_other": true }
      
      Boolean 类型,Payment 的代付状态,包括:
      • true:订单由别人代付
      • false:订单由自己支付
    • updated_at
    •   { "updated_at": "2014-09-01T00:00:01.987+08:00" }
      
      Datetime 类型,Payment 的最近一次修改时间。

GET /orders/#{id}/payments

获取 Order 所有 Payment

    • fields
    • ,拼接Response显示的字段
    • 获取 Order 所有 Payment
    • GET /orders/325/payments
    • {
      "payments": [
          {
              "amount": 11,
              "bank_code": "",
              "created_at": "2015-05-12T16:47:20.179+08:00",
              "exipired_at": "2015-05-14T03:00:00.000+08:00",
              "gateway_payment_no": null,
              "id": 317,
              "is_available": false,
              "mode": "online",
              "payment_method": {
                  "gateway": "alipay",
                  "id": 22,
                  "name": "支付宝(担保交易) - 自主配置",
                  "pay_type": "alipay_partner",
                  "payment_method_type": "online"
              },
              "status": "pending",
              "updated_at": "2015-05-12T16:48:06.468+08:00"
          },
          {
              "amount": 10,
              "bank_code": "",
              "created_at": "2015-05-12T16:48:06.468+08:00",
              "exipired_at": "2015-05-14T16:48:06.468+08:00",
              "gateway_payment_no": null,
              "id": 318,
              "is_available": true,
              "mode": "online",
              "payment_method": {
                  "gateway": "alipay",
                  "id": 22,
                  "name": "支付宝(担保交易) - 自主配置",
                  "pay_type": "alipay_partner",
                  "payment_method_type": "online"
              },
              "status": "pending",
              "updated_at": "2015-05-12T16:48:06.468+08:00"
          }
      ]
      }
      

GET /orders/#{id}/payments/count

获取 Order 所有 Payment 的数量

    • 获取 Order 所有 Payment 的数量
    • GET /orders/12032/payments/count
    • {
          "count": 2
      }
      

GET /orders/#{id}/payments/#{id}

获取 Order 的单个 Payment

    • fields
    • ,拼接Response显示的字段
    • 获取 Order 的单个 Payment
    • GET /orders/325/payments/318
    • {
      "payment": {
          "amount": 10,
          "bank_code": "",
          "created_at": "2015-05-12T16:48:06.468+08:00",
          "exipired_at": "2015-05-14T16:48:06.468+08:00",
          "gateway_payment_no": null,
          "id": 318,
          "is_available": true,
          "mode": "online",
          "payment_method": {
              "gateway": "alipay",
              "id": 22,
              "name": "支付宝(担保交易) - 自主配置",
              "pay_type": "alipay_partner",
              "payment_method_type": "online"
          },
          "status": "pending",
          "updated_at": "2015-05-12T16:48:06.468+08:00"
      }
      }
      
免费领取15天试用
立即注册
联系客服
微信咨询
微信二维码

领取免费试用资格

姓名 *

电话 *

公司名称

所在地区

意向产品

提交

提交成功

你好, XXX女士/先生 ,你的需求已提交成功,后续会有专门的客户经理与你电话联系。谢谢!