Onerway Payment API
Onerway APIs
  1. API
  • Onerway 商户 API 接入指南
  • Onerway Merchant API Testing
  • Payment APIs
    • Checkout
      • Card Checkout
      • Card Checkout - Subscribe
      • APMs Checkout
      • Single-Method APM Checkout
      • Card Checkout - Authorizaiton
    • JS-SDK
      • One-Time Payment Intent
      • Subscription Payment Intent
      • Card Tokenization Intent
    • API
      • Card
        POST
      • Pre-Auth
        POST
      • Auth Reversal
        POST
      • Capture
        POST
      • Card Tokenization
        POST
      • Tokenized Payment
        POST
      • Subscription - Charge by Onerway
        POST
      • Subscription Initial Charge
        POST
      • Subscription Recurring Charge
        POST
      • Subscription Cancellation
        POST
      • Subscription Reactivation
        POST
      • Token Removal
        POST
    • 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. API

Tokenized Payment

Developing
Sandbox Env
https://sandbox-acq.onerway.com
Sandbox Env
https://sandbox-acq.onerway.com
POST
/v1/txn/doTransaction

Request

Body Params application/json
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
productType
enum<string> 
产品类型
optional
Product type specifying the payment method category (CARD for credit/debit card processing)
Allowed value:
CARD
subProductType
enum<string> 
子产品类型
optional
Sub-product type indicating the specific processing method (TOKEN for transactions using previously stored payment credentials)
Allowed value:
TOKEN
txnType
enum<string> 
交易类型
optional
Transaction type defining the payment operation (SALE for immediate authorization and capture using tokenized card data)
Allowed value:
SALE
tokenInfo
object 
令牌信息
required
Token information in JSON string format for tokenized payment processing
tokenId
enum<string> 
令牌ID
required
Secure token identifier representing stored payment card details for tokenized transactions
Allowed value:
{{CARD-TOKEN}}
Example
{
    "billingInformation": {
        "address": "13342 Pfannerstill Plaza",
        "city": "Lake Margareteborough",
        "country": "US",
        "email": "Tyrell.Wyman@gmail.com",
        "firstName": "Sibyl",
        "identityNumber": "05609191836",
        "lastName": "Ullrich",
        "phone": "15189238430",
        "postalCode": "99256",
        "province": "CO"
    },
    "merchantCustId": "CustId-UUL3-2H47",
    "merchantNo": "{{MERCHANT-NO}}",
    "merchantTxnId": "5ddbee02-908f-44f9-a7a8-ac1c391f00b7",
    "merchantTxnTime": "2025-05-11 10:08:35",
    "orderAmount": "500",
    "orderCurrency": "USD",
    "shippingInformation": {
        "address": "6805 Deangelo Camp",
        "city": "Buddyfield",
        "country": "US",
        "email": "Orpha_Tillman87@hotmail.com",
        "firstName": "Ian",
        "identityNumber": "90358886252",
        "lastName": "Cronin",
        "phone": "13668341505",
        "postalCode": "62799-1650",
        "province": "CO"
    },
    "sign": null,
    "txnOrderMsg": {
        "accept": "*/*",
        "appId": "{{APPID}}",
        "colorDepth": "24",
        "contentLength": "65536",
        "javaEnabled": false,
        "language": "en-US",
        "products": [
            {
                "currency": "USD",
                "name": "prune",
                "num": "56",
                "price": "508.10",
                "type": "non"
            }
        ],
        "returnUrl": "{{RETURN-URL}}",
        "notifyUrl": "{{WEBHOOK-ENDPOINT}}",
        "screenHeight": "1024",
        "screenWidth": "1536",
        "timeZoneOffset": "360",
        "transactionIp": "76.0.55.254",
        "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": "TOKEN",
    "txnType": "SALE",
    "tokenInfo": {
        "tokenId": "f7d54297b989d2acf4eb6791213cf2bd9d2c842ea05b0a91c8dd85f4f9e4915b"
    }
}

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/v1/txn/doTransaction' \
--header 'Content-Type: application/json' \
--data-raw '{
    "billingInformation": {
        "address": "13342 Pfannerstill Plaza",
        "city": "Lake Margareteborough",
        "country": "US",
        "email": "Tyrell.Wyman@gmail.com",
        "firstName": "Sibyl",
        "identityNumber": "05609191836",
        "lastName": "Ullrich",
        "phone": "15189238430",
        "postalCode": "99256",
        "province": "CO"
    },
    "merchantCustId": "CustId-UUL3-2H47",
    "merchantNo": "YOUR-MERCHANT-NO",
    "merchantTxnId": "5ddbee02-908f-44f9-a7a8-ac1c391f00b7",
    "merchantTxnTime": "2025-05-11 10:08:35",
    "orderAmount": "500",
    "orderCurrency": "USD",
    "shippingInformation": {
        "address": "6805 Deangelo Camp",
        "city": "Buddyfield",
        "country": "US",
        "email": "Orpha_Tillman87@hotmail.com",
        "firstName": "Ian",
        "identityNumber": "90358886252",
        "lastName": "Cronin",
        "phone": "13668341505",
        "postalCode": "62799-1650",
        "province": "CO"
    },
    "sign": null,
    "txnOrderMsg": {
        "accept": "*/*",
        "appId": "YOUR-APPLICATION-ID",
        "colorDepth": "24",
        "contentLength": "65536",
        "javaEnabled": false,
        "language": "en-US",
        "products": [
            {
                "currency": "USD",
                "name": "prune",
                "num": "56",
                "price": "508.10",
                "type": "non"
            }
        ],
        "returnUrl": "YOUR-RETURN-URL",
        "notifyUrl": "YOUR-WEBHOOK-ENDPOINT",
        "screenHeight": "1024",
        "screenWidth": "1536",
        "timeZoneOffset": "360",
        "transactionIp": "76.0.55.254",
        "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": "TOKEN",
    "txnType": "SALE",
    "tokenInfo": {
        "tokenId": "f7d54297b989d2acf4eb6791213cf2bd9d2c842ea05b0a91c8dd85f4f9e4915b"
    }
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2025-05-11 06:54:42
Previous
Card Tokenization
Next
Subscription - Charge by Onerway
Built with