- Onerway Merchant API Testing
- Onerway 商户 API 接入指南
- Payment APIs
- Checkout
- JS-SDK
- API
- APMs - Alternative Payment Methods
- Refund
- Settlement
- Query
- Utils
Card Checkout - Authorizaiton
Sandbox Env
Sandbox Env
POST
/txn/payment
Request
Body Params application/json
Configuration for processing credit card authorization that verifies and reserves funds without immediate settlement
billingInformation
object
TransactionAddress
address
string
地址信息(账单或配送地址)
city
string
城市名称
country
enum<string>
国家代码,请参考ISO 3166标准
Allowed value:
US
email
string
电子邮件地址
firstName
string
名字
identityNumber
string
证件号码
lastName
string
姓氏
phone
string
电话号码
postalCode
string
邮政编码
province
enum<string>
省/州
Allowed value:
CO
merchantCustId
string
客户在商户系统中的唯一标识
merchantNo
enum<string>
商户号
Allowed value:
{{MERCHANT-NO}}
merchantTxnId
string
商户创建的交易订单号
merchantTxnTime
string
商户交易时间,格式为yyyy-MM-dd HH:mm:ss
orderAmount
string
订单金额
orderCurrency
enum<string>
订单币种,参考ISO 4217货币 代码
Allowed value:
USD
shippingInformation
object
TransactionAddress
address
string
地址信息(账单或配送地址)
city
string
城市名称
country
enum<string>
国家代码,请参考ISO 3166标准
Allowed value:
US
email
string
电子邮件地址
firstName
string
名字
identityNumber
string
证件号码
lastName
string
姓氏
phone
string
电话号码
postalCode
string
邮政编码
province
enum<string>
省/州
Allowed value:
CO
sign
null
签名
txnOrderMsg
object
TxnOrderMsg
accept
enum<string>
持卡人浏览器的Accept请求头
<= 2048 characters
Allowed value:
*/*
Example:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
appId
enum<string>
商户应用程序ID,商户注册网站时Onerway会为商户创建
<= 20 characters
Allowed value:
{{APPID}}
Example:
{{appId}}
colorDepth
enum<string>
ColorDepthEnum
Allowed values:
162432
contentLength
enum<string>
ContentLengthEnum
Allowed values:
0102440961638465536
javaEnabled
boolean
持卡人浏览器是否开启java
Example:
false
language
enum<string>
持卡人浏览器的语言
<= 64 characters
Allowed value:
en-US
Example:
zh-CN
products
array[object (Product) {5}]
商品信息数组,JSON字符串格式
>= 1 items<= 3 items
returnUrl
enum<string>
同步返回地址
<= 256 characters
Allowed value:
{{RETURN-URL}}
Example:
https://docs.onerway.com/
notifyUrl
enum<string>
异步通知地址
Allowed value:
{{WEBHOOK-ENDPOINT}}
screenHeight
enum<string>
ScreenHeightEnum
Allowed values:
4805686406677367407808008448518969159321024108011801200136614401600162018002160
screenWidth
enum<string>
ScreenWidthEnum
Allowed values:
32036037539039341241442876880082096210241280136614401536168019202048256034403840
timeZoneOffset
enum<string>
TimeZoneOffsetEnum
Allowed values:
-840-720-660-600-540-480-420-360-300-240-180-120-60060120180240300360420480540600660720
transactionIp
string
商户客户的交易IP地址
<= 64 characters
Example:
127.0.0.1
userAgent
enum<string>
持卡人的浏览器类型
<= 2048 characters
Allowed value:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Example:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
productType
enum<string>
产品类型
Allowed value:
CARD
subProductType
enum<string>
子产品类型
Allowed value:
DIRECT
txnType
enum<string>
交易类型
Allowed value:
AUTH
Example
{
"billingInformation": {
"address": "6279 Mayfield Road",
"city": "Karolannshire",
"country": "US",
"email": "Delores.Thiel1@gmail.com",
"firstName": "Khalid",
"identityNumber": "86032961732",
"lastName": "Berge",
"phone": "14064876575",
"postalCode": "43936",
"province": "CO"
},
"merchantCustId": "CustId-CIZ4-91M9",
"merchantNo": "{{MERCHANT-NO}}",
"merchantTxnId": "4f581f27-fe1a-4a80-8e10-2b3751ffb785",
"merchantTxnTime": "2025-04-22 14:22:11",
"orderAmount": "83",
"orderCurrency": "USD",
"shippingInformation": {
"address": "639 Myrtle Green",
"city": "Ubaldostead",
"country": "US",
"email": "Lucious.Feeney38@gmail.com",
"firstName": "Lorna",
"identityNumber": "42993160796",
"lastName": "Pfannerstill",
"phone": "16320585629",
"postalCode": "83968",
"province": "CO"
},
"sign": null,
"txnOrderMsg": {
"accept": "*/*",
"appId": "{{APPID}}",
"colorDepth": "32",
"contentLength": "16384",
"javaEnabled": false,
"language": "en-US",
"products": [
{
"currency": "USD",
"name": "tomato",
"num": "90",
"price": "544.09",
"type": "et ad quis laborum"
},
{
"currency": "USD",
"name": "lemon",
"num": "100",
"price": "31.19",
"type": "et est minim in"
},
{
"currency": "USD",
"name": "aubergine",
"num": "65",
"price": "585.69",
"type": "dolor deserunt minim"
}
],
"returnUrl": "{{RETURN-URL}}",
"notifyUrl": "{{WEBHOOK-ENDPOINT}}",
"screenHeight": "1800",
"screenWidth": "800",
"timeZoneOffset": "-540",
"transactionIp": "187.178.122.99",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
},
"productType": "CARD",
"subProductType": "DIRECT",
"txnType": "AUTH"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://sandbox-acq.onerway.com/txn/payment' \
--header 'Content-Type: application/json' \
--data-raw '{
"billingInformation": {
"address": "6279 Mayfield Road",
"city": "Karolannshire",
"country": "US",
"email": "Delores.Thiel1@gmail.com",
"firstName": "Khalid",
"identityNumber": "86032961732",
"lastName": "Berge",
"phone": "14064876575",
"postalCode": "43936",
"province": "CO"
},
"merchantCustId": "CustId-CIZ4-91M9",
"merchantNo": "YOUR-MERCHANT-NO",
"merchantTxnId": "4f581f27-fe1a-4a80-8e10-2b3751ffb785",
"merchantTxnTime": "2025-04-22 14:22:11",
"orderAmount": "83",
"orderCurrency": "USD",
"shippingInformation": {
"address": "639 Myrtle Green",
"city": "Ubaldostead",
"country": "US",
"email": "Lucious.Feeney38@gmail.com",
"firstName": "Lorna",
"identityNumber": "42993160796",
"lastName": "Pfannerstill",
"phone": "16320585629",
"postalCode": "83968",
"province": "CO"
},
"sign": null,
"txnOrderMsg": {
"accept": "*/*",
"appId": "YOUR-APPLICATION-ID",
"colorDepth": "32",
"contentLength": "16384",
"javaEnabled": false,
"language": "en-US",
"products": [
{
"currency": "USD",
"name": "tomato",
"num": "90",
"price": "544.09",
"type": "et ad quis laborum"
},
{
"currency": "USD",
"name": "lemon",
"num": "100",
"price": "31.19",
"type": "et est minim in"
},
{
"currency": "USD",
"name": "aubergine",
"num": "65",
"price": "585.69",
"type": "dolor deserunt minim"
}
],
"returnUrl": "YOUR-RETURN-URL",
"notifyUrl": "YOUR-WEBHOOK-ENDPOINT",
"screenHeight": "1800",
"screenWidth": "800",
"timeZoneOffset": "-540",
"transactionIp": "187.178.122.99",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
},
"productType": "CARD",
"subProductType": "DIRECT",
"txnType": "AUTH"
}'
Responses
🟢200OK
application/json
Body
respCode
string
required
respMsg
string
required
data
object
required
transactionId
string
required
merchantTxnId
string
required
merchantNo
string
required
responseTime
string
required
txnTime
string
required
orderAmount
string
required
orderCurrency
string
required
txnAmount
string
required
txnCurrency
null
required
txnTimeZone
null
required
status
string
required
reason
null
required
redirectUrl
string
required
sign
string
required
contractId
string
required
tokenId
null
required
eci
null
required
transactionOrderNo
null
required
periodValue
null
required
lpmsType
null
required
qrCode
null
required
Example
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"transactionId": "1710930229176258560",
"merchantTxnId": "1654675447655",
"merchantNo": "800209",
"responseTime": "",
"txnTime": "",
"orderAmount": "35.00",
"orderCurrency": "USD",
"txnAmount": "",
"txnCurrency": null,
"txnTimeZone": null,
"status": "U",
"reason": null,
"redirectUrl": "https://sandbox-v3-checkout.pacypay.com/checkout?key=4f698e88462d4eef8851dcd60edcd276",
"sign": "20860d04d28cc55dcf950f86a86fa72587106d7004686016d07c44a568a5450a",
"contractId": "",
"tokenId": null,
"eci": null,
"transactionOrderNo": null,
"periodValue": null,
"lpmsType": null,
"qrCode": null
}
}
Modified at 2025-04-22 06:22:13