Credit Card
POST
https://pay.online.ai/payment
Request
Body Params application/json
merNo
integer
required
merOrderNo
string
required
currencyCode
string
required
sourceAmount
string
required
returnUrl
string
required
<= 512 characters
notifyUrl
string
optional
<= 512 characters
sign
string
required
cardNo
string
required
cardExpireMonth
string
required
cardExpireYear
string
required
>= 4 characters<= 4 characters
cardSecurityCode
string
required
billingFirstName
string
required
<= 50 characters
billingLastName
string
required
<= 50 characters
billingAddress1
string
required
<= 128 characters
billingAddress2
string
optional
<= 128 characters
billingCity
string
required
<= 100 characters
billingState
string
required
<= 100 characters
billingCountry
string
required
<= 2 characters
billingZipCode
string
required
<= 20 characters
billingPhone
string
required
<= 20 characters
billingEmail
string
required
<= 100 characters
shippingFirstName
string
required
<= 50 characters
shippingLastName
string
required
<= 50 characters
shippingAddress1
string
required
<= 128 characters
shippingAddress2
string
required
<= 128 characters
shippingCity
string
required
<= 100 characters
shippingState
string
required
<= 100 characters
shippingCountry
string
required
<= 2 characters
shippingZipCode
string
required
<= 20 characters
shippingPhone
string
required
<= 20 characters
shippingEmail
string
required
<= 100 characters
userAgent
string
required
<= 128 characters
ipAddress
string
required
<= 64 characters
productInfoList
array [object {4}]
required
sku
string
required
<= 64 characters
productName
string
required
<= 128 characters
price
string
required
<= 16 characters
quantity
string
required
<= 16 characters
version
string
required
Example
{
"merNo": 111111,
"merOrderNo": "222222",
"currencyCode": "USD",
"sourceAmount": "100.05",
"returnUrl": "https://example.com",
"notifyUrl": "https://example.com/notify",
"sign": "9D6FDF4880B00B002B1F2AB61AE9A721",
"cardNo": "123456",
"cardExpireMonth": "01",
"cardExpireYear": "2022",
"cardSecurityCode": "335",
"billFirstName": "Tati",
"billingLastName": "Moore",
"billingAddress1": "United States",
"billingCity": "Westbury",
"billingState": "New York",
"billingCountry": "US",
"billingZipCode": "11590",
"billingPhone": "3854234144",
"billingEmail": "example@gmail.com",
"shippingFirstName": "Tati",
"shippingLastName": "Moore",
"shippingAddress1": "United States",
"shippingCity": "Westbury",
"shippingState": "New York",
"shippingCountry": "US",
"shippingZipCode": "11590",
"shippingPhone": "3854234144",
"shippingEmail": "example@gmail.com",
"userAgent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0)",
"ipAddress": "116.235.134.86",
"version": "V3.0.0",
"productInfoList": [
{
"sku": "1",
"productName": "mac pro",
"price": "12000",
"quantity": "1"
},
{
"sku": "2",
"productName": "iphone13",
"price": "8000",
"quantity": "1"
}
]
}
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://pay.online.ai/payment' \
--header 'Content-Type: application/json' \
--data-raw '{
"merNo": 111111,
"merOrderNo": "222222",
"currencyCode": "USD",
"sourceAmount": "100.05",
"returnUrl": "https://example.com",
"notifyUrl": "https://example.com/notify",
"sign": "9D6FDF4880B00B002B1F2AB61AE9A721",
"cardNo":"123456",
"cardExpireMonth":"01",
"cardExpireYear":"2022",
"cardSecurityCode": "335",
"billFirstName": "Tati",
"billingLastName": "Moore",
"billingAddress1": "United States",
"billingCity": "Westbury",
"billingState": "New York",
"billingCountry": "US",
"billingZipCode": "11590",
"billingPhone": "3854234144",
"billingEmail": "example@gmail.com",
"shippingFirstName": "Tati",
"shippingLastName": "Moore",
"shippingAddress1": "United States",
"shippingCity": "Westbury",
"shippingState": "New York",
"shippingCountry": "US",
"shippingZipCode": "11590",
"shippingPhone": "3854234144",
"shippingEmail": "example@gmail.com",
"userAgent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0)",
"ipAddress": "116.235.134.86",
"version": "V3.0.0",
"productInfoList": [
{
"sku": "1",
"productName": "mac pro",
"price": "12000",
"quantity": "1"
},
{
"sku": "2",
"productName": "iphone13",
"price": "8000",
"quantity": "1"
}
]
}'
Responses
🟢200Success
application/json
Body
code
string
required
message
string
required
data
object
optional
tradeNo
string
required
payCode
string
required
payUrl
string
optional
merOrderNo
string
required
Example
{
"code": "00000",
"message": "SUCCESS",
"data": {
"payCode": 0,
"tradeNo": "333333",
"merOrderNo": "222222",
"payUrl": "http://abc.com/notify"
}
}
Modified at 2023-05-05 10:25:01