跳到主要内容

取消支付参数

Method POST

URL

https://xxx.finexusgroup.com/fnx-fintech/sandbox/mqpos-host/api/cancel

字段名是否必需类型描述
SignatureString包含消息的签名值。消息的发起者负责生成签名,而消息的接收者必须验证签名,以确保消息的完整性、真实性和不可否认性。

请参考 附录 1
sourceSystemString消息发起者的系统 ID。

Body

请参考 嵌入代码对内容进行加密,并在正文前添加消息类型指示符0014

字段名是否必需类型长度描述示例
msgVerString8版本数字"1.0"
billerTypeString2付款类型"PS" - POS 系统
callerDeviceTypeString2呼叫设备类型."02" - 安卓 EDC/卡支付终端
callerDeviceVerString8呼叫设备的应用版本数字。"1"
sequenceNoString16在日历日内系统中唯一的运行消息序列数字,每天从 1 重新开始。"202409288868"
sellerIdString6由 FINEXUS 提供,用于识别卖方或纳税人(商户)以进行电子发票处理。"A123"
midString15商户 ID"100000"
mrnString40由 POS 系统分配的唯一参考数字,用于识别原始支付交易。"8e8c6e61-f9e4-40f0-a4a5-9e561579c901"
cancelMrnString40当前取消请求的商户参考号。"8e8c6e61-f9e4-40f0-a4a5-9e561579c901"
currencyNumber3此交易的 ISO 4217 数字货币代码。"458"
refundAmountYesNumber18退款金额"1000"
invoice条件的Object用于向 LHDN 提交的发票对象,以用于电子发票。
cancelReasonYesString300Cancellation Reason."..."

示例请求和响应主体

加密之前
{
"msgVer": "1.0",
"billerType": "PS",
"callerDeviceType": "02",
"callerDeviceVer": "1",
"sequenceNo": "2022091511262185",
"sellerId": "A123",
"mid": "000010000012XXX",
"mrn": "8e8c6e61-f9e4-40f0-a4a5-9e561579c901",
"cancelMrn": "8e8c6e61-f9e4-40f0-a4a5-9e561579c902",
"currency": "458",
"refundAmount": "100",
"cancelReason": "..."
}
加密之后并添加消息类型指示符
0013eyJlcGsiOnsia3R5IjoiRUMiLCJjcnYiOiJQLTI1NiIsImtpZCI6ImU4NmQ0Y2ZiLTFkNzMtNDJkNi05MGVlLWRlNWJlNjcwMjVlOSIsIngiOiI0UmxIeDAzX3ZlTURWaGFaTl91TVppZ2YzV1dPWGlveG52Zy1rRXhyMzFrIiwieSI6ImcyU1VqNkJnVHdYakxWYWlTRnVobGtSWklrMndaWlNaMWJEWG1DSTZSVXcifSwia2lkIjoiMTIzIiwiZW5jIjoiQTI1NkNCQy1IUzUxMiIsImFsZyI6ImRpciJ9..UIzHIjrFX8fPX91SEUzZpA.9hmtgLHx_UZjYTwduAtdruZB60QPRPjvczVeJwSI7tomXmEU720zuokvMdf9VxQqHOh2PHvtTtqW8OZQuIqYyDmss06ii-fy73a897AJv2KXPARY6DduoiLSJwDCJKhBiJlnZkAMyRZdB5xGzJwXL21QaXbO86EF6_d9qzrOhQvrNlfkTOBQYnv5Mhnnetda0_zm59HRMW2mg-rEOGj1W0Q4U0I8ZZrXQSxO3MnalxuzWQ4oTU2uHZrFnsyL93PeKiG_RmIszQGXqG0bN8WsoJfL0BTd20rnxldLQcSZYNdxGJw0EBGwlSp7DTpcmP1kzd1v2PzLGISZiPa9zadcVuLaODBZQ5GdHoPgIi76pTRwDJrv1CuD8ugfuuu_L5DxFIErnqs5cTONqxhCQ23ZeCSbnuDJDJju9yyr2wYoFFKQQciZmPddPgi2phew31DRjju4y4Ab6H7Vv01gqk6h2b9clR7v54wZSvR0CVROLZj79nKM1eLDhEo8JEv6T5APb2EHMTaU-sIlT-XqENbwV-A5HSEuEdvU7K3fsgioU5qJWwk9SS1WWmyqHnvCK1Rl5azJcKbfyN07a7znZD66IAoSUoCHjsqmFC4bd6ckdLA.Q3Ys35PhzHsnNnlJQ3rzwR-RsfEmYeDxXDsw9h97Azo

示例消息

POST 请求
curl -X POST "https://xxx.finexusgroup.com/fnx-fintech/sandbox/mqpos-host/api/cancel" \
-H "Accept: application/json" \
-H "Content-Type: text/plain" \
-H "Signature: ..." \
-H "sourceSystem: ..." \
-d '0013eyJlcGsiOnsia3R5IjoiRUMiLCJ...'