Skip to main content

CheckOut API

Endpoints

Live POST https://pay.onlinepay.ai/cashier/checkStandPay

Sandbox POST https://testpay.onlinepay.ai/cashier/checkStandPay

note

OnlinePay will obtain the HTTP Header referer to verify the website source. The website source must be configured by OnlinePay to be verified. If you do not access the interface through a browser, you need to actively add a referer.

Request Parameters

Basic Information

ParameterTypeRequiredDescription
merNointegerYesMerchant Number, Unique identifier assigned to the merchant by the onlinepay payment platform when registering with onlinepay
merOrderNostringYesMerchant Order Number, Each order must be unique, and each merchant order number can only be submitted once within 1 second
currencyCodestringYesPlease refer to Currency Code
sourceAmountstringYesTotal amount of the order, keep two decimals
returnUrlstringYesJump address after payment is completed (max 512 characters)
notifyUrlstringNoAsynchronous notification address to notify the merchant of the final payment result (max 512 characters)
signstringYesSignature, MD5(merNo+merOrderNo+currencyCode+sourceAmount+PrivateKey) or RSA

Billing Information

ParameterTypeRequiredDescription
billingFirstNamestringNOFirst Name (max 50 characters)
billingLastNamestringNOLast name (max 50 characters)
billingAddress1stringNOBilling address 1 (max 128 characters)
billingAddress2stringNoBilling address 2 (max 128 characters)
billingCitystringNOCity of residence (bill) (max 100 characters)
billingStatestringNOState Name (Bill) (max 100 characters)
billingCountrystringNOInternational ISO country abbreviation, Refer to the Country Code (max 2 characters)
billingZipCodestringNOPostal Code (max 20 characters)
billingPhonestringNOBilling phone (max 20 characters)
billingEmailstringNOBilling email (max 100 characters)

Shipping Information (Required for physical goods)

ParameterTypeRequiredDescription
shippingFirstNamestringYesConsignee's first name (max 50 characters)
shippingLastNamestringYesConsignee's last name (max 50 characters)
shippingAddress1stringYesReceiving address details 1 (max 128 characters)
shippingAddress2stringNOReceiving address details 2 (max 128 characters)
shippingCitystringYesReceiving city (max 100 characters)
shippingStatestringYesReceiving continent, province (max 100 characters)
shippingCountrystringYesReceiving country, Refer to the Country Code table (max 2 characters)
shippingZipCodestringYesConsignee's zip code (max 20 characters)
shippingPhonestringYesConsignee phone (max 20 characters)
shippingEmailstringYesShipping email (max 100 characters)

Additional Information

ParameterTypeRequiredDescription
userAgentstringYesCardholder browser UserAgent (max 128 characters)
userIdstringYesuserId (max 52 characters)
emailstringYesemail (max 52 characters) Required for non-card payment methods.
ipAddressstringYesCardholder IP address (max 64 characters)
productInfoListarray[object]YesProduct list
- skustringYesProduct ID (max 64 characters)
- productNamestringYesProduct name (max 128 characters)
- pricestringYesCommodity price (max 16 characters)
- quantitystringYesQuantity of commodity (max 16 characters)
versionstringYesV3.0.0

* Required in Direct mode, can be empty in Checkout mode ** Required for physical goods, not needed for virtual goods

Example Request

{
"merNo": 111111,
"merOrderNo": "222222",
"currencyCode": "USD",
"sourceAmount": "100.05",
"returnUrl": "https://example.com",
"notifyUrl": "https://example.com/notify",
"sign": "906FDF4880B00B00281F2AB61AE9A721",
"billingFirstName": "Tati",
"billingLastName": "Moore",
"billingAddress1": "123 Main St",
"billingCity": "Anytown",
"billingState": "CA",
"billingCountry": "US",
"billingZipCode": "12345",
"billingPhone": "1234567890",
"billingEmail": "[email protected]",
"shippingFirstName": "Tati",
"shippingLastName": "Moore",
"shippingAddress1": "123 Main St",
"shippingCity": "Anytown",
"shippingState": "CA",
"shippingCountry": "US",
"shippingZipCode": "12345",
"shippingPhone": "1234567890",
"shippingEmail": "[email protected]",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"ipAddress": "192.168.1.1",
"productInfoList": [
{
"sku": "PROD001",
"productName": "Example Product",
"price": "100.05",
"quantity": "1"
}
],
"version": "V3.0.0"
}

Responses Body

ParameterTypeRequiredDescription
codestringYesIf the value is 00000, it will return success, other please refer to Error Code
messagestringYesInterface returns description
dataobjectYes**Request response data
-payUrlstringYes**If the paycode is 2, redirect to this address
-merOrderNostringYesCorresponds to the [OrderNo] parameter of the order submission parameter

Example Responses

{
"code":"00000",
"message":"SUCCESS",
"data":{
"payCode":0,
"tradeNo":"3333333",
"merorderNo":"222222",
"payUrl":"https://abc.com/"
}
}