Checkout
跳转支付/收银台
请求参数
transactionType
String(32)
C
Sale / Authorization (目前默认 Sale)
transactionId
String(128)
M
商户交易唯一 ID
orderId
String(128)
O
商户订单 ID,可以重复但只能存在一笔成功交易
currency
String(3)
M
币种 (CNY/USD)
amount
Number(12,3)
M
交易金额
appId
Number(20)
C
APP ID(domain 二选一)
domain
String(128)
C
请求网站域名 (appId 二选一)
callbackUrl
String(255)
C
3D/Checkout 回调 URL,3D/Checkout 交易必填(一般用于处理面显示逻辑)
notificationUrl
String(255)
C
异步通知 URL,此参数不为空,交易完成会往此地址发送通知(一般用于处理订单状态)
transactionIp
String(128)
M
持卡人交易 IP
productName
String(255)
O
产品名称
productInfos
Array
O
产品详情,详见下表
secure
Boolean
O
是否请求 3D 交易 true/false
extension
Object
O
扩展字段,某些交易特定字段
ProductInfos 对象
productName
String(128)
O
商品名称
currency
String(3)
O
商品币种
price
Number(12,3)
O
单个商品价格
sku
String(128)
O
商品 SKU
quantity
Number(4)
O
商品个数
productLink
String(255)
O
商品链接
BillingAddress&ShippingAddress 对象
firstName
String(64)
O
名
lastName
String(64)
O
姓
String(255)
O
邮箱
phone
String(32)
O
电话
country
String(2)
O
国家 2 位 CODE
state
String(128)
O
州
city
String(128)
O
城市
address
String(255)
O
地址
zipCode
String(64)
O
邮编
Browser 浏览器参数
accept
String(128)
O
浏览器参数
userAgent
String(128)
O
浏览器参数
acceptLanguage
String(128)
O
浏览器参数
javaEnabled
Boolean
O
浏览器参数
colorDepth
String(16)
O
浏览器参数
screenHeight
String(16)
O
浏览器参数
screenWidth
String(16)
O
浏览器参数
timeZoneOffset
String(32)
O
浏览器参数
referer
String(128)
O
浏览器参数
Transaction Method 付款方式
CreditCard
spei
naverpay
rakutenpay
banktransfer
mercadopago
kakaopay
alipay
oxxo
klarna
linepay
wechatpay
oxxopay
payco
paypay
upop
toss
lpay
paypal
venmo
samsungpay
alipay+
alipay_hk
gcash
dana
rabbit_line_pay
tng
bpi
truemoney
lgpay
RapiPago
ARS and USD
AR
PagoFacil
ARS and USD
AR
Cupon
ARS and USD
AR
Pagosnet
BOB and USD
BO
Pix
BRL and USD
BR
PISP
BRL and USD
BR
Boleto
BRL
BR
BankTransfer
BRL and NGN
BR,NG
Servipag
CLP and USD
CL
Sencillito
CLP and USD
CL
Multicaja
CLP and USD
CL
Webpay
PEN and USD
CL
PSE
COP, USD and EUR
CO
Efecty
COP, USD and EUR
CO
Bancolombia
COP
CO
SafetyPayCash
PEN and USD
EC,PE
SafetyPayOnline
PEN and USD
EC,PE
UPI
INR
IN
OXXO
MXN and USD
MX
OXXOPAY
MXN and USD
MX
SPEI
MXN and USD
MX
PagoEfectivo
PEN and USD
PE
Ozow
ZAR
ZA
特殊付款方式
MobileMoney 国家不同,支持的运营商也不同,需要按照下表传入额外参数
在请求参数 extension 中添加 code 字段,传入对应只运营商,参考下表
GH
GHS
mpesa, airtel and mtn
KE
KES
mpesa, airtel and equitel
UG
UGX
airtel and mtn
TZ
TZS
airtel, vodacom and tigo
ZM
ZMW
airtel, zamtel and mtn
实例
{
"transactionType": "Sale",
"transactionId": "123456",
"currency": "USD",
"amount": "8.88",
"transactionMethod": "MobileMoney",
...
"extension": {
"code": "airtel"
}
}USSD 需要传入指定的银行Code
在请求参数 extension 中添加 code 字段,传入对应的银行代码,参考下表
其中当银行为 Zenith bank 的时候 还需传入account 字段, 为 Account number
Access Bank
access_bank
Ecobank
ecobank
Fidelity Bank
fidelity_bank
First Bank of Nigeria
first_bank_of_nigeria
First City Monument Bank
first_city_monument_bank
Guaranty Trust Bank
guaranty_trust_bank
Heritage Bank
heritage_bank
Keystone Bank
keystone_bank
Stanbic IBTC Bank
stanbic_ibtc_bank
Sterling Bank
sterlink_bank
Union Bank
union_bank
United Bank for Africa
united_bank_for_africa
Unity Bank
unity_bank
VFD Microfinance Bank
vfd_microfinance_bank
Wema bank
wema_bank
Zenith bank
zenith_bank
实例
{
"transactionType": "Sale",
"transactionId": "123456",
"currency": "USD",
"amount": "8.88",
"transactionMethod": "USSD",
...
"extension": {
"code": "zenith_bank",
"account": "123456789"
}
}请求实例
{
"transactionType": "Sale",
"transactionId": "123456",
"currency": "USD",
"amount": "8.88",
"appId": "123456",
"callbackUrl": "https://domain/callback",
"notificationUrl": "https://domain/notification",
"transactionIp": "127.0.0.1",
"productName": "Stonebriar Unscented Tea Light Candles with 6-7 Hour Burn Time - White, Pack of 100",
"productInfos": [
{
"productName": "Stonebriar Unscented Tea Light Candles with 6-7 Hour Burn Time - White, Pack of 100",
"currency": "USD",
"price": "8.88",
"sku": "123-456-789",
"quantity": 1,
"productLink": "https://domain/123-456-789"
}
],
"billingAddress": {
"firstName": "Gross",
"lastName": "Schmidt",
"country": "CA",
"email": "[email protected]",
"city": "Longueuil",
"address": "3226 rue Saint-Charles",
"phone": "450-928-5752",
"state": "Quebec",
"zipCode": "J4H 1M3"
},
"shippingAddress": {
"firstName": "Gross",
"lastName": "Schmidt",
"country": "CA",
"email": "[email protected]",
"city": "Longueuil",
"address": "3226 rue Saint-Charles",
"phone": "450-928-5752",
"state": "Quebec",
"zipCode": "J4H 1M3"
},
"browser": {
"userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.24 Safari/537.36 Edg/83.0.478.18",
"referer": "https://www.domain.com"
},
"extension": {
"identificationType": "IDENTITY",
"identificationValue": "1234567890",
"thirdPartyId": "1234567890",
"thirdPartyName": "ABC"
}
}返回实例
交易成功/跳转收银台
{
"code": 301,
"isTest": true,
"appId": 123456,
"uniqueId": "1669548151356891137",
"billDescription": "*Description",
"message": "order processing",
"timestamp": 1686886273516,
"transactionAmount": "8.88",
"transactionAt": "2023-06-16 11:31:12",
"transactionCardNumber": "420000******0000",
"transactionCurrency": "USD",
"transactionId": "123456",
"transactionMessage": "Redirect",
"redirectUrl": "https://domain/redirect/a6354c630cba488caa56a0113bb0ef34"
}交易失败
{
"code": 101,
"isTest": true,
"appId": 123456,
"uniqueId": "1669548151356891137",
"billDescription": "*Description",
"message": "transaction failed",
"timestamp": 1686886273516,
"transactionAmount": "8.88",
"transactionAt": "2023-06-16 11:31:12",
"transactionCardNumber": "420000******0000",
"transactionCurrency": "USD",
"transactionId": "123456",
"transactionMessage": "Do not honor"
}返回参数
code
Number(3)
M
返回码,详见附录
uniqueId
String(32)
M
系统返回唯一交易 ID
appId
Number(20)
M
APP ID
transactionId
String(128)
M
商户支付唯一 ID
transactionCurrency
String(3)
M
交易币种(CNY/USD)
transactionAmount
String(12)
M
交易金额
transactionCardNumber
String(20)
O
交易卡号,前六后四
billDescription
String(128)
O
账单信息
transactionMessage
String(255)
O
交易错误信息,可能是渠道直接返回的错误信息
redirectUrl
String(255)
O
3D 跳转 URL
transactionAt
String(32)
M
交易时间
message
String(255)
M
普通返回信息
timestamp
Number
M
返回时间戳
isTest
Boolean
M
当前交易是否为测试交易,真实交易返回 false
Last updated