Onerway Payment API
Onerway APIs
  1. Checkout
  • Onerway 商户 API 接入指南
  • Onerway Merchant API Testing
  • Payment APIs
    • Checkout
      • Card Checkout
        POST
      • Card Checkout - Subscribe
        POST
      • APMs Checkout
        POST
      • Single-Method APM Checkout
        POST
      • Card Checkout - Authorizaiton
        POST
    • JS-SDK
      • One-Time Payment Intent
      • Subscription Payment Intent
      • Card Tokenization Intent
    • API
      • Card
      • Pre-Auth
      • Auth Reversal
      • Capture
      • Card Tokenization
      • Tokenized Payment
      • Subscription - Charge by Onerway
      • Subscription Initial Charge
      • Subscription Recurring Charge
      • Subscription Cancellation
      • Subscription Reactivation
      • Token Removal
    • APMs - Alternative Payment Methods
      • Thailand
        • Thailand-TrueMoney Wallet
        • Thailand-PromptPay
        • Thailand-Rabbit_Line_pay
        • Thailand-KRUNGSRI_ONLINE
      • Malaysia
        • Malaysia-TOUCH_GO_EWALLET
        • Malaysia-Boost
        • Malaysia-MCASH
        • Malaysia-ShopeePay
        • Malaysia-FPX
      • Indonesia
        • Indonesia-ShopeePay
        • Indonesia-OVO
        • Indonesia-DANA
        • Indonesia-QRIS
        • Indonesia-BNI
        • Indonesia-MANDIRI
        • Indonesia-Maybank
        • Indonesia-PERMATA
        • Indonesia-BRI
        • Indonesia-CIMB
        • Indonesia-AKULAKU
        • Indonesia-DANA(Subscribe)
      • Japan
        • Japan-Konbini
        • Japan-PayEasy
      • South Korea
        • South Korea-Kakao_Pay
        • South Korea-Naver_Pay
        • South Korea-PAYCO
        • South Korea-Cards_KOR
      • Vietnam
        • Vietnam-NINE_PAY
        • Vietnam-PAYME
        • Vietnam-VIET_QR
        • Vietnam-MOMO
        • Vietnam-ATM_CARD
      • Philippines
        • Philippines-Dragonpay
        • Philippines-QR_PH
      • Brazil
        • Brazil-Boleto
        • Brazil-Visa/Master
        • Brazil-PIX
        • Brazil-PicPay
        • Brazil-MercadoPago
      • Mexico
        • Mexico-Visa/Master
        • Mexico-SPEI
        • Mexico-OXXO
        • Mexico-PaySafeCard
      • Chile
        • Chile-Visa/Master
        • Chile-Khipu
        • Chile-Webpay
        • Chile-Servipag
        • Chile-Sencillito
      • Paraguay
        • Paraguay-Visa/Master
        • Paraguay-Infonet
      • United States
        • United States-PayPal
        • United States-Venmo
        • United States-CASH_APP
      • Belgium
        • Belgium-Bancontact
        • Belgium-Payconiq
      • Germany
        • Germany-PaySafeCard
        • Germany-Giropay
      • Italy
        • Italy-MyBank
      • Luxembourg
        • Luxembourg-Payconiq
      • Estonia
      • Turkey
        • Turkey-Papara
      • Peru
        • Peru-PagoEfectivo
    • Refund
      • Initiate Refund
      • Cancel Refund
    • Settlement
      • Settlement File Download
    • Query
      • Retrieve Transaction Orders
      • Query Installment Options
      • Retrieve Subscription Details
      • Query Chargeback Records
      • Retrieve Card Tokenization Records
    • Utils
      • Signature Validation Helper
  1. Checkout

Single-Method APM Checkout

