⚙️
API Explorer
  • Overview
  • API Reference
    • 交易
      • Sessiontoken
      • customer
      • Payment methods
      • Confirm charge
      • Checkout payment
      • Local payment
    • 授权交易完成/撤销
      • Authorization
    • 拒付
    • 退款
    • 物流
    • 交易查询
    • 网关绑定支付通道查询
    • 结算明细查询
    • 风控-来源网址查询
  • Webhook
    • 概述
    • 交易事件
    • 预授权事件
    • 退款事件
    • 拒付事件
    • 支付结果跳转
  • 附录
    • 数据签名过程
    • 测试账号信息
    • 常见错误码
    • 常见问题
    • 旧版API文档
Powered by GitBook
On this page
  1. API Reference

交易查询

交易流水查询

Previous物流Next网关绑定支付通道查询

Last updated 2 years ago

本页GET接口,请求参数中含有特殊格式,如 - 、空格等,需要在发送请求时进行urlEncode,否则会发送失败,需要设置x-www-form-urlencoded;charset=UTF-8,如new UrlEncodedFormEntity(param, StandardCharsets.UTF_8),见

交易流水查询请求报文示例

transaction.sh
curl --request GET\
  --url https://{openApiUrl}/openApi/V2022-03/transactions?endTime=2022-05-21T23:59:59&pageIndex=1&pageSize=1000&startTime=2022-02-21T00:00:00&tradeNo=&uploadGoodsFlag=&uploadLogisticsFlag=&orderNo= \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

结果对象属性描述

property name
type
description

code

String

响应码

message

String

响应信息

data

Object

数据体

page

Object

分页对象

total

Integer

总记录条数

pageSize

Integer

每页记录条数

pageIndex

Integer

当前页

list

Array

列表

orderNo

String

商户订单号

tradeNo

String

交易流水号

tradeDate

String

交易时间(时间格式为:yyyy-MM-dd'T'HH:mm:ss)

tradeAmount

double

交易金额

tradeCurrency

String

交易币种

sourceWebSite

String

来源网址

authStatus

String

预授权状态

sale:普通交易

void:预授权取消

pending:预授权待处理

capture:预授权完成

isUploadReceipt

String

是否上传物流订单号:yes、no

isUploadGoods

String

是否上传商品信息:yes、no

tradeStatus

String

交易状态:

pending:待处理

fail:失败

success:成功

tradeInfo

String

交易信息

goods

Object

商品对象

goodsName

String

商品名称

goodsNum

String

商品数量

goodsPrice

String

商品单价

logistics

Object

物流对象

lcCode

String

物流运输商编号

logisticsStatus

String

物流状态,Pending待查询、NotFound 查询不到 、InfoReceived 预报发货 、InTransit 运输途中 、ArrivedDelivery 到达待取 、Delivering 派送途中、Delivered 成功派送、Exception 包裹异常、DeliveryFailure 投递失败、Return 包裹退回、NotOnline 未上线、 Timeout 轨迹超时

trackingNo

String

物流订单号

trackingWeb

String

物流网址

订单信息请求报文示例

orderInfo.sh
curl --request GET\
  --url https://{openApiUrl}/openApi/V2022-03/orderInfo/2022051810582957553787 \
  --header 'request-id: 58675' \
  --header 'request-time: 1651888520935' \
  --header 'gateway-no: 12345001' \
  --header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

结果对象属性描述

code

String

响应码

message

String

响应信息

data

Object

数据体

tradeNo

String

流水订单号

phone

String

客户电话

firstName

String

客户名

lastName

String

客户姓

billCountry

String

账单国

billState

String

州

billCity

String

城市

billAddress

String

地址

billEmail

String

邮箱

billPostcode

String

客户邮编

ipAddress

String

IP地址

ipCountry

String

IP国家

ipCity

String

IP城市

sourceWebSite

String

交易网址

cardType

String

支付卡种:

VISA,MASTER,JCB,AE,DiSCOVER,UNIONPAY

cardNo

String

卡号

issuingBank

String

发卡行

crossCountryPayment

Integer

跨国支付,

0:否

1:是

highRiskCountry

Integer

高风险国家

0:否

1:是

binCountry

String

真实发卡国

paymentMethod

String

支付方式

shipFirstName

String

收件人名

shipLastName

String

收件人姓

shipPhone

String

收件人电话

shipCountry

String

收件人国家

shipState

String

收件人州

shipCity

String

收件人城市

shipAddress

String

收件人地址

shipPostcode

String

收件人邮编

localPaymentLink

String

本地支付链接

billDescriptor

String

账单地址

platform

String

商户平台

常见问题

交易流水查询

