Skip to main content

Google Pay Token Payment


Make payments using the payment token obtained through Google Pay integration. The payment service provider is mpgs.

Info

{domain}/Servlet/JSAPIService.do

https://vmp.eftpay.com.cn/VMP/Servlet/JSAPIService.do

NameTypeDescriptionRequirement
serviceStringInterface name, service.mpgs.token.GooglePay
user_confirm_keyString(12)User Key provided by eftPay
token_idStringPayment token obtained through Google Pay integration
transaction_amountString(8)Amount. Only numbers are required, with a maximum of 2 decimal places
out_trade_noString(28)Merchant order number
payTypeString(6)Payment type, Mpgs
buyerTypeString(7)Device type
ios , android , others
subjectString(256)Transaction information
walletString(20)Wallet type, MPGS
bodyString(128)Recommended to accumulate a string describing the various products if necessary
pay_sceneStringPayment scene, please pass TOKEN_GOOGLE_PAY by default
fee_typeString(5)Currency type, HKD
tidString(20)Merchant terminal number
notify_urlString(240)Notification address. In the production environment, only ports 80 and 443 are supported. Other ports need to be applied for
timeStringTime, format: yyyyMMddHHmmss
signString(64)Signature

NameTypeDescriptionRequirement
return_statusString(3)Return status code, represents . Note: This parameter cannot be used as a judgment of whether the transaction status is successful
Other status codes see Appendix 3
return_charString(100)Return description, may change, can not be used as a condition judgment
Return when return_status > 00
timeStringTime, format: yyyyMMddHHmmss
return_status >= 00 return
signString(64)Signature
return_status >= 00 return

NameTypeDescriptionRequirement
token_idStringPayment token obtained through Google Pay integration
user_confirm_keyStringUser Key provided by eftPay
trade_noString(64)Payment provider order number
transaction_idString(64)Payment provider order number
gmt_paymentStringTransaction time in the format: yyyy-MM-dd HH:mm:ss
trade_typeString(10)Transaction type
SALE
pay_sceneStringPayment scene
out_trade_noString(28)Merchant order number
eft_trade_noString(28)EftPay order number
eftpay_trade_noString(28)EftPay order number
total_feeString(8)Amount
currencyString(5)Currency type
walletString(20)Wallet type
trade_statusString(32)Transaction status, see Appendix 2
tidString(20)Merchant terminal number

{
	"pay_scene": "TOKEN",
	"user_confirm_key": "S0004152",
	"wallet": "MPGS",
	"subject": "subject 测试 20231010123131",
	"transaction_amount": "0.34",
	"sign": "a80efaa4f936dbf40be……4e27a58da266d502b61c43c7e46d30",
	"fee_type": "HKD",
	"body": "body测试",
	"tid": "123",
	"payType": "Mpgs",
	"out_trade_no": "20231010123131",
	"token_id": "{\"signature\":\"MEUCIAiKEFLtyByPibw13tGQUu8su……mSOGC9PhokyrnhLFF+kE2lt5Fsi26Y5rOTPZf/8A\\\\u003d\\\"}\"}",
	"service": "service.mpgs.token.GooglePay",
	"buyerType": "andriod",
	"time": "20231010123131"
}

Payment successful

{
	"token_id": "",
	"user_confirm_key": "S0004152",
	"trade_no": "328304169361",
	"transaction_id": "328304169361",
	"gmt_payment": "2023-10-10 12:31:37",
	"trade_type": "SALE",
	"out_trade_no": "20231010123131",
	"eft_trade_no": "8520000212700003682237ec6pun125",
	"eftpay_trade_no": "8520000212700003682237ec6pun125",
	"total_fee": "0.34",
	"currency": "HKD",
	"wallet": "MPGS",
	"trade_status": "TRADE_SUCCESS",
	"tid": "123",
	"time": "20231010123137",
	"return_status": "00",
	"return_char": "",
	"sign": "3b3afa32a10daff87fbe3bde2605b05ad89cb420da5569a37c4106b05b7de540"
}

Payment failed

{
	"token_id": "",
	"user_confirm_key": "S0004152",
	"trade_no": "",
	"transaction_id": "",
	"gmt_payment": "",
	"trade_type": "SALE",
	"out_trade_no": "20231010110914000026",
	"eft_trade_no": "8520000212700003682237ec391l101",
	"eftpay_trade_no": "8520000212700003682237ec391l101",
	"total_fee": "0.02",
	"currency": "HKD",
	"wallet": "MPGS",
	"trade_status": "TRADE_CLOSED",
	"tid": "123",
	"time": "20231010111527",
	"return_status": "00",
	"return_char": "",
	"sign": "eec40ad492bc498ac9f1f46c62eeac85f058b1733a42ad544385b14ce8932062"
}

Query, Notification, and Refund