开放 API
使用说明
获取授权
全部 API
- Shop
- Metafields
- Customer
- CustomerAddress
- Account
- Product
- ProductVariant
- ProductImage
- Theme
- Asset
- Country
- Province
- City
- District
- ScriptTag
- Order
- Shipment
- ShipmentSupplier
- Payment
- PaymentMethod
- Redirect
- Page
- Webhook
- Blog
- BlogAuthor
- CustomerLevel
- StoreFile
- Promotion
- Coupon
- Post
- AfterSale
PaymentMethod
PaymentMethod
PaymentMethod 为商家配置,并启用的支付方式列表,用于 Order 的创建,通过 API 只可读,不可修改。
PaymentMethod 相关API
PaymentMethod 属性
- gateway
String 类型,PaymentMethod 的支付网关,包括:{ "gateway": "alipay" }
- alipay:支付宝
- wppay:微信支付
- kuaipay:快钱
- tenpay:财付通
- offline:线下支付
- id
Number 类型,PaymentMethod 的唯一整型标识。{ "id": 1 }
- name
String 类型,PaymentMethod 的中文描述。{ "name" : "支付宝(网银直联) - 自主配置" }
- pay_type
String 类型,PaymentMethod 的支付方式,包括:{ "pay_type": "alipay" }
- alipay:支付宝(即时到帐)
- alipay_partner:支付宝(担保交易)
- alipay_bank:支付宝(网银直联)
- wppay:微信支付
- kuaipay:快钱
- tenpay:财付通(即时到帐)
- tenpay_bank:财付通(网银直联)
- offline:货到付款
- payment_method_type
String 类型,支付类型,包括:{ "payment_method_type": "online" }
- 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" } }