get

查询正式交易接口

Query parameters
endTimestring(19)Required

结束时间,开始时间与结束时间最大不能超过半年的时间间隔;固定长度为19,如:2022-04-01T00:00:00

orderNostring(64)Optional

商户订单号;最小长度为1,最大长度为64,如:12167001000000000001

pageIndexstring(10)Optional

当前页,默认第一页;最大长度为10,如:1

pageSizestring(10)Optional

每页大小,默认每页100条数据,最大1000条;最大长度为10,如:100

startTimestring(19)Required

开始时间,开始时间与结束时间最大不能超过半年的时间间隔;固定长度为19,如:2022-01-01T00:00:00

tradeNostring(64)Optional

交易流水号;最小长度为1,最大长度为64,如:2021050715591893808753

uploadGoodsFlagstring(1)Optional

是否上传商品信息(0:否,1:是,不传查询所有订单);固定长度为1,如:1

uploadLogisticsFlagstring(1)Optional

是否上传物流标识(0:否,1:是,不传查询所有订单);固定长度为1,如:1

Header parameters
gateway-nostring(16)Required

网关号

request-idstring(64)Required

请求id,30分钟之内唯一

request-timestring(16)Required

时间戳,以毫秒(ms)为单位,请求误差不能超过10分钟

sign-infostring(255)Required

验签字段,具体加签方式请参阅数据签名过程章节

Responses
200
OK
*/*
get
GET /openApi/V2022-03/transactions HTTP/1.1
Host: {openapiurl}
gateway-no: null
request-id: null
request-time: null
sign-info: null
Accept: */*
200

OK

{
  "code": "00000",
  "data": {
    "list": [
      {
        "authStatus": "capture",
        "goods": {
          "goodsName": "iPhone13 红色",
          "goodsNum": 2,
          "goodsPrice": 6499
        },
        "isUploadReceipt": "yes",
        "logistics": {
          "lcCode": "TWTH",
          "logisticsStatus": "Delivered",
          "trackingNo": 1223212312,
          "trackingWeb": "https://abc.com"
        },
        "orderNo": 12167001000000000000,
        "sourceWebSite": "www.asiabill.com",
        "tradeAmount": 100.12,
        "tradeCurrency": "USD",
        "tradeDate": "2021-04-12T00:00:00",
        "tradeInfo": "tradeInfo",
        "tradeNo": "2021092810011380477264",
        "tradeStatus": "success"
      }
    ],
    "page": {
      "pageIndex": 1,
      "pageSize": 100,
      "total": 1000
    }
  },
  "message": "message info"
}

订单信息查询

get
Path parameters
tradeNostring(64)Required

交易流水号;最小长度为1,最大长度为64

Header parameters
gateway-nostring(16)Required

网关号

request-idstring(64)Required

请求id,30分钟之内唯一

request-timestring(16)Required

时间戳,以毫秒(ms)为单位,请求误差不能超过10分钟

sign-infostring(255)Required

验签字段,具体加签方式请参阅数据签名过程章节

Responses
200
OK
*/*
get
GET /openApi/V2022-03/orderInfo/{tradeNo} HTTP/1.1
Host: {openapiurl}
gateway-no: null
request-id: null
request-time: null
sign-info: null
Accept: */*
200

OK

{
  "code": "00000",
  "data": {
    "billAddress": "billAddress",
    "billCity": "billCity",
    "billCountry": "US",
    "billDescriptor": "shipLastName",
    "billEmail": "aaaa@asiabill.com",
    "billPostcode": 81000000,
    "billState": "billState",
    "binCountry": "US",
    "cardNo": "404881******2341",
    "cardType": "Visa",
    "crossCountryPayment": "yes",
    "firstName": "firstName",
    "highRiskCountry": 0,
    "ipAddress": "10.25.36.35",
    "ipCity": "ipCity",
    "ipCountry": "US",
    "issuingBank": "Test",
    "lastName": "lastName",
    "localPaymentLink": "shipLastName",
    "paymentMethod": "Credit Card",
    "phone": 1545487565144,
    "platform": "shipLastName",
    "shipAddress": "shipAddress",
    "shipCity": "shipCity",
    "shipCountry": "US",
    "shipFirstName": "shipFirstName",
    "shipLastName": "shipLastName",
    "shipPhone": 1545487565144,
    "shipPostcode": "shipLastName",
    "shipState": "shipState",
    "sourceWebSite": "www.asiabill.com",
    "tradeNo": "2021092810011380477264"
  },
  "message": "message info"
}
  • GET交易流水查询
  • 交易流水查询请求报文示例
  • GET订单信息查询
  • 订单信息请求报文示例