OnlinePay API
  1. API Reference
OnlinePay API
  • Introduction
  • How to start
  • Country Code
  • Currency Code
  • Error Code
  • API Reference
    • Credit Card
      POST
    • Alipay
      POST
    • Union Pay
      POST
    • WeChat
      POST
    • Cryptocurrency Payment
      POST
    • OnlinePay CheckOut
      POST
    • notifyUrl
      POST
    • Refund
      POST
    • Query
      POST
    • QueryOrderList
      POST
  1. API Reference

OnlinePay CheckOut

POST
https://pay.onlinepay.ai/cashier/checkStandPay
Checkout: When you initiate a payment request, you will receive a checkout URL back from OnlinePay and be redirected to that checkout URL to submit your card number and other information, finally jump to the returnUrl to synchronize your payment results.

Request

Body Params application/json
merNo
integer 
required
Merchant Number, Unique identifier assigned to the merchant by the onlinepay payment platform when registering with onlinepay
merOrderNo
string 
required
Merchant Order Number, Each order must be unique, and each merchant order number can only be submitted once within 1 second
currencyCode
string 
required
Please refer to Currency Code
sourceAmount
string 
required
Total amount of the order, keep two decimals
returnUrl
string 
required
Jump address after payment is completed,
<= 512 characters
notifyUrl
string 
optional
Asynchronous notification address to notify the merchant of the final payment result
<= 512 characters
sign
string 
required
signature, MD5(merNo+merOrderNo+currencyCode+sourceAmount+PrivateKey)
billingFirstName
string 
required
First Name
<= 50 characters
billingLastName
string 
required
Last name
<= 50 characters
billingAddress1
string 
required
billing address 1
<= 128 characters
billingAddress2
string 
optional
billing address 2
<= 128 characters
billingCity
string 
required
City of residence (bill)
<= 100 characters
billingState
string 
required
State Name (Bill)
<= 100 characters
billingCountry
string 
required
International ISO country abbreviation, Refer to the Country Code
<= 2 characters
billingZipCode
string 
required
Postal Code
<= 20 characters
billingPhone
string 
required
billing phone
<= 20 characters
billingEmail
string 
required
billing email
<= 100 characters
shippingFirstName
string 
optional
Consignee’s first name, Virtual goods do not need to be filled in, physical goods are required
<= 50 characters
shippingLastName
string 
optional
Consignee’s last name, UnionPay Can,WeChat,AliPay be empty, Virtual goods do not need to be filled in, physical goods are required
<= 50 characters
shippingAddress1
string 
optional
Receiving address details 1, Virtual goods do not need to be filled in, physical goods are required
<= 128 characters
shippingAddress2
string 
optional
Receiving address details 2, Virtual goods do not need to be filled in, physical goods are required
<= 128 characters
shippingCity
string 
optional
Receiving city, Virtual goods do not need to be filled in, physical goods are required
<= 100 characters
shippingState
string 
optional
Receiving continent, province, Virtual goods do not need to be filled in, physical goods are required
<= 100 characters
shippingCountry
string 
optional
Receiving country, Refer to the country code table, Virtual goods do not need to be filled in, physical goods are required
<= 2 characters
shippingZipCode
string 
optional
Consignee’s zip code, Virtual goods do not need to be filled in, physical goods are required
<= 20 characters
shippingPhone
string 
optional
Consignee phone, Virtual goods do not need to be filled in, physical goods are required
<= 20 characters
shippingEmail
string 
optional
shilling email, Virtual goods do not need to be filled in, physical goods are required
<= 100 characters
userAgent
string 
required
Cardholder browser UserAgent
<= 128 characters
ipAddress
string 
required
Cardholder IP address
<= 64 characters
productInfoList
array [object {4}] 
required
product list
sku
string 
required
Product ID
<= 64 characters
productName
string 
required
product name
<= 128 characters
price
string 
required
Commodity price
<= 16 characters
quantity
string 
required
quantity of commodity
<= 16 characters
version
string 
required
V3.0.0
Example
{
    "merNo": 0,
    "merOrderNo": "string",
    "currencyCode": "string",
    "sourceAmount": "string",
    "returnUrl": "string",
    "notifyUrl": "string",
    "sign": "string",
    "billingFirstName": "string",
    "billingLastName": "string",
    "billingAddress1": "string",
    "billingAddress2": "string",
    "billingCity": "string",
    "billingState": "string",
    "billingCountry": "st",
    "billingZipCode": "string",
    "billingPhone": "string",
    "billingEmail": "string",
    "shippingFirstName": "string",
    "shippingLastName": "string",
    "shippingAddress1": "string",
    "shippingAddress2": "string",
    "shippingCity": "string",
    "shippingState": "string",
    "shippingCountry": "st",
    "shippingZipCode": "string",
    "shippingPhone": "string",
    "shippingEmail": "string",
    "userAgent": "string",
    "ipAddress": "string",
    "productInfoList": [
        {
            "sku": "string",
            "productName": "string",
            "price": "string",
            "quantity": "string"
        }
    ],
    "version": "string"
}

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.onlinepay.ai/cashier/checkStandPay' \
--header 'Content-Type: application/json' \
--data-raw '{
    "merNo": 0,
    "merOrderNo": "string",
    "currencyCode": "string",
    "sourceAmount": "string",
    "returnUrl": "string",
    "notifyUrl": "string",
    "sign": "string",
    "billingFirstName": "string",
    "billingLastName": "string",
    "billingAddress1": "string",
    "billingAddress2": "string",
    "billingCity": "string",
    "billingState": "string",
    "billingCountry": "st",
    "billingZipCode": "string",
    "billingPhone": "string",
    "billingEmail": "string",
    "shippingFirstName": "string",
    "shippingLastName": "string",
    "shippingAddress1": "string",
    "shippingAddress2": "string",
    "shippingCity": "string",
    "shippingState": "string",
    "shippingCountry": "st",
    "shippingZipCode": "string",
    "shippingPhone": "string",
    "shippingEmail": "string",
    "userAgent": "string",
    "ipAddress": "string",
    "productInfoList": [
        {
            "sku": "string",
            "productName": "string",
            "price": "string",
            "quantity": "string"
        }
    ],
    "version": "string"
}'

Responses

🟢200OK
application/json
Body
code
string 
required
If the value is 0000, it will return success, other please refer to Error Code
message
string 
required
Interface returns description
data
object 
optional
Request response data
payUrl
string 
required
Please redirect to CheckOut address
merOrderNo
string 
required
Corresponds to the [OrderNo] parameter of the order submission parameter
Example
{
    "code": "00000",
    "message": "SUCCESS",
    "data": {
        "merOrderNo": "222222",
        "payUrl": "http://abc.com/notify"
    }
}
Modified at 2023-08-04 10:04:45
Previous
Cryptocurrency Payment
Next
notifyUrl
Built with