PaymentMethod

友好速搭

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

PaymentMethod

PaymentMethod

#PaymentMethod PaymentMethod 为商家配置,并启用的支付方式列表,用于 Order 的创建,通过 API 只可读,不可修改。

PaymentMethod 相关API

GET /payment_methods获取 PaymentMethod 列表GET /payment_methods/count获取 PaymentMethod 数量GET /payment_methods/#{id}获取单个 PaymentMethod

PaymentMethod 属性

    • gateway
    •   { "gateway": "alipay" }
      
      String 类型,PaymentMethod 的支付网关,包括:
      • alipay:支付宝
      • wppay:微信支付
      • kuaipay:快钱
      • tenpay:财付通
      • offline:线下支付
    • id
    •   { "id": 1 }
      
      Number 类型,PaymentMethod 的唯一整型标识。
    • name
    •   { "name" : "支付宝(网银直联) - 自主配置" }
      
      String 类型,PaymentMethod 的中文描述。
    • pay_type
    •   { "pay_type": "alipay" }
      
      String 类型,PaymentMethod 的支付方式,包括:
      • alipay:支付宝(即时到帐)
      • alipay_partner:支付宝(担保交易)
      • alipay_bank:支付宝(网银直联)
      • wppay:微信支付
      • kuaipay:快钱
      • tenpay:财付通(即时到帐)
      • tenpay_bank:财付通(网银直联)
      • offline:货到付款
    • payment_method_type
    •   { "payment_method_type": "online" }
      
      String 类型,支付类型,包括:
      • online:线上支付
      • offline:线下支付

GET /payment_methods

获取 PaymentMethod 列表

    • limit
    • 显示条数(默认10,最大50)
    • page
    • 显示页码(默认1)
    • since_id
    • 筛选id大于since_id的Order
    • fields
    • ,拼接Response显示的字段
    • id
    • 查询指定id
    • ids
    • ,拼接要显示的id范围
    • 获取 PaymentMethods 列表
    • GET /payment_methods
    • {
      "payment_methods": [
          {
              "gateway": "offline",
              "id": 17,
              "name": "货到付款",
              "pay_type": "offline",
              "payment_method_type": "offline"
          },
          {
              "gateway": "alipay",
              "id": 18,
              "name": "支付宝(网银直联) - 自主配置",
              "pay_type": "alipay_bank",
              "payment_method_type": "online"
          },
          {
              "gateway": "alipay",
              "id": 22,
              "name": "支付宝(担保交易) - 自主配置",
              "pay_type": "alipay_partner",
              "payment_method_type": "online"
          },
          {
              "gateway": "tenpay",
              "id": 23,
              "name": "财付通(即时到帐) - 自主配置",
              "pay_type": "tenpay",
              "payment_method_type": "online"
          },
          {
              "gateway": "kuaipay",
              "id": 24,
              "name": "快钱(即时到帐) - 自主配置",
              "pay_type": "kuaipay",
              "payment_method_type": "online"
          },
          {
              "gateway": "alipay",
              "id": 1018,
              "name": "支付宝(即时到帐) - 代收",
              "pay_type": "alipay",
              "payment_method_type": "online"
          },
          {
              "gateway": "wppay",
              "id": 1175,
              "name": "微信支付 - 代收",
              "pay_type": "wppay",
              "payment_method_type": "online"
          }
      ]
      }
      
    • 获取指定 ID 范围的 PaymentMethod 列表
    • GET /payment_methods?ids=22,23
    • {
      "payment_methods": [
          {
              "gateway": "alipay",
              "id": 22,
              "name": "支付宝(担保交易) - 自主配置",
              "pay_type": "alipay_partner",
              "payment_method_type": "online"
          },
          {
              "gateway": "tenpay",
              "id": 23,
              "name": "财付通(即时到帐) - 自主配置",
              "pay_type": "tenpay",
              "payment_method_type": "online"
          }
      ]
      }
      
    • 获取 PaymentMethod 列表,只显示部分字段
    • GET /payment_methods?fields=id,pay_type
    • {
      "payment_methods": [
          {
              "id": 17,
              "pay_type": "offline"
          },
          {
              "id": 18,
              "pay_type": "alipay_bank"
          },
          {
              "id": 22,
              "pay_type": "alipay_partner"
          },
          {
              "id": 23,
              "pay_type": "tenpay"
          },
          {
              "id": 24,
              "pay_type": "kuaipay"
          },
          {
              "id": 1018,
              "pay_type": "alipay"
          },
          {
              "id": 1175,
              "pay_type": "wppay"
          }
      ]
      }
      
    • 获取指定 ID 之后的 PaymentMethod 列表
    • GET /payment_methods?since_id=22
    • {
      "payment_methods": [
          {
              "gateway": "tenpay",
              "id": 23,
              "name": "财付通(即时到帐) - 自主配置",
              "pay_type": "tenpay",
              "payment_method_type": "online"
          },
          {
              "gateway": "kuaipay",
              "id": 24,
              "name": "快钱(即时到帐) - 自主配置",
              "pay_type": "kuaipay",
              "payment_method_type": "online"
          },
          {
              "gateway": "alipay",
              "id": 1018,
              "name": "支付宝(即时到帐) - 代收",
              "pay_type": "alipay",
              "payment_method_type": "online"
          },
          {
              "gateway": "wppay",
              "id": 1175,
              "name": "微信支付 - 代收",
              "pay_type": "wppay",
              "payment_method_type": "online"
          }
      ]
      }
      

GET /payment_methods/count

获取 PaymentMethod 数量

    • 获取PaymentMethod数量
    • GET /payment_methods/count
    • {
      "count": 7
      }
      

GET /payment_methods/#{id}

获取单个 PaymentMethod

    • fields
    • ,拼接Response显示的字段
    • 获取单个 PaymentMethod
    • GET /payment_methods/#{id}
    • {
      "payment_method": {
          "gateway": "offline",
          "id": 17,
          "name": "货到付款",
          "pay_type": "offline",
          "payment_method_type": "offline"
      }
      }
      
免费领取15天试用
立即注册
联系客服
微信咨询
微信二维码

领取免费试用资格

姓名 *

电话 *

公司名称

所在地区

意向产品

提交

提交成功

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