Onerway Payment API
Onerway APIs
  1. JS-SDK
  • 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
        POST
      • Subscription Payment Intent
        POST
      • Card Tokenization Intent
        POST
    • 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. JS-SDK

Subscription Payment Intent

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

Request

Body Params application/json
Configuration for establishing a subscription with automatic recurring payments processed by the payment service provider
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 (SUBSCRIBE for recurring billing arrangements)
Allowed value:
SUBSCRIBE
txnType
enum<string> 
交易类型
optional
Transaction type defining the payment operation (SALE for immediate authorization and capture)
Allowed value:
SALE
subscription
Onerway发起扣款订阅
required
Core configuration parameters for establishing and managing recurring billing arrangements
One of
requestType
enum<string> 
订阅请求类型
required
首购 | Initial Purchase
<= 1 characters
Allowed value:
0
selfExecute
enum<string> 
订阅扣款方式
required
自动扣款 | Auto Debit
<= 1 characters
Allowed value:
1
productName
string  | null 
订阅商品名称
optional
Name of the product or service being subscribed to, displayed in payment statements and notifications
<= 256 characters
frequencyType
enum<string> 
订阅频率类型
required
Unit of time measurement for the subscription billing cycle interval
<= 1 characters
Allowed values:
DWMY
bindCard
绑卡标志
required
Flag indicating that the payment card should be tokenized and stored for future subscription payments
Allowed value:
true
merchantCustId
string 
商户客户ID
required
Unique identifier for the customer in the merchant's system, required for initial subscription setup
<= 40 characters
frequencyPoint
string 
订阅频率点数
required
Numeric value defining the interval between billing cycles based on the frequencyType
<= 2 characters
notificationEmail
string <email> | null 
通知邮箱
optional
Customer email address for receiving subscription-related notifications and receipts
<= 256 characters
metaData
string  | null 
元数据
optional
Custom JSON data field for merchant-specific information related to the subscription
<= 2048 characters
trialFromPlan
enum<string>  | enum<null> 
试用模式
optional
Indicates whether the subscription includes a trial period before regular billing begins
<= 256 characters
Allowed values:
01
trialDays
integer 
试用天数
required
Number of days in the trial period before regular subscription billing begins
expireDate
string  | null 
过期日期
required
Specific calendar date when the subscription will automatically terminate
<= 10 characters
Match pattern:
^\d{4}-\d{2}-\d{2}$
Example
{
    "billingInformation": {
        "address": "60923 Hand Land",
        "city": "Port John",
        "country": "US",
        "email": "Michael.Schuppe@hotmail.com",
        "firstName": "Lew",
        "identityNumber": "26955681496",
        "lastName": "Schimmel",
        "phone": "15444855723",
        "postalCode": "77023-4284",
        "province": "CO"
    },
    "merchantCustId": "CustId-FE0K-H240",
    "merchantNo": "{{MERCHANT-NO}}",
    "merchantTxnId": "1be68291-f846-424c-9c5b-18733e10ca31",
    "merchantTxnTime": "2025-05-25 10:11:28",
    "orderAmount": "529",
    "orderCurrency": "USD",
    "shippingInformation": {
        "address": "442 Ridge Road",
        "city": "Fort Hiltonville",
        "country": "US",
        "email": "Alexa.Smitham@gmail.com",
        "firstName": "Emma",
        "identityNumber": "81271273784",
        "lastName": "Carter",
        "phone": "15881485876",
        "postalCode": "03157-1682",
        "province": "CO"
    },
    "sign": null,
    "txnOrderMsg": {
        "accept": "*/*",
        "appId": "{{APPID}}",
        "colorDepth": "16",
        "contentLength": "65536",
        "javaEnabled": false,
        "language": "en-US",
        "products": [
            {
                "currency": "USD",
                "name": "sprout",
                "num": "88",
                "price": "358.60",
                "type": "est"
            },
            {
                "currency": "USD",
                "name": "melon",
                "num": "29",
                "price": "187.70",
                "type": "elit exercitation"
            }
        ],
        "returnUrl": "{{RETURN-URL}}",
        "notifyUrl": "{{WEBHOOK-ENDPOINT}}",
        "screenHeight": "2160",
        "screenWidth": "3840",
        "timeZoneOffset": "480",
        "transactionIp": "80.150.130.156",
        "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": "SUBSCRIBE",
    "txnType": "SALE",
    "subscription": {
        "requestType": "0",
        "selfExecute": "2",
        "productName": "Rustic Wooden Fish",
        "frequencyType": "D",
        "merchantCustId": "CustId-ZR60-82FP",
        "frequencyPoint": "27",
        "expireDate": "2099-06-01"
    }
}

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/sdkTxn/doTransaction' \
--header 'Content-Type: application/json' \
--data-raw '{
    "billingInformation": {
        "address": "60923 Hand Land",
        "city": "Port John",
        "country": "US",
        "email": "Michael.Schuppe@hotmail.com",
        "firstName": "Lew",
        "identityNumber": "26955681496",
        "lastName": "Schimmel",
        "phone": "15444855723",
        "postalCode": "77023-4284",
        "province": "CO"
    },
    "merchantCustId": "CustId-FE0K-H240",
    "merchantNo": "YOUR-MERCHANT-NO",
    "merchantTxnId": "1be68291-f846-424c-9c5b-18733e10ca31",
    "merchantTxnTime": "2025-05-25 10:11:28",
    "orderAmount": "529",
    "orderCurrency": "USD",
    "shippingInformation": {
        "address": "442 Ridge Road",
        "city": "Fort Hiltonville",
        "country": "US",
        "email": "Alexa.Smitham@gmail.com",
        "firstName": "Emma",
        "identityNumber": "81271273784",
        "lastName": "Carter",
        "phone": "15881485876",
        "postalCode": "03157-1682",
        "province": "CO"
    },
    "sign": null,
    "txnOrderMsg": {
        "accept": "*/*",
        "appId": "YOUR-APPLICATION-ID",
        "colorDepth": "16",
        "contentLength": "65536",
        "javaEnabled": false,
        "language": "en-US",
        "products": [
            {
                "currency": "USD",
                "name": "sprout",
                "num": "88",
                "price": "358.60",
                "type": "est"
            },
            {
                "currency": "USD",
                "name": "melon",
                "num": "29",
                "price": "187.70",
                "type": "elit exercitation"
            }
        ],
        "returnUrl": "YOUR-RETURN-URL",
        "notifyUrl": "YOUR-WEBHOOK-ENDPOINT",
        "screenHeight": "2160",
        "screenWidth": "3840",
        "timeZoneOffset": "480",
        "transactionIp": "80.150.130.156",
        "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": "SUBSCRIBE",
    "txnType": "SALE",
    "subscription": {
        "requestType": "0",
        "selfExecute": "2",
        "productName": "Rustic Wooden Fish",
        "frequencyType": "D",
        "merchantCustId": "CustId-ZR60-82FP",
        "frequencyPoint": "27",
        "expireDate": "2099-06-01"
    }
}'

Responses

🟢200OK
application/json
Body
object {0}
Example
{}
Modified at 2025-05-25 02:13:45
Previous
One-Time Payment Intent
Next
Card Tokenization Intent
Built with