Skip to main content

Apple Pay Token Payment


Make payments using the payment token obtained through Apple 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.ApplePay
user_confirm_keyString(12)User Key provided by eftPay
token_idStringPayment token obtained through Apple 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_APPLE_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 Apple 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

{
	"subject": "测试subject",
	"body": "测试body",
	"user_confirm_key": "S0004152",
	"pay_scene": "TOKEN",
	"wallet": "MPGS",
	"fee_type": "HKD",
	"time": "20231010155344",
	"token_id": "{\n  \"data\" : \"jOlUJcWQObX5jyThzIM1IU……9310b7222\"\n  },\n  \"version\" : \"EC_v1\"\n}",
	"out_trade_no": "20231010155344000000",
	"payType": "Mpgs",
	"transaction_amount": "1.00",
	"service": "service.mpgs.token.ApplePay",
	"buyerType": "ios",
	"tid": "123",
	"sign": "a02c23990336ca547d1f9……ec2b068f77499641bd84b3fa"
}

Payment successful

{
	"token_id": "",
	"user_confirm_key": "S0004152",
	"trade_no": "328307172405",
	"transaction_id": "328307172405",
	"gmt_payment": "2023-10-10 15:53:49",
	"trade_type": "SALE",
	"out_trade_no": "20231010155344000000",
	"eft_trade_no": "8520000212700003682237ecgjtb181",
	"eftpay_trade_no": "8520000212700003682237ecgjtb181",
	"total_fee": "1.00",
	"currency": "HKD",
	"wallet": "MPGS",
	"trade_status": "TRADE_SUCCESS",
	"tid": "123",
	"time": "20231010155349",
	"return_status": "00",
	"return_char": "",
	"sign": "9dafe3af7a0686617787922b269b27953210349abf74464706798cb862b1e9b5"
}

Payment failed

{
	"token_id": "",
	"user_confirm_key": "S0004152",
	"trade_no": "",
	"transaction_id": "",
	"gmt_payment": "",
	"trade_type": "SALE",
	"out_trade_no": "20231009153828",
	"eft_trade_no": "8520000212700003682237e2uvki934",
	"eftpay_trade_no": "8520000212700003682237e2uvki934",
	"total_fee": "0.34",
	"currency": "HKD",
	"wallet": "MPGS",
	"trade_status": "TRADE_CLOSED",
	"tid": "123",
	"time": "20231009153832",
	"return_status": "00",
	"return_char": "",
	"sign": "cd6724a06db8d90a94875eef70610c4b0c86b468cb5ff14af9e474a857095a64"
}

Query, Notification, and Refund