Sandbox Env
https://sandbox-acq.onerway.com
Sandbox Env
https://sandbox-acq.onerway.com
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
required
address
string 
地址信息(账单或配送地址)
required
Address information (billing or shipping)
city
string 
城市名称
required
City name
country
enum<string> 
国家代码,请参考ISO 3166标准
required
Country code according to ISO 3166 standard
Allowed value:
US
email
string 
电子邮件地址
required
Email address
firstName
string 
名字
required
First name
identityNumber
string 
证件号码
optional
Identity document number
lastName
string 
姓氏
required
Last name
phone
string 
电话号码
required
Phone number
postalCode
string 
邮政编码
required
Postal code
province
enum<string> 
省/州
required
State/province
Allowed value:
CO
merchantCustId
string 
客户在商户系统中的唯一标识
optional
Merchant Customer ID
merchantNo
enum<string> 
商户号
required
Merchant number assigned by Onerway
Allowed value:
{{MERCHANT-NO}}
merchantTxnId
string 
商户创建的交易订单号
required
Transaction order number created by the merchant
merchantTxnTime
string 
商户交易时间,格式为yyyy-MM-dd HH:mm:ss
optional
Merchant transaction time in yyyy-MM-dd HH:mm:ss format
orderAmount
string 
订单金额
required
Order amount
orderCurrency
enum<string> 
订单币种,参考ISO 4217货币代码
required
Order currency according to ISO 4217 standard
Allowed value:
USD
shippingInformation
object 
TransactionAddress
required
address
string 
地址信息(账单或配送地址)
required
Address information (billing or shipping)
city
string 
城市名称
required
City name
country
enum<string> 
国家代码,请参考ISO 3166标准
required
Country code according to ISO 3166 standard
Allowed value:
US
email
string 
电子邮件地址
required
Email address
firstName
string 
名字
required
First name
identityNumber
string 
证件号码
optional
Identity document number
lastName
string 
姓氏
required
Last name
phone
string 
电话号码
required
Phone number
postalCode
string 
邮政编码
required
Postal code
province
enum<string> 
省/州
required
State/province
Allowed value:
CO
sign
null 
签名
required
Signature string for request verification
txnOrderMsg
object 
TxnOrderMsg
required
accept
enum<string> 
持卡人浏览器的Accept请求头
required
Browser's Accept header from the cardholder's HTTP request
<= 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会为商户创建
required
Unique identifier for the merchant's website/application. Can be obtained from Onerway merchant dashboard
<= 20 characters
Allowed value:
{{APPID}}
Example:
{{appId}}
colorDepth
enum<string> 
ColorDepthEnum
required
Allowed values:
162432
contentLength
enum<string> 
ContentLengthEnum
required
Allowed values:
0102440961638465536
javaEnabled
boolean 
持卡人浏览器是否开启java
required
Indicates if Java is enabled in cardholder's browser. Obtained via window.navigator.javaEnabled()
Example:
false
language
enum<string> 
持卡人浏览器的语言
required
Browser language setting. Obtained via window.navigator.language
<= 64 characters
Allowed value:
en-US
Example:
zh-CN
products
array[object (Product) {5}] 
商品信息数组,JSON字符串格式
required
Array of products in the current transaction
>= 1 items<= 3 items
returnUrl
enum<string> 
同步返回地址
required
URL where the customer will be redirected after completing 3DS authentication
<= 256 characters
Allowed value:
{{RETURN-URL}}
Example:
https://docs.onerway.com/
notifyUrl
enum<string> 
异步通知地址
required
Webhook URL for asynchronous notifications
Allowed value:
{{WEBHOOK-ENDPOINT}}
screenHeight
enum<string> 
ScreenHeightEnum
required
Allowed values:
4805686406677367407808008448518969159321024108011801200136614401600162018002160
screenWidth
enum<string> 
ScreenWidthEnum
required
Allowed values:
32036037539039341241442876880082096210241280136614401536168019202048256034403840
timeZoneOffset
enum<string> 
TimeZoneOffsetEnum
required
Allowed values:
-840-720-660-600-540-480-420-360-300-240-180-120-60060120180240300360420480540600660720
transactionIp
string 
商户客户的交易IP地址
required
IP address of the cardholder making the transaction
<= 64 characters
Example:
127.0.0.1
userAgent
enum<string> 
持卡人的浏览器类型
required
Browser's User-Agent string. Obtained via window.navigator.userAgent
<= 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
lpmsInfo
object 
本地支付方式信息
required
Configuration parameters for alternative payment methods specific to particular regions or payment ecosystems
lpmsType
enum<string> 
本地支付方式类型
required
Local payment method type. Please refer to LpmsTypeEnum.
<= 64 characters
Allowed value:
Alipay+
Examples:
Alipay+KlarnaBoleto
bankName
null 
银行名称,某些本地支付方式需要
optional
Bank name required for specific local payment methods. When lpmsType is EFT, refer to EFTBankNameEnum. When lpmsType is Przelewy24, refer to Przelewy24BankNameEnum.
iBan
null 
银行账户,部分地区转账时需要
optional
International Bank Account Number required for transfers in certain regions.
walletAccountId
null 
钱包/本地账户ID,部分地区转账时需要
optional
Wallet or local account identifier required for specific payment scenarios. Required when: 1) productType is LPMS and lpmsType is ATM_CARD (provide local bank account number), or 2) productType is PAYMENT_CODE (provide wallet payment code).
walletAccountName
null 
钱包/本地账户名称,部分地区转账时需要
optional
Wallet or local account name required for specific payment scenarios. Mandatory when productType is LPMS and lpmsType is ATM_CARD, in which case the local bank account holder name must be provided.
prepaidNumber
null 
预付费卡号
optional
Prepaid card number required for certain payment methods.
productType
enum<string> 
产品类型
required
Product type specifying the payment method category (ALL for displaying all available payment options to the customer)
Allowed value:
ALL
subProductType
enum<string> 
子产品类型
required
Sub-product type indicating the specific processing method (DIRECT for standard one-time payment)
Allowed value:
DIRECT
txnType
enum<string> 
交易类型
required
Transaction type defining the payment operation (SALE for immediate authorization and capture)
Allowed value:
SALE
Example
{
    "billingInformation": {
        "address": "79745 Yost Plain",
        "city": "Fayetteville",
        "country": "US",
        "email": "Jakayla0@hotmail.com",
        "firstName": "Elfrieda",
        "identityNumber": "12639115128",
        "lastName": "Murphy",
        "phone": "17642769913",
        "postalCode": "98958",
        "province": "CO"
    },
    "merchantCustId": "CustId-UILA-F33Q",
    "merchantNo": "{{MERCHANT-NO}}",
    "merchantTxnId": "b92bea42-f8a7-468d-a501-ccd1c7396fd7",
    "merchantTxnTime": "2025-03-21 15:19:41",
    "orderAmount": "20",
    "orderCurrency": "USD",
    "shippingInformation": {
        "address": "628 Sauer Villages",
        "city": "Isomstead",
        "country": "US",
        "email": "Johanna80@yahoo.com",
        "firstName": "Madie",
        "identityNumber": "00830222859",
        "lastName": "Upton",
        "phone": "17524904920",
        "postalCode": "47452-0197",
        "province": "CO"
    },
    "sign": null,
    "txnOrderMsg": {
        "accept": "*/*",
        "appId": "{{APPID}}",
        "colorDepth": "24",
        "contentLength": "1024",
        "javaEnabled": true,
        "language": "en-US",
        "products": [
            {
                "currency": "USD",
                "name": "dragonfruit",
                "num": "58",
                "price": "231.09",
                "type": "et exercitation consectetur sint irure"
            },
            {
                "currency": "USD",
                "name": "loquat",
                "num": "49",
                "price": "800.89",
                "type": "ut dolore consectetur"
            }
        ],
        "returnUrl": "{{RETURN-URL}}",
        "notifyUrl": "{{WEBHOOK-ENDPOINT}}",
        "screenHeight": "1080",
        "screenWidth": "1680",
        "timeZoneOffset": "540",
        "transactionIp": "244.211.212.91",
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
    },
    "lpmsInfo": {
        "lpmsType": "Alipay+",
        "bankName": null,
        "iBan": null,
        "walletAccountId": null,
        "walletAccountName": null,
        "prepaidNumber": null
    },
    "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": "79745 Yost Plain",
        "city": "Fayetteville",
        "country": "US",
        "email": "Jakayla0@hotmail.com",
        "firstName": "Elfrieda",
        "identityNumber": "12639115128",
        "lastName": "Murphy",
        "phone": "17642769913",
        "postalCode": "98958",
        "province": "CO"
    },
    "merchantCustId": "CustId-UILA-F33Q",
    "merchantNo": "YOUR-MERCHANT-NO",
    "merchantTxnId": "b92bea42-f8a7-468d-a501-ccd1c7396fd7",
    "merchantTxnTime": "2025-03-21 15:19:41",
    "orderAmount": "20",
    "orderCurrency": "USD",
    "shippingInformation": {
        "address": "628 Sauer Villages",
        "city": "Isomstead",
        "country": "US",
        "email": "Johanna80@yahoo.com",
        "firstName": "Madie",
        "identityNumber": "00830222859",
        "lastName": "Upton",
        "phone": "17524904920",
        "postalCode": "47452-0197",
        "province": "CO"
    },
    "sign": null,
    "txnOrderMsg": {
        "accept": "*/*",
        "appId": "YOUR-APPLICATION-ID",
        "colorDepth": "24",
        "contentLength": "1024",
        "javaEnabled": true,
        "language": "en-US",
        "products": [
            {
                "currency": "USD",
                "name": "dragonfruit",
                "num": "58",
                "price": "231.09",
                "type": "et exercitation consectetur sint irure"
            },
            {
                "currency": "USD",
                "name": "loquat",
                "num": "49",
                "price": "800.89",
                "type": "ut dolore consectetur"
            }
        ],
        "returnUrl": "YOUR-RETURN-URL",
        "notifyUrl": "YOUR-WEBHOOK-ENDPOINT",
        "screenHeight": "1080",
        "screenWidth": "1680",
        "timeZoneOffset": "540",
        "transactionIp": "244.211.212.91",
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
    },
    "lpmsInfo": {
        "lpmsType": "Alipay+",
        "bankName": null,
        "iBan": null,
        "walletAccountId": null,
        "walletAccountName": null,
        "prepaidNumber": null
    },
    "productType": "ALL",
    "subProductType": "DIRECT",
    "txnType": "SALE"
}'

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-03-21 07:19:44
Previous
APMs Checkout
Next
Card Checkout - Authorizaiton
Built with