- Onerway Merchant API Testing
- Onerway 商户 API 接入指南
- Payment APIs
- Checkout
- JS-SDK
- API
- APMs - Alternative Payment Methods
- Refund
- Settlement
- Query
- Utils
APMs Checkout
Sandbox Env
Sandbox Env
POST
/txn/payment
Request
Body Params application/json
Configuration for processing payments with a comprehensive checkout interface that presents all available payment methods to the customer
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:
ALL
subProductType
enum<string>
子产品类型
Allowed value:
DIRECT
txnType
enum<string>
交易类型
Allowed value:
SALE
Example
{
"billingInformation": {
"address": "83496 Springfield Road",
"city": "New Milton",
"country": "US",
"email": "Dorian.Nikolaus26@hotmail.com",
"firstName": "Fern",
"identityNumber": "72215839163",
"lastName": "Von",
"phone": "18735764175",
"postalCode": "74490",
"province": "CO"
},
"merchantCustId": "CustId-K354-R5AX",
"merchantNo": "{{MERCHANT-NO}}",
"merchantTxnId": "f7f9306e-85de-408b-806b-3a3e7ffb3703",
"merchantTxnTime": "2025-04-22 13:57:16",
"orderAmount": "6",
"orderCurrency": "USD",
"shippingInformation": {
"address": "86406 Gloucester Road",
"city": "South Douglaston",
"country": "US",
"email": "Gardner_Lueilwitz@yahoo.com",
"firstName": "Geo",
"identityNumber": "26044125871",
"lastName": "Thiel",
"phone": "19714267112",
"postalCode": "89995-9234",
"province": "CO"
},
"sign": null,
"txnOrderMsg": {
"accept": "*/*",
"appId": "{{APPID}}",
"colorDepth": "16",
"contentLength": "0",
"javaEnabled": true,
"language": "en-US",
"products": [
{
"currency": "USD",
"name": "feijoa",
"num": "77",
"price": "842.79",
"type": "nisi ex pariatur"
},
{
"currency": "USD",
"name": "loquat",
"num": "31",
"price": "726.35",
"type": "ad"
},
{
"currency": "USD",
"name": "strawberry",
"num": "99",
"price": "819.79",
"type": "ex consectetur incididunt deserunt mollit"
}
],
"returnUrl": "{{RETURN-URL}}",
"notifyUrl": "{{WEBHOOK-ENDPOINT}}",
"screenHeight": "1080",
"screenWidth": "820",
"timeZoneOffset": "-600",
"transactionIp": "240.27.238.119",
"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": "ALL",
"subProductType": "DIRECT",
"txnType": "SALE"
}
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": "83496 Springfield Road",
"city": "New Milton",
"country": "US",
"email": "Dorian.Nikolaus26@hotmail.com",
"firstName": "Fern",
"identityNumber": "72215839163",
"lastName": "Von",
"phone": "18735764175",
"postalCode": "74490",
"province": "CO"
},
"merchantCustId": "CustId-K354-R5AX",
"merchantNo": "YOUR-MERCHANT-NO",
"merchantTxnId": "f7f9306e-85de-408b-806b-3a3e7ffb3703",
"merchantTxnTime": "2025-04-22 13:57:16",
"orderAmount": "6",
"orderCurrency": "USD",
"shippingInformation": {
"address": "86406 Gloucester Road",
"city": "South Douglaston",
"country": "US",
"email": "Gardner_Lueilwitz@yahoo.com",
"firstName": "Geo",
"identityNumber": "26044125871",
"lastName": "Thiel",
"phone": "19714267112",
"postalCode": "89995-9234",
"province": "CO"
},
"sign": null,
"txnOrderMsg": {
"accept": "*/*",
"appId": "YOUR-APPLICATION-ID",
"colorDepth": "16",
"contentLength": "0",
"javaEnabled": true,
"language": "en-US",
"products": [
{
"currency": "USD",
"name": "feijoa",
"num": "77",
"price": "842.79",
"type": "nisi ex pariatur"
},
{
"currency": "USD",
"name": "loquat",
"num": "31",
"price": "726.35",
"type": "ad"
},
{
"currency": "USD",
"name": "strawberry",
"num": "99",
"price": "819.79",
"type": "ex consectetur incididunt deserunt mollit"
}
],
"returnUrl": "YOUR-RETURN-URL",
"notifyUrl": "YOUR-WEBHOOK-ENDPOINT",
"screenHeight": "1080",
"screenWidth": "820",
"timeZoneOffset": "-600",
"transactionIp": "240.27.238.119",
"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": "ALL",
"subProductType": "DIRECT",
"txnType": "SALE"
}'
Responses
🟢200OK
application/json
Body
object {0}
Examples
{
"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 05:57:18