To ensure that the data is not tampered with during transmission, the system requires you to sign the payment parameter data and send the data signature along with the payment request
The MD5 Signature
The signature mode of all interfaces in the system is MD5. For details about the signature field, see the signature parameter remarks of each interface
Verify the signature, you can to MD5 signature string 123456 signature string E10ADC3949BA59ABBE56E057F20F883E result, can think the signature right
Signature rule: Concatenates the fields to be signed in the specified order, and converts all the characters after the signature to uppercase after the MD5 signature
The merchant key can be obtained from the merchant background after the merchant is successfully registered and approved
Request Parameters
Request URL:
sandbox: https://sandbox.paypomelo.com/payment
Request Type: POST
Request Header: Content-Type:application/json
Request Header Parameters:
Parameter name
Required
Type
Explain
Length
Remark
referer
No
String
Referer
256
When the referer is not filled in, the url will be obtained from returnUrl and verified by default. If the referer is filled in, the referer will be judged first. When the verification fails, returnUrl will not be verified
Body Parameters:
Body Parameters
{"tradeMerNo":123455,"merOrderNo":"1641972507000","currencyCode":"CNY","sourceAmount":"100.05","returnUrl":"http://baidu.com","sign":"9D6FDF4880B00B002B1F2AB61AE9A721","cardNo":"6011200081728932","cardExpireMonth":"06","cardExpireYear":"2020","cardSecurityCode":"361","billingFirstName":"san","billingLastName":"zhang","billingAddress1":"China","billingCity":"shanghai","billingState":"shanghai","billingCountry":"CN","billingZipCode":"200000","billingPhone":"13688888888","shippingFirstName":"san","shippingLastName":"zhang","shippingAddress1":"China","shippingCity":"shanghai","shippingState":"shanghai","shippingCountry":"CN","shippingZipCode":"200000","shippingPhone":"13688888888","ipAddress":"116.235.134.86","browser":{"acceptHeader":"/**","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36","language":"en","timeZoneOffset":10,"colorDepth":10,"screenHeight":100,"screenWidth":1300,"javaEnabled":true},"holderName":"test","productInfo":[{"sku":"1","productName":"mac pro","price":"12000","quantity":"1"},{"sku":"2","productName":"iphone13","price":"8000","quantity":"1"}]}
Parameter name
Required
Type
Explain
Length
Remark
tradeMerNo
Yes
Integer
Merchant Number
10
Unique identifier assigned to the merchant by the Gold Pomelo payment platform when registering with Gold Pomelo
merOrderNo
Yes
String
Merchant Order Number
32
Each order must be unique, and each merchant order number can only be submitted once within 1 second
currencyCode
Yes
String
Currency
3
sourceAmount
Yes
String
Total amount of the order
12
keep two decimals
returnUrl
Yes
String
Jump address after payment is completed
512
notifyUrl
No
String
Asynchronous notification address
512
The asynchronous notification address is used when 3DS pays to receive Gold Pomelo to push payment results to merchants
sign
Yes
String
signature
32
(tradeMerNo、merOrderNo、currencyCode、sourceAmount、Merchant key) Please refer to See signature for details
cardNo
Yes
String
card number
16
cardExpireMonth
Yes
String
Expiry date of card (month)
2
cardExpireYear
Yes
String
Expiry date of card (year)
4
cardSecurityCode
Yes
String
CVV2/CSC
3
billingFirstName
Yes
String
First Name
50
billingLastName
Yes
String
Last name
50
billingAddress1
Yes
String
billing address 1
128
billingAddress2
No
String
billing address 2
128
billingCity
Yes
String
City of residence (bill)
100
billingState
Yes
String
State Name (Bill)
100
billingCountry
Yes
String
International ISO country abbreviation
2
Refer to the country code table
billingZipCode
Yes
String
Postal Code
20
billingPhone
Yes
String
billing phone
20
billingEmail
Yes
String
billing email
100
shippingFirstName
Yes
String
Consignee’s first name
50
shippingLastName
Yes
String
Consignee’s last name
50
shippingAddress1
Yes
String
Receiving address details 1
128
shippingAddress2
No
String
Receiving address details 2
128
shippingCity
Yes
String
Receiving city
100
shippingState
Yes
String
Receiving continent, province
100
shippingCountry
Yes
String
Receiving country
2
Refer to the country code table
shippingZipCode
Yes
String
Consignee’s zip code
20
shippingPhone
Yes
String
Consignee phone
20
shippingEmail
Yes
String
shilling email
100
ipAddress
Yes
String
Cardholder IP address
64
productInfoList
Yes
List
product list
browser
Yes
browser
Browser information
holderName
Yes
String
Cardholder Name
30
Item parameters in the item list
Parameter name
Required
Type
Explain
Length
Remark
sku
Yes
String
Product ID
64
productName
Yes
String
product name
128
price
Yes
String
Commodity price
16
quantity
Yes
String
quantity of commodity
16
Browser information parameters Required field
Parameter name
Required
Type
Explain
Length
Remark
acceptHeader
Yes
String
Customer browser(Accept header)
50
userAgent
Yes
String
Customer browser(userAgent)
128
language
Yes
String
Customer browser language setting
50
timeZoneOffset
Yes
Interger
Time Zone Offset from UTC
11
colorDepth
Yes
Interger
Color depth of the client browser
11
screenHeight
Yes
Interger
Screen height of client browser
11
screenWidth
Yes
Interger
Screen width of client browser
11
javaEnabled
Yes
Interger
Whether Javascript is enabled in the client's browser
true
Sample request
publicclassTest{publicstaticvoidmain(String[]args){JSONObjectjsonObject=newJSONObject();jsonObject.put("tradeMerNo","123455");jsonObject.put("merOrderNo","1641972507000");jsonObject.put("currencyCode","CNY");//.....All body parameters except the sign//signStringsign=MD5(tradeMerNo+merOrderNo+currencyCode+sourceAmount+MerchantKey);jsonObject.put("sign",sign.toUpperCase());Stringurl="/payment";HttpResponsehttpResponse=HttpRequest.post(url).body(jsonObject.toJSONString(),"application/json").execute();intstatus=httpResponse.getStatus();if(status==HttpStatus.HTTP_OK){Stringcontent=httpResponse.body();}}}
{"code":"00000","message":"SUCCESS","data":{"tradeNo":"DZ02204201930225414","merOrderNo":"1650454222321","payCode":2,"payUrl":"https://test.LC-001hk.com/pay-web-h5/cnp_pay/directCashier?accessCode=85200162&mchtId=852999952110013&accessOrderId=DZ02204201930225414","payDesc":"Please redirect to payUrl","sourceAmount":"1","currencyCode":"HKD","tradeMerNo":104001001,"sign":"4B91E93FD32245B600D8780D5C26A0EB"}}
Response Failure Example
{"code":"10004","message":"The merchant number does not exist"}
Parameter name
Required
Type
Explain
code
Yes
String
error code(Refer to the error code table)
message
Yes
String
error description
data
No
T
Request response data
Return Parameters description
Parameter name
Required
Type
Explain
tradeNo
Yes
String
The flow number generated after each order payment (unique marker)
payCode
Yes
Integer
Payment status code(Where: 1 means payment failure, 0 means payment success, 2 means pending)
payUrl
No
String
This parameter is mandatory for 3D payment (the merchant needs to redirect to this link)
merOrderNo
Yes
String
Corresponds to the [OrderNo] parameter of the order submission parameter
payDesc
No
String
Payment message description
sourceAmount
Yes
String
Total amount of the order
currencyCode
Yes
String
tradeMerNo
Yes
String
Unique identifier assigned to the merchant by the Gold Pomelo payment platform when registering with Gold Pomelo
sign
Yes
String
(tradeMerNo、merOrderNo、currencyCode、sourceAmount、payCode、Merchant key) Please refer to See signature for details
billAddress
No
String
Billing Address Descriptor
Error Code
State Code
Description
00000
SUCCESS
10000
Payment method cannot be empty
10001
Payment method does not exist
10002
The parameter cannot be empty
10003
The same order of the same merchant number cannot be submitted repeatedly within the same time
10004
The merchant number does not exist
10005
Merchant not active
10006
Referer cannot be empty
10007
Source url does not comply with relevant regulations
10008
Merchant Url Restriction
10009
Duplicate merchant order number
10010
Merchant does not set transaction currency
10011
The channel is not open
10012
The card type is not bound
10013
Banks don't exist
10014
Currency conversion rate does not exist
10015
Signature error
10016
Exceed daily transaction limit
10017
Exceed monthly transaction limit
10018
Currency cannot be empty
10019
Currency is not open or currency incoming is wrong
10020
There is no single transaction limit
10021
There is no daily trading limit
10022
There is no monthly trading limit
10023
Merchant reaches single transaction limit
10024
Merchants have reached their daily transaction limit
10025
Merchants have reached their monthly transaction limit
99996
Data type conversion exception
99997
The parameter is missing or does not meet the restriction
99998
Channel payment failure
99995
The payment channel connection has timed out
10026
The transaction does not exist or cannot match the original transaction
10027
The order is not confirmed.
10028
The order is being processed for refund
10029
Insufficient refund amount
10031
The query type does not exist
10032
The card type was not recognized
10033
Merchant does not set card discount rate
10034
Merchant does not set margin deduction rate
10035
All quotas have been used up
10036
The channel is disabled.
10037
Transactions with this card are not supported
10038
Success limit
10039
Failed times exceed the set maximum allowed failed times (cardholder)
10040
Block rule block
10141
Card Nubmer Blacklist blocking
10142
IP Blacklist blocking
10143
EMAIL Blacklist blocking
10144
Tel Phone Blacklist blocking
10042
Element is limited
99994
The request mode is incorrect
99995
The payment channel connection has timed out
99996
Data type conversion exception
99997
The parameter is missing or does not meet the restriction
1,000~ (Only Integer), 3,000,000 COP per user per day, 15 transactions per user per day.
Bancolombia
5,000~3,000,000 (Only Integer)
Efecty
1~3,000,000(Only Integer)
SuRed
1,000~3,000,000(Only Integer)
Gana
1,000~3,000,000(Only Integer)
method=Wallet, walletType = TPaga
1~2,000,000(Only Integer)
method=Wallet, walletType = Dale
1,000~10,000,000(Only Integer)
method=Wallet, walletType = Daviplata
1,000~10,000,000(Only Integer)
method=Wallet, walletType = Movii
1,000~10,000,000(Only Integer)
method=Wallet, walletType = Nequi
1,000~10,000,000(Only Integer)
method=Wallet, walletType = Rappipay
1,000~10,000,000(Only Integer)
Chile
Parameter
Amount Limit(CLP)
CreditCard
1~1,000,000(Only Integer)
Webpay
1~1,000,000(Only Integer)
Khipu
1~250,000*(Only Integer)
BankTransfer
50~5,000,000*(Only Integer)
Pago46
1,500 - 999,999 for Bank Transfer, 10,000- 999,999 for Cash (Only Integer)
method=Wallet, walletType = Mach
1~500,000(Only Integer)
Argentina
Parameter
Amount Limit(ARS)
Khipu
50~1,257,000/day
Rapipago
30~5,000,000
Peru
Parameter
Amount Limit(PEN)
CreditCard
5~10,000
BankTransfer
5~50,000
Cash
5~1,000
QRCode
8~3,750
Ecuador
Parameter
Amount Limit(USD)
CreditCard
1~2,500
BankTransfer
2~10,000
Cash
1~500
Guatemala
Parameter
Amount Limit(GTQ)
Cash
8~7,500
Panama
Parameter
Amount Limit(USD)
Cash
1~200
Costa Rica
Parameter
Amount Limit(CRC)
BNCR
1,000~100,000(Only Integer)
Cash
1,000~190,000
Bolivia
Parameter
Amount Limit(BOB)
El Salvador
Parameter
Amount Limit(USD)
Nicaragua
Parameter
Amount Limit(NIO)
Paraguay
Parameter
Amount Limit(PYG)
Uruguay
Parameter
Amount Limit(UYU)
South Korea
Parameter
Amount Limit(KRW)
BankTransfer
1,000~ KRW (Only Integer)
VirtualAccount
500~ KRW (Only Integer)
method=Wallet, walletType = KakaoPay
100~2,000,000 KRW (Only Integer)
method=Wallet, walletType = NaverPay
100~2,000,000 KRW (Only Integer)
method=Wallet, walletType = Payco
100~2,000,000 KRW (Only Integer)
method=Wallet, walletType = SamsungPay
100~2,000,000 KRW (Only Integer)
method=Wallet, walletType = Toss
100~2,000,000 KRW (Only Integer)
China
Parameter
Amount Limit(CNY)
method=Wallet, walletType = AlipayCN
0.04~300,000 CNY
Hong Kong
Parameter
Amount Limit(HKD)
DiscoverCard
0.01~ HKD
method=Wallet, walletType = AlipayHK
0.1~9,999,999 HKD
method=Wallet, walletType = WechatPayHK
0.02~340,000 HKD
Japan
Parameter
Amount Limit(JPY)
DiscoverCard
0.01~ JPY
Indonesia
Parameter
Amount Limit(IDR)
BankTransfer
10,000~50,000,000 IDR (Only Integer)
method=Wallet, walletType = DANA
300~25,000,000 IDR
Singapore
Parameter
Amount Limit(SGD)
method=Wallet, walletType = GrabPay
~30,000 SGD
method=Wallet, walletType = ShopeePay
~
Malaysia
Parameter
Amount Limit(MYR)
method=Wallet, walletType = BOOST
0.1~9,999,999 MYR
method=Wallet, walletType = TNG
0.1~9,999,999 MYR
Philippines
Parameter
Amount Limit(PHP)
method=Wallet, walletType = BPI
1~50,000 PHP
method=Wallet, walletType = GCash
1~100,000 PHP
method=Wallet, walletType = AlipayPlus
1~50,000 PHP
QRPH
20~ PHP
Thailand
Parameter
Amount Limit(THB)
method=Wallet, walletType = RabbitLinePay
1~50,000 THB
method=Wallet, walletType = TrueMoney
1~ THB
Taiwan
Parameter
Amount Limit(TWD)
BankTransfer
1~20,000 TWD
OTC
30~20,000 TWD
PostTransfer
100~20,000 TWD
method=Wallet, walletType=LINEPay
50~20,000 TWD
method=Wallet, walletType=JKOPay
50~20,000 TWD
Vietnam
Parameter
Amount Limit(VND)
QRCode
10,000~ VND
Kazakhstan
Parameter
Amount Limit(KZT)
CreditCard
50~299,000 KZT
Uzbekistan
Parameter
Amount Limit(UZS)
CreditCard
1,000~10,000,000 UZS per transaction. 100,000,000 UZS per card per day/month
Australia
Parameter
Amount Limit(AUD)
Paysafecard
0.01~ AUD
Turkey
Parameter
Amount Limit(TRY)
method=Wallet, walletType=Papara
1~500,000 TRY
Bahrain
Parameter
Amount Limit
CreditCard
0.01~ BHD/USD
Egypt
Parameter
Amount Limit
CreditCard
0.01~ USD
method=Wallet, walletType=FawryPay
10~60,000 EGP
method=Wallet, walletType=EtisalatCash
5~30,000 EGP
method=Wallet, walletType=OrangeCash
5~30,000 EGP
method=Wallet, walletType=VodafoneCash
5~30,000 EGP
method=Wallet, walletType=WePay
5~30,000 EGP
Cash
10~100,000 EGP
Kiosk
No limit
Kuwait
Parameter
Amount Limit
CreditCard
0.01~ USD
method=Wallet, walletType = KNet
0.01~1,700 KWD
Oman
Parameter
Amount Limit(OMR)
CreditCard
0.01~ OMR
Qatar
Parameter
Amount Limit
CreditCard
0.01~ USD
Saudi Arabia
Parameter
Amount Limit(SAR)
CreditCard
0.01~ SAR
method=Wallet, walletType = MADA
0.01~21,000 SAR
United Arab Emirates
Parameter
Amount Limit(AED)
CreditCard
0.01~ AED
USA
Parameter
Amount Limit(USD)
CreditCard
cashapppay
paypal
venmo
sync skip
After completing the payment, the merchant cardholder will be redirected to the returnurl address delivered during the payment, and the relevant information of the order will be brought when redirecting.
Note: the fields carried by redirection indicating the payment status of the order do not indicate whether the final payment is successful or not.
2D: return the identification of whether the final payment is successful in real time
3D: asynchronous notification final payment success identification
Request Parameters
Parameter name
Required
Type
remark
tradeMerNo
Yes
Integer
Merchant Number
tradeNo
Yes
String
The flow number generated after each order payment (unique marker)
merOrderNo
Yes
String
Corresponds to the [OrderNo] parameter of the order submission parameter
sourceAmount
Yes
String
Total amount of the order
sourceCurrency
Yes
String
Currency
succeed
Yes
Integer
pay success flag(0:fail 1:success)
resultMessage
Yes
String
pay success desc
responseType
Yes
String
pay type(default:payment)
remark
No
String
remark
async notify
If the notifyurl parameter is not passed during payment, Gold Pomelo will not notify the merchant system after the channel party notifies Gold Pomelo
If the merchant system does not return the success (case sensitive) string after receiving the Gold Pomelo notification, Gold Pomelo will consider that the merchant system has not received the notification, and Gold Pomelo will initiate the notification again after 1、2、4、8、16、32、64、128 minutes. Gold Pomelo will initiate 9 notifications in total. If the merchant system does not return success in the 9 notifications, Gold Pomelo will no longer initiate notifications.
publicclassTest{publicstaticvoidmain(String[]args){JSONObjectjsonObject=newJSONObject();jsonObject.put("tradeNo","DZ2201111806024151");jsonObject.put("merOrderNo","1641972507000");jsonObject.put("payCode","0000");jsonObject.put("payDesc","SUCCESS");jsonObject.put("sourceAmount","1");jsonObject.put("currencyCode","HKD");jsonObject.put("tradeMerNo",104001001);jsonObject.put("sign","2345D858E5326A6E1747314E658760A9");Stringurl="Address of notifyUrl parameter passed when payment is made ";HttpResponsehttpResponse=HttpRequest.post(url).body(jsonObject.toJSONString(),"application/json").execute();intstatus=httpResponse.getStatus();if(status==HttpStatus.HTTP_OK){Stringcontent=httpResponse.body();if("SUCCESS".equals(content)){//Notify the successful}else{//Notify the failure}}else{//Notify the failure}}}
Request URL:Address of notifyUrl parameter passed when payment is made
Request Type:POST
Request Header:Content-Type:application/json
Body Parameters:
Parameter name
Required
Type
Explain
tradeNo
Yes
String
The flow number generated after each order payment (unique marker)
merOrderNo
Yes
String
Corresponds to the [OrderNo] parameter of the order submission parameter
payCode
Yes
Integer
error code(Refer to the error code table)
payDesc
Yes
String
Description of Payment Result
sourceAmount
Yes
String
Total amount of the order
currencyCode
Yes
String
tradeMerNo
Yes
String
Unique identifier assigned to the merchant by the Gold Pomelo payment platform when registering with Gold Pomelo
sign
Yes
String
(tradeMerNo、merOrderNo、currencyCode、payCode、sourceAmount、Merchant key) Please refer to See signature